@streamlayer/react-ui 0.5.7 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/README.md +1 -1
  2. package/lib/icon-chevron-138a557c.js +4 -0
  3. package/lib/icon-exit-d3f9fc80.js +4 -0
  4. package/lib/index-d5620d2c.js +71 -0
  5. package/lib/index.js +91 -0
  6. package/lib/lib/demo/Gamification.js +95 -0
  7. package/lib/lib/demo/Highlights.js +59 -0
  8. package/lib/lib/demo/Login.js +25 -0
  9. package/lib/lib/demo/components/EventProvider.js +5 -0
  10. package/lib/lib/demo/components/Insight.js +31 -0
  11. package/lib/lib/demo/components/Insights.js +16 -0
  12. package/lib/lib/demo/components/Question.js +101 -0
  13. package/lib/lib/demo/components/QuestionsList.js +16 -0
  14. package/lib/lib/demo/components/UserSummary.js +32 -0
  15. package/lib/lib/demo/components/index.js +59 -0
  16. package/lib/lib/demo/index.js +126 -0
  17. package/lib/lib/demo/styles.js +58 -0
  18. package/lib/lib/gamification/common-header/index.js +14 -0
  19. package/lib/lib/gamification/common-header/styles.js +31 -0
  20. package/lib/lib/gamification/detailed-insight/index.js +29 -0
  21. package/lib/lib/gamification/detailed-insight/styles.js +62 -0
  22. package/lib/lib/gamification/insight/index.js +26 -0
  23. package/lib/lib/gamification/insight/styles.js +65 -0
  24. package/lib/lib/gamification/insight-list/index.js +11 -0
  25. package/lib/lib/gamification/insight-list/styles.js +20 -0
  26. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js +10 -0
  27. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js +30 -0
  28. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js +17 -0
  29. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js +55 -0
  30. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js +13 -0
  31. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js +43 -0
  32. package/lib/lib/gamification/onboarding/index.js +66 -0
  33. package/lib/lib/gamification/onboarding/styles.js +69 -0
  34. package/lib/lib/gamification/question/index.js +39 -0
  35. package/{src → lib}/lib/gamification/question/styles.js +30 -28
  36. package/lib/lib/gamification/question-list/index.js +14 -0
  37. package/{src → lib}/lib/gamification/question-list/styles.js +11 -9
  38. package/lib/lib/gamification/user-statistics/components/rank/index.js +10 -0
  39. package/{src → lib}/lib/gamification/user-statistics/components/rank/styles.js +9 -7
  40. package/lib/lib/gamification/user-statistics/components/statistics/index.js +10 -0
  41. package/{src → lib}/lib/gamification/user-statistics/components/statistics/styles.js +7 -5
  42. package/lib/lib/gamification/user-statistics/index.js +57 -0
  43. package/{src → lib}/lib/gamification/user-statistics/styles.js +52 -37
  44. package/lib/lib/gamification/vote/components/voting-header/components/points/index.js +13 -0
  45. package/{src → lib}/lib/gamification/vote/components/voting-header/components/points/styles.js +13 -11
  46. package/lib/lib/gamification/vote/components/voting-header/components/timer/index.js +28 -0
  47. package/lib/lib/gamification/vote/components/voting-header/components/timer/styles.js +8 -0
  48. package/lib/lib/gamification/vote/components/voting-header/index.js +44 -0
  49. package/{src → lib}/lib/gamification/vote/components/voting-header/styles.js +22 -19
  50. package/lib/lib/gamification/vote/components/voting-option/index.js +8 -0
  51. package/lib/lib/gamification/vote/components/voting-option/styles.js +96 -0
  52. package/lib/lib/gamification/vote/index.js +51 -0
  53. package/{src → lib}/lib/gamification/vote/styles.js +21 -19
  54. package/lib/lib/gamification/vote/types.d.js +1 -0
  55. package/lib/lib/login/index.js +70 -0
  56. package/{src/lib/gamification → lib/lib}/login/styles.js +24 -20
  57. package/lib/lib/notifications/decorator.js +64 -0
  58. package/lib/lib/notifications/index.js +28 -0
  59. package/lib/lib/notifications/notification/index.js +36 -0
  60. package/lib/lib/notifications/notification/onboarding-inapp/index.js +25 -0
  61. package/lib/lib/notifications/notification/onboarding-inapp/styles.js +77 -0
  62. package/lib/lib/notifications/notification/question-inapp/index.js +23 -0
  63. package/lib/lib/notifications/notification/question-inapp/styles.js +61 -0
  64. package/lib/lib/notifications/notification/styles.js +32 -0
  65. package/lib/lib/notifications/styles.js +15 -0
  66. package/lib/lib/theme/constants.js +38 -0
  67. package/lib/lib/theme/index.js +8 -0
  68. package/lib/lib/theme/theme.js +27 -0
  69. package/lib/lib/user-account/index.js +27 -0
  70. package/lib/lib/user-account/styles.js +80 -0
  71. package/lib/utils/common.js +4 -0
  72. package/lib/utils/components/bypassLogin.js +63 -0
  73. package/lib/utils/components/developer.js +76 -0
  74. package/lib/utils/components/eventInput.js +56 -0
  75. package/lib/utils/createDemo.js +46 -0
  76. package/lib/utils/decorators/container.js +11 -0
  77. package/lib/utils/decorators/styles.js +27 -0
  78. package/lib/utils/login.js +25 -0
  79. package/lib/utils/storage.js +36 -0
  80. package/lib/utils/useStreamLayerApp.js +25 -0
  81. package/package.json +49 -23
  82. package/src/assets/demo-bg.webp +0 -0
  83. package/src/assets/icons/fedex.svg +0 -7
  84. package/src/assets/icons/icon-check-green.svg +0 -5
  85. package/src/assets/icons/icon-check-white.svg +0 -5
  86. package/src/assets/icons/icon-check.svg +0 -5
  87. package/src/assets/icons/icon-chevron.svg +0 -5
  88. package/src/assets/icons/icon-circle-arrow-right.svg +0 -4
  89. package/src/assets/icons/icon-close.svg +0 -5
  90. package/src/assets/icons/icon-cross.svg +0 -6
  91. package/src/assets/icons/icon-exit.svg +0 -5
  92. package/src/assets/icons/icon-poll.svg +0 -5
  93. package/src/assets/icons/icon-prediction.svg +0 -5
  94. package/src/assets/icons/icon-thumb-down.svg +0 -3
  95. package/src/assets/icons/icon-trivia.svg +0 -5
  96. package/src/assets/icons/icon-trophy-green.svg +0 -5
  97. package/src/assets/icons/icon-trophy.svg +0 -5
  98. package/src/index.d.ts +0 -10
  99. package/src/index.js +0 -11
  100. package/src/index.js.map +0 -1
  101. package/src/lib/demo/Gamification.d.ts +0 -7
  102. package/src/lib/demo/Gamification.js +0 -30
  103. package/src/lib/demo/Gamification.js.map +0 -1
  104. package/src/lib/demo/Login.d.ts +0 -5
  105. package/src/lib/demo/Login.js +0 -15
  106. package/src/lib/demo/Login.js.map +0 -1
  107. package/src/lib/demo/components/InPlayGame.d.ts +0 -6
  108. package/src/lib/demo/components/InPlayGame.js +0 -6
  109. package/src/lib/demo/components/InPlayGame.js.map +0 -1
  110. package/src/lib/demo/components/Notifications.d.ts +0 -6
  111. package/src/lib/demo/components/Notifications.js +0 -37
  112. package/src/lib/demo/components/Notifications.js.map +0 -1
  113. package/src/lib/demo/components/Question.d.ts +0 -7
  114. package/src/lib/demo/components/Question.js +0 -61
  115. package/src/lib/demo/components/Question.js.map +0 -1
  116. package/src/lib/demo/components/QuestionsList.d.ts +0 -6
  117. package/src/lib/demo/components/QuestionsList.js +0 -13
  118. package/src/lib/demo/components/QuestionsList.js.map +0 -1
  119. package/src/lib/demo/components/UserSummary.d.ts +0 -5
  120. package/src/lib/demo/components/UserSummary.js +0 -11
  121. package/src/lib/demo/components/UserSummary.js.map +0 -1
  122. package/src/lib/demo/components/index.d.ts +0 -5
  123. package/src/lib/demo/components/index.js +0 -6
  124. package/src/lib/demo/components/index.js.map +0 -1
  125. package/src/lib/demo/index.d.ts +0 -5
  126. package/src/lib/demo/index.js +0 -26
  127. package/src/lib/demo/index.js.map +0 -1
  128. package/src/lib/demo/styles.d.ts +0 -13
  129. package/src/lib/demo/styles.js +0 -14
  130. package/src/lib/demo/styles.js.map +0 -1
  131. package/src/lib/gamification/inapp/index.d.ts +0 -13
  132. package/src/lib/gamification/inapp/index.js +0 -12
  133. package/src/lib/gamification/inapp/index.js.map +0 -1
  134. package/src/lib/gamification/inapp/styles.d.ts +0 -37
  135. package/src/lib/gamification/inapp/styles.js +0 -74
  136. package/src/lib/gamification/inapp/styles.js.map +0 -1
  137. package/src/lib/gamification/login/index.d.ts +0 -7
  138. package/src/lib/gamification/login/index.js +0 -54
  139. package/src/lib/gamification/login/index.js.map +0 -1
  140. package/src/lib/gamification/login/styles.d.ts +0 -29
  141. package/src/lib/gamification/login/styles.js.map +0 -1
  142. package/src/lib/gamification/onboarding/index.d.ts +0 -6
  143. package/src/lib/gamification/onboarding/index.js +0 -4
  144. package/src/lib/gamification/onboarding/index.js.map +0 -1
  145. package/src/lib/gamification/onboarding/styles.d.ts +0 -21
  146. package/src/lib/gamification/onboarding/styles.js +0 -41
  147. package/src/lib/gamification/onboarding/styles.js.map +0 -1
  148. package/src/lib/gamification/question/index.d.ts +0 -5
  149. package/src/lib/gamification/question/index.js +0 -28
  150. package/src/lib/gamification/question/index.js.map +0 -1
  151. package/src/lib/gamification/question/styles.d.ts +0 -45
  152. package/src/lib/gamification/question/styles.js.map +0 -1
  153. package/src/lib/gamification/question-list/index.d.ts +0 -8
  154. package/src/lib/gamification/question-list/index.js +0 -7
  155. package/src/lib/gamification/question-list/index.js.map +0 -1
  156. package/src/lib/gamification/question-list/styles.d.ts +0 -13
  157. package/src/lib/gamification/question-list/styles.js.map +0 -1
  158. package/src/lib/gamification/user-statistics/components/rank/index.d.ts +0 -7
  159. package/src/lib/gamification/user-statistics/components/rank/index.js +0 -4
  160. package/src/lib/gamification/user-statistics/components/rank/index.js.map +0 -1
  161. package/src/lib/gamification/user-statistics/components/rank/styles.d.ts +0 -13
  162. package/src/lib/gamification/user-statistics/components/rank/styles.js.map +0 -1
  163. package/src/lib/gamification/user-statistics/components/statistics/index.d.ts +0 -7
  164. package/src/lib/gamification/user-statistics/components/statistics/index.js +0 -4
  165. package/src/lib/gamification/user-statistics/components/statistics/index.js.map +0 -1
  166. package/src/lib/gamification/user-statistics/components/statistics/styles.d.ts +0 -9
  167. package/src/lib/gamification/user-statistics/components/statistics/styles.js.map +0 -1
  168. package/src/lib/gamification/user-statistics/index.d.ts +0 -15
  169. package/src/lib/gamification/user-statistics/index.js +0 -14
  170. package/src/lib/gamification/user-statistics/index.js.map +0 -1
  171. package/src/lib/gamification/user-statistics/styles.d.ts +0 -57
  172. package/src/lib/gamification/user-statistics/styles.js.map +0 -1
  173. package/src/lib/gamification/vote/components/voting-header/components/points/index.d.ts +0 -6
  174. package/src/lib/gamification/vote/components/voting-header/components/points/index.js +0 -4
  175. package/src/lib/gamification/vote/components/voting-header/components/points/index.js.map +0 -1
  176. package/src/lib/gamification/vote/components/voting-header/components/points/styles.d.ts +0 -21
  177. package/src/lib/gamification/vote/components/voting-header/components/points/styles.js.map +0 -1
  178. package/src/lib/gamification/vote/components/voting-header/components/timer/index.d.ts +0 -8
  179. package/src/lib/gamification/vote/components/voting-header/components/timer/index.js +0 -19
  180. package/src/lib/gamification/vote/components/voting-header/components/timer/index.js.map +0 -1
  181. package/src/lib/gamification/vote/components/voting-header/components/timer/styles.d.ts +0 -7
  182. package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js +0 -6
  183. package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js.map +0 -1
  184. package/src/lib/gamification/vote/components/voting-header/index.d.ts +0 -12
  185. package/src/lib/gamification/vote/components/voting-header/index.js +0 -17
  186. package/src/lib/gamification/vote/components/voting-header/index.js.map +0 -1
  187. package/src/lib/gamification/vote/components/voting-header/styles.d.ts +0 -35
  188. package/src/lib/gamification/vote/components/voting-header/styles.js.map +0 -1
  189. package/src/lib/gamification/vote/components/voting-option/index.d.ts +0 -17
  190. package/src/lib/gamification/vote/components/voting-option/index.js +0 -14
  191. package/src/lib/gamification/vote/components/voting-option/index.js.map +0 -1
  192. package/src/lib/gamification/vote/components/voting-option/styles.d.ts +0 -49
  193. package/src/lib/gamification/vote/components/voting-option/styles.js +0 -85
  194. package/src/lib/gamification/vote/components/voting-option/styles.js.map +0 -1
  195. package/src/lib/gamification/vote/index.d.ts +0 -13
  196. package/src/lib/gamification/vote/index.js +0 -22
  197. package/src/lib/gamification/vote/index.js.map +0 -1
  198. package/src/lib/gamification/vote/styles.d.ts +0 -33
  199. package/src/lib/gamification/vote/styles.js.map +0 -1
  200. package/src/lib/theme/index.d.ts +0 -4
  201. package/src/lib/theme/index.js +0 -5
  202. package/src/lib/theme/index.js.map +0 -1
  203. package/src/lib/theme/theme.d.ts +0 -41
  204. package/src/lib/theme/theme.js +0 -35
  205. package/src/lib/theme/theme.js.map +0 -1
  206. package/src/utils/login.d.ts +0 -3
  207. package/src/utils/login.js +0 -28
  208. package/src/utils/login.js.map +0 -1
@@ -0,0 +1,36 @@
1
+ var n = Object.defineProperty;
2
+ var o = (s, t, e) => t in s ? n(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var r = (s, t, e) => (o(s, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { Storage as a } from "@streamlayer/sdk-web-storage";
5
+ class c extends a {
6
+ constructor() {
7
+ super("dev");
8
+ // Schema
9
+ r(this, "setSchema", (e) => {
10
+ this.write("schema", e);
11
+ });
12
+ r(this, "getSchema", () => this.read(
13
+ "schema"
14
+ /* SCHEMA */
15
+ ));
16
+ // Token
17
+ r(this, "setToken", (e) => {
18
+ this.write("token", e);
19
+ });
20
+ r(this, "getToken", () => this.read(
21
+ "token"
22
+ /* TOKEN */
23
+ ));
24
+ // Event
25
+ r(this, "setEvent", (e) => {
26
+ this.write("event", e);
27
+ });
28
+ r(this, "getEvent", () => this.read(
29
+ "event"
30
+ /* EVENT */
31
+ ));
32
+ }
33
+ }
34
+ export {
35
+ c as DeveloperStorage
36
+ };
@@ -0,0 +1,25 @@
1
+ import { StreamLayer as a } from "@streamlayer/sdk-web";
2
+ import { useState as i, useEffect as u } from "react";
3
+ const d = (t, r, n) => {
4
+ const [f, c] = i(null);
5
+ return u(() => {
6
+ let s = !1;
7
+ if (!t)
8
+ throw new Error("sdk key should be provided");
9
+ const o = a(t, n);
10
+ if (r)
11
+ for (const e of r)
12
+ o.use(e);
13
+ return o.ready().then((e) => {
14
+ s || c(e.sdk);
15
+ }).catch((e) => console.log(e)), () => {
16
+ s = !0, o.close(function(e) {
17
+ if (e)
18
+ throw e;
19
+ });
20
+ };
21
+ }, [t, n]), f;
22
+ };
23
+ export {
24
+ d as useStreamLayerApp
25
+ };
package/package.json CHANGED
@@ -1,38 +1,64 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.5.7",
3
+ "version": "0.22.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
- "typings": "./src/index.d.ts",
6
+ "typings": "./lib/index.d.ts",
7
7
  "exports": {
8
- "import": "./src/index.js",
9
- "default": "./src/index.js"
8
+ ".": {
9
+ "import": "./lib/index.js",
10
+ "default": "./lib/index.js",
11
+ "types": "./lib/index.d.js"
12
+ },
13
+ "./*": {
14
+ "import": "./lib/*/index.js",
15
+ "default": "./lib/*/index.js",
16
+ "types": "./lib/*/index.d.js"
17
+ }
10
18
  },
11
19
  "files": [
12
- "src/"
20
+ "lib/",
21
+ "package.json"
13
22
  ],
14
- "dependencies": {
15
- "@emotion/react": "11.11.1",
16
- "@emotion/styled": "11.11.0",
17
- "@streamlayer/feature-gamification": "*",
18
- "@streamlayer/sdk-web": "*",
19
- "@streamlayer/sdk-web-anonymous-auth": "*",
20
- "@streamlayer/sdk-web-core": "*",
21
- "@streamlayer/sdk-web-interfaces": "*",
22
- "@streamlayer/sdk-web-types": "*",
23
- "react": "18.2.0",
24
- "react-countdown-circle-timer": "^3.2.1",
25
- "react-digit-input": "^2.1.0",
26
- "react-dom": "18.2.0",
27
- "react-phone-number-input": "^3.3.6"
23
+ "peerDependencies": {
24
+ "@streamlayer/sl-eslib": "*",
25
+ "@streamlayer/feature-gamification": "^0.13.1",
26
+ "@streamlayer/sdk-web": "^0.24.0",
27
+ "@streamlayer/sdk-web-anonymous-auth": "^0.8.0",
28
+ "@streamlayer/sdk-web-core": "^0.9.0",
29
+ "@streamlayer/sdk-web-features": "^0.7.0",
30
+ "@streamlayer/sdk-web-api": "^0.17.0",
31
+ "@streamlayer/sdk-web-interfaces": "^0.16.1",
32
+ "@streamlayer/sdk-web-notifications": "^0.7.0",
33
+ "@streamlayer/sdk-web-storage": "^0.1.1",
34
+ "@streamlayer/sdk-web-types": "^0.1.0"
28
35
  },
29
36
  "devDependencies": {
37
+ "@connectrpc/connect": "^1.1.2",
38
+ "@connectrpc/connect-web": "^1.1.2",
39
+ "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
40
+ "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
41
+ "@linaria/babel-preset": "*",
42
+ "@linaria/core": "*",
43
+ "@linaria/esbuild": "*",
44
+ "@linaria/react": "*",
45
+ "@linaria/vite": "*",
30
46
  "@nanostores/react": "^0.7.1",
31
47
  "@storybook/addon-styling": "^1.3.7",
32
48
  "@storybook/jest": "~0.2.3",
33
49
  "@storybook/react": "^7.2.1",
34
50
  "@storybook/testing-library": "~0.2.0",
35
- "vite-svg-loader": "^4.0.0"
36
- },
37
- "module": "./src/index.js"
38
- }
51
+ "esbuild-plugin-babel": "^0.2.3",
52
+ "glob": "^10.3.10",
53
+ "react": "*",
54
+ "react-auth-code-input": "^3.2.1",
55
+ "react-countdown-circle-timer": "^3.2.1",
56
+ "react-phone-number-input": "^3.3.6",
57
+ "rollup-plugin-node-polyfills": "^0.2.1",
58
+ "tslib": "^2.6.2",
59
+ "vite": "~4.5.0",
60
+ "vite-plugin-node-polyfills": "^0.15.0",
61
+ "vite-svg-loader": "^4.0.0",
62
+ "vite-tsconfig-paths": "^4.2.1"
63
+ }
64
+ }
Binary file
@@ -1,7 +0,0 @@
1
- <svg width="68" height="22" viewBox="0 0 68 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Vector">
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M56.6155 7.44146H50.7066L56.3072 13.8615L50.7066 20.2805H56.4357L59.1587 17.137L61.9068 20.2805H67.84L62.19 13.8348L67.7636 7.44146H62.0606L59.3897 10.5602L56.6155 7.44146ZM62.2721 7.91659L59.3964 11.2747L56.4092 7.91659H51.7446L56.9307 13.8615L51.7447 19.8054H56.2257L59.1571 16.4213L62.1156 19.8054H66.7987L61.566 13.8357L66.7261 7.91659H62.2721Z" fill="white"/>
4
- <path fill-rule="evenodd" clip-rule="evenodd" d="M44.3635 7.44146V4.56406H50.7066V0.0559998H39.702V20.2805H50.7066V15.7601H44.3635V11.7794H50.7066V7.44146H44.3635ZM50.2408 7.91659H43.8978V4.08893H50.2408V0.531132H40.1678V19.8054H50.2408V16.2352H43.8978V11.3043H50.2408V7.91659Z" fill="white"/>
5
- <path d="M35.06 0.0559998V8.33281H35.0087C33.9803 7.12787 32.6966 6.70881 31.207 6.70881C28.1552 6.70881 25.8561 8.826 25.0493 11.6236C24.128 8.54092 21.7544 6.65084 18.2349 6.65084C15.3769 6.65084 13.1197 7.95936 11.9422 10.0918V7.44146H6.03416V4.56406H12.4815V0.0559998H0.768005V20.2805H6.03416V11.7794H11.2836C11.127 12.4037 11.0432 13.0727 11.0432 13.7788C11.0432 17.997 14.2031 20.958 18.2349 20.958C21.6258 20.958 23.8607 19.334 25.0419 16.374H20.5284C19.9183 17.2644 19.4553 17.5276 18.2349 17.5276C16.8199 17.5276 15.5995 16.2685 15.5995 14.7756H24.7894C25.1881 18.1262 27.7472 21.016 31.2582 21.016C32.773 21.016 34.1601 20.2558 35.0078 18.9729H35.059V20.2824H39.701L39.702 0.0559998H35.06ZM15.7467 11.8393C16.0392 10.5545 17.0164 9.71545 18.2358 9.71545C19.5782 9.71545 20.5051 10.5289 20.7492 11.8393C20.8517 11.8393 15.7467 11.8393 15.7467 11.8393ZM32.242 17.2016C30.5307 17.2016 29.4668 15.5748 29.4668 13.8767C29.4668 12.0617 30.3919 10.316 32.242 10.316C34.1601 10.316 34.924 12.0617 34.924 13.8767C34.924 15.5976 34.1144 17.2016 32.242 17.2016Z" fill="white"/>
6
- </g>
7
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Check">
3
- <path id="Vector" d="M13.4315 3.18246L5.53321 11.0808L1.99771 7.54527C1.54056 7.08811 0.799913 7.08811 0.342864 7.54527C-0.114288 8.00242 -0.114288 8.74307 0.342864 9.20011L4.70567 13.5629C4.93331 13.7906 5.23415 13.9063 5.53307 13.9063C5.83202 13.9063 6.13096 13.7924 6.36048 13.5629L15.0861 4.83731C15.5432 4.38016 15.5432 3.63951 15.0861 3.18246C14.629 2.72531 13.8884 2.72531 13.4312 3.18246H13.4315Z" fill="#00BD60"/>
4
- </g>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Checkmark">
3
- <path id="Selected" fill-rule="evenodd" clip-rule="evenodd" d="M24 12.002C24 18.6294 18.6274 24.002 12 24.002C5.37258 24.002 0 18.6294 0 12.002C0 5.37454 5.37258 0.00195312 12 0.00195312C18.6274 0.00195312 24 5.37454 24 12.002ZM17.4086 8.15357C16.94 7.68494 16.1802 7.68494 15.7116 8.15357L10.4072 14.9579L7.62573 13.1036C7.07429 12.736 6.32925 12.885 5.96163 13.4365C5.59401 13.9879 5.74301 14.7329 6.29445 15.1006L9.89445 17.5006C10.3704 17.8179 11.0041 17.7551 11.4086 17.3506L17.4086 9.85063C17.8772 9.382 17.8772 8.6222 17.4086 8.15357Z" fill="#FFFFFF"/>
4
- </g>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Checkmark">
3
- <path id="Selected" fill-rule="evenodd" clip-rule="evenodd" d="M24 12.002C24 18.6294 18.6274 24.002 12 24.002C5.37258 24.002 0 18.6294 0 12.002C0 5.37454 5.37258 0.00195312 12 0.00195312C18.6274 0.00195312 24 5.37454 24 12.002ZM17.4086 8.15357C16.94 7.68494 16.1802 7.68494 15.7116 8.15357L10.4072 14.9579L7.62573 13.1036C7.07429 12.736 6.32925 12.885 5.96163 13.4365C5.59401 13.9879 5.74301 14.7329 6.29445 15.1006L9.89445 17.5006C10.3704 17.8179 11.0041 17.7551 11.4086 17.3506L17.4086 9.85063C17.8772 9.382 17.8772 8.6222 17.4086 8.15357Z" fill="#00BD60"/>
4
- </g>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Chevron">
3
- <path id="Chevron_2" d="M12 8.17222C12 8.28783 11.9781 8.39553 11.9342 8.49533C11.8903 8.59513 11.822 8.68992 11.7292 8.7797L6.36949 13.9439C6.21462 14.0965 6.02742 14.1729 5.80787 14.1729C5.65752 14.1729 5.52191 14.1379 5.40104 14.0679C5.28016 13.998 5.1831 13.9039 5.10986 13.7856C5.03662 13.6673 5 13.5345 5 13.3873C5 13.1721 5.08288 12.9818 5.24863 12.8164L10.0807 8.17095L5.24863 3.52799C5.08288 3.36425 5 3.17439 5 2.95841C5 2.81118 5.03662 2.67842 5.10986 2.56013C5.1831 2.44183 5.28016 2.34771 5.40104 2.27777C5.52191 2.20782 5.65752 2.17285 5.80787 2.17285C6.02742 2.17285 6.21462 2.24731 6.36949 2.39624L11.7292 7.56473C11.8211 7.65451 11.889 7.74909 11.9329 7.84846C11.9768 7.94784 11.9991 8.05576 12 8.17222Z" fill="#FFFFFF"/>
4
- </g>
5
- </svg>
@@ -1,4 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 -2.43189e-06C18.6274 -2.72158e-06 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 8.1423e-07 18.6274 5.24537e-07 12C2.34843e-07 5.37258 5.37258 -2.14219e-06 12 -2.43189e-06ZM11.9999 22.5883C17.8476 22.5883 22.5881 17.8478 22.5881 12.0001C22.5881 6.15238 17.8476 1.41187 11.9999 1.41187C6.15217 1.41187 1.41166 6.15239 1.41166 12.0001C1.41166 17.8478 6.15217 22.5883 11.9999 22.5883Z" fill="white"/>
3
- <path d="M10.8547 7.5429C10.524 7.23657 10.0131 7.23657 9.68243 7.5429C9.31416 7.88401 9.31384 8.46633 9.68174 8.80784L13.1206 12L9.68175 15.1922C9.31384 15.5337 9.31416 16.116 9.68243 16.4571C10.0131 16.7634 10.524 16.7634 10.8547 16.4571L14.9802 12.6358C15.3505 12.2928 15.3505 11.7072 14.9802 11.3642L10.8547 7.5429Z" fill="white"/>
4
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect y="0.00195312" width="24" height="24" rx="12" fill="#F80022"/>
3
- <rect x="8.25" y="7.00195" width="12.3744" height="1.76777" rx="0.883884" transform="rotate(45 8.25 7.00195)" fill="white"/>
4
- <rect x="7" y="15.752" width="12.3744" height="1.76777" rx="0.883884" transform="rotate(-45 7 15.752)" fill="white"/>
5
- </svg>
@@ -1,6 +0,0 @@
1
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Group 465">
3
- <rect id="Rectangle 368" x="2" y="0.506104" width="16.4992" height="2.35702" rx="1.17851" transform="rotate(45 2 0.506104)" fill="#9e0a1f"/>
4
- <rect id="Rectangle 369" x="0.333008" y="12.1729" width="16.4992" height="2.35702" rx="1.17851" transform="rotate(-45 0.333008 12.1729)" fill="#9e0a1f"/>
5
- </g>
6
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="24" height="24" rx="12" fill="white" fill-opacity="0.1"/>
3
- <rect x="8.25" y="7" width="12.3744" height="1.76777" rx="0.883884" transform="rotate(45 8.25 7)" fill="white"/>
4
- <rect x="7" y="15.75" width="12.3744" height="1.76777" rx="0.883884" transform="rotate(-45 7 15.75)" fill="white"/>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Poll">
3
- <path id="Notification/Icon/Poll" fill-rule="evenodd" clip-rule="evenodd" d="M9.7778 1.68421V5.05263H13.3333C13.8243 5.05263 14.2222 4.67561 14.2222 4.21053V2.52632C14.2222 2.06123 13.8243 1.68421 13.3333 1.68421H9.7778ZM2.66667 0C1.19391 0 0 1.13107 0 2.52632V4.21053C0 5.60577 1.19391 6.73684 2.66667 6.73684H13.3333C14.8061 6.73684 16 5.60577 16 4.21053V2.52632C16 1.13107 14.8061 0 13.3333 0H2.66667ZM4.44446 10.9473H13.3333C13.8243 10.9473 14.2222 11.3243 14.2222 11.7894V13.4736C14.2222 13.9387 13.8243 14.3157 13.3333 14.3157H4.44446V10.9473ZM0 11.7894C0 10.3942 1.19391 9.2631 2.66667 9.2631H13.3333C14.8061 9.2631 16 10.3942 16 11.7894V13.4736C16 14.8689 14.8061 15.9999 13.3333 15.9999H2.66667C1.19391 15.9999 0 14.8689 0 13.4736V11.7894Z" fill="white" fill-opacity="0.5"/>
4
- </g>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Icon/Notification/Prediciton">
3
- <path id="Icon/Prediction" fill-rule="evenodd" clip-rule="evenodd" d="M16 7.00522C16 7.00522 9.20048 6.81607 9.20048 0C9.20048 6.36168 3.27729 6.95056 2.48756 7.00078L2.40094 7.00522C2.40094 7.00522 9.20048 7.19435 9.20048 14.0104C9.20048 7.64877 15.1234 7.05989 15.9131 7.00964L16 7.00522ZM6.97382 12.5652C6.97382 12.5652 3.48691 12.4724 3.48691 9.13033C3.48691 12.2496 0.449402 12.5384 0.0444186 12.563L0 12.5652C0 12.5652 3.48691 12.6579 3.48691 16C3.48691 12.8807 6.52429 12.592 6.92927 12.5673L6.97382 12.5652Z" fill="white" fill-opacity="0.5"/>
4
- </g>
5
- </svg>
@@ -1,3 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">
2
- <path d="M5.5 2.78867V12.4137C5.5 13.1729 4.88426 13.75 4.125 13.75H1.375C0.615742 13.75 0 13.1343 0 12.4137V2.82734C0 2.06808 0.615742 1.49102 1.375 1.49102H4.125C4.88555 1.41367 5.5 1.99375 5.5 2.78867ZM22 12.3707C22 13.5094 21.077 14.4323 19.9375 14.4323H13.6426C14.621 16.0613 15.1259 17.9077 15.1259 18.5582C15.125 19.5714 14.3301 20.625 12.998 20.625C10.2854 20.625 11.8654 17.3529 8.34883 14.5406L7.64844 13.982C7.14141 13.5738 6.88359 12.9766 6.8793 12.375C6.87829 12.374 6.8793 12.375 6.8793 12.375L6.875 5.5C6.875 4.85117 7.18064 4.23973 7.7 3.85043L9.16695 2.75086C10.3555 1.85625 11.8035 1.375 13.2902 1.375H15.8125C16.952 1.375 17.875 2.29754 17.875 3.43664C17.875 3.59283 17.8544 3.74357 17.8215 3.88996C18.6484 4.15937 19.25 4.92422 19.25 5.84375C19.25 6.23683 19.1341 6.60043 18.9432 6.91281C19.8988 7.08984 20.625 7.92773 20.625 8.9332C20.625 9.47031 20.4148 9.955 20.0784 10.322C21.1492 10.3941 22 11.2793 22 12.3707Z" fill="white"/>
3
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Icon/Notification/Trivia">
3
- <path id="Notification/Icon/Trivia" fill-rule="evenodd" clip-rule="evenodd" d="M2.01663 1.3808C0.739913 1.55586 -0.153153 2.73276 0.021912 4.00948L1.3808 13.9196C1.55586 15.1963 2.73276 16.0894 4.00948 15.9143L13.9196 14.5554C15.1963 14.3803 16.0894 13.2034 15.9143 11.9267L14.5554 2.01663C14.3803 0.739913 13.2034 -0.153153 11.9267 0.021912L2.01663 1.3808ZM9.59613 3.788C9.11431 3.46991 8.47813 3.30151 7.7566 3.30151C7.54377 3.30151 7.32625 3.31671 7.10872 3.34478C6.38836 3.44067 5.68901 3.79034 5.18965 4.30138C4.68445 4.82062 4.4377 5.45563 4.51722 6.04151C4.57452 6.4742 4.90078 6.7537 5.34635 6.7537C5.39429 6.7537 5.44341 6.7502 5.49136 6.74435C6.08778 6.66483 6.21642 6.25436 6.34036 5.85675L6.34045 5.85648C6.48192 5.40401 6.61534 4.97731 7.38585 4.87444C7.46537 4.86391 7.54138 4.85806 7.61506 4.85806C8.16939 4.85806 8.51436 5.15042 8.58454 5.68252C8.65353 6.20293 8.24307 6.61807 7.80684 7.0566L7.80393 7.05954C7.31582 7.55231 6.7639 8.1095 6.86895 8.90083C6.89585 9.10548 6.9859 9.29493 7.12272 9.43644C7.27826 9.599 7.4829 9.68436 7.71331 9.68436C7.75541 9.68436 7.79868 9.68203 7.84311 9.67618C8.46691 9.59324 8.55162 9.23139 8.63338 8.8821L8.63365 8.88097L8.63661 8.86859C8.66723 8.7403 8.69877 8.60813 8.75995 8.48804C8.84649 8.31613 9.06283 8.11265 9.31428 7.87875C9.9142 7.31858 10.734 6.55143 10.582 5.41589C10.4872 4.70603 10.1551 4.15757 9.59611 3.78802L9.59613 3.788ZM8.11605 10.28C8.06927 10.28 8.02132 10.2836 7.97454 10.2894C7.38396 10.3689 6.96765 10.9127 7.04599 11.5033C7.11733 12.0377 7.57808 12.4412 8.1172 12.4412C8.16397 12.4412 8.21192 12.4377 8.25987 12.4318C8.85045 12.3523 9.2656 11.8085 9.18842 11.2179C9.11591 10.6823 8.65517 10.28 8.11605 10.28Z" fill="white" fill-opacity="0.5"/>
4
- </g>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Trophy">
3
- <path id="Combined Shape" fill-rule="evenodd" clip-rule="evenodd" d="M2.76916 3.50002C2.76916 4.49786 2.94705 5.38348 3.30282 6.15692C2.62493 6.01847 2.05883 5.74872 1.6045 5.34768C1.15017 4.94663 0.923008 4.55992 0.923008 4.18752V3.50002H2.76916ZM11.0768 3.50002V4.18752C11.0768 4.55992 10.8497 4.94663 10.3953 5.34768C9.941 5.74872 9.3749 6.01847 8.69701 6.15692C9.05278 5.38348 9.23066 4.49786 9.23066 3.50002H11.0768ZM12 4.1875V3.27083C12 3.07986 11.9327 2.91754 11.7981 2.78385C11.6635 2.65017 11.5 2.58333 11.3077 2.58333H9.23077V1.89583C9.23077 1.58073 9.11779 1.31098 8.89183 1.08659C8.66586 0.862195 8.39423 0.75 8.07692 0.75H3.92308C3.60577 0.75 3.33414 0.862195 3.10817 1.08659C2.88221 1.31098 2.76923 1.58073 2.76923 1.89583V2.58333H0.692308C0.499999 2.58333 0.336539 2.65017 0.201923 2.78385C0.067307 2.91754 0 3.07986 0 3.27083V4.1875C0 4.52648 0.0997586 4.86784 0.299279 5.21159C0.498799 5.55534 0.768027 5.86567 1.10697 6.14258C1.44592 6.41949 1.86178 6.65223 2.35457 6.84082C2.84736 7.02941 3.36538 7.13563 3.90865 7.15951C4.11058 7.41732 4.33894 7.6441 4.59375 7.83984C4.77644 8.00217 4.90264 8.17524 4.97236 8.35905C5.04207 8.54286 5.07692 8.75651 5.07692 9C5.07692 9.25781 5.00361 9.47504 4.85697 9.65169C4.71034 9.82834 4.47596 9.91667 4.15385 9.91667C3.79327 9.91667 3.47236 10.0253 3.19111 10.2425C2.90985 10.4597 2.76923 10.7331 2.76923 11.0625V11.5208C2.76923 11.5877 2.79087 11.6426 2.83413 11.6855C2.8774 11.7285 2.93269 11.75 3 11.75H9C9.06731 11.75 9.1226 11.7285 9.16586 11.6855C9.20913 11.6426 9.23077 11.5877 9.23077 11.5208V11.0625C9.23077 10.7331 9.09015 10.4597 8.80889 10.2425C8.52764 10.0253 8.20673 9.91667 7.84615 9.91667C7.52404 9.91667 7.28966 9.82834 7.14303 9.65169C6.99639 9.47504 6.92308 9.25781 6.92308 9C6.92308 8.75651 6.95793 8.54286 7.02764 8.35905C7.09736 8.17524 7.22356 8.00217 7.40625 7.83984C7.66106 7.6441 7.88942 7.41732 8.09135 7.15951C8.63462 7.13563 9.15264 7.02941 9.64543 6.84082C10.1382 6.65223 10.5541 6.41949 10.893 6.14258C11.232 5.86567 11.5012 5.55534 11.7007 5.21159C11.9002 4.86784 12 4.52648 12 4.1875ZM5.07033 5.38491L6.0383 4.87503L7.00627 5.38491L6.8214 4.30497L7.60451 3.54016L6.52228 3.3826L6.0383 2.40003L5.55431 3.3826L4.47209 3.54016L5.25519 4.30497L5.07033 5.38491Z" fill="white"/>
4
- </g>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Trophy">
3
- <path id="Combined Shape" fill-rule="evenodd" clip-rule="evenodd" d="M2.76916 3.50002C2.76916 4.49786 2.94705 5.38348 3.30282 6.15692C2.62493 6.01847 2.05883 5.74872 1.6045 5.34768C1.15017 4.94663 0.923008 4.55992 0.923008 4.18752V3.50002H2.76916ZM11.0768 3.50002V4.18752C11.0768 4.55992 10.8497 4.94663 10.3953 5.34768C9.941 5.74872 9.3749 6.01847 8.69701 6.15692C9.05278 5.38348 9.23066 4.49786 9.23066 3.50002H11.0768ZM12 4.1875V3.27083C12 3.07986 11.9327 2.91754 11.7981 2.78385C11.6635 2.65017 11.5 2.58333 11.3077 2.58333H9.23077V1.89583C9.23077 1.58073 9.11779 1.31098 8.89183 1.08659C8.66586 0.862195 8.39423 0.75 8.07692 0.75H3.92308C3.60577 0.75 3.33414 0.862195 3.10817 1.08659C2.88221 1.31098 2.76923 1.58073 2.76923 1.89583V2.58333H0.692308C0.499999 2.58333 0.336539 2.65017 0.201923 2.78385C0.067307 2.91754 0 3.07986 0 3.27083V4.1875C0 4.52648 0.0997586 4.86784 0.299279 5.21159C0.498799 5.55534 0.768027 5.86567 1.10697 6.14258C1.44592 6.41949 1.86178 6.65223 2.35457 6.84082C2.84736 7.02941 3.36538 7.13563 3.90865 7.15951C4.11058 7.41732 4.33894 7.6441 4.59375 7.83984C4.77644 8.00217 4.90264 8.17524 4.97236 8.35905C5.04207 8.54286 5.07692 8.75651 5.07692 9C5.07692 9.25781 5.00361 9.47504 4.85697 9.65169C4.71034 9.82834 4.47596 9.91667 4.15385 9.91667C3.79327 9.91667 3.47236 10.0253 3.19111 10.2425C2.90985 10.4597 2.76923 10.7331 2.76923 11.0625V11.5208C2.76923 11.5877 2.79087 11.6426 2.83413 11.6855C2.8774 11.7285 2.93269 11.75 3 11.75H9C9.06731 11.75 9.1226 11.7285 9.16586 11.6855C9.20913 11.6426 9.23077 11.5877 9.23077 11.5208V11.0625C9.23077 10.7331 9.09015 10.4597 8.80889 10.2425C8.52764 10.0253 8.20673 9.91667 7.84615 9.91667C7.52404 9.91667 7.28966 9.82834 7.14303 9.65169C6.99639 9.47504 6.92308 9.25781 6.92308 9C6.92308 8.75651 6.95793 8.54286 7.02764 8.35905C7.09736 8.17524 7.22356 8.00217 7.40625 7.83984C7.66106 7.6441 7.88942 7.41732 8.09135 7.15951C8.63462 7.13563 9.15264 7.02941 9.64543 6.84082C10.1382 6.65223 10.5541 6.41949 10.893 6.14258C11.232 5.86567 11.5012 5.55534 11.7007 5.21159C11.9002 4.86784 12 4.52648 12 4.1875ZM5.07033 5.38491L6.0383 4.87503L7.00627 5.38491L6.8214 4.30497L7.60451 3.54016L6.52228 3.3826L6.0383 2.40003L5.55431 3.3826L4.47209 3.54016L5.25519 4.30497L5.07033 5.38491Z" fill="#F2C94C"/>
4
- </g>
5
- </svg>
package/src/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from './lib/gamification/inapp';
2
- export * from './lib/gamification/login';
3
- export * from './lib/gamification/onboarding';
4
- export * from './lib/gamification/question';
5
- export * from './lib/gamification/question-list';
6
- export * from './lib/gamification/user-statistics';
7
- export * from './lib/gamification/vote';
8
- export * from './lib/demo';
9
- export * from './lib/theme';
10
- export * from './lib/theme/theme';
package/src/index.js DELETED
@@ -1,11 +0,0 @@
1
- export * from './lib/gamification/inapp';
2
- export * from './lib/gamification/login';
3
- export * from './lib/gamification/onboarding';
4
- export * from './lib/gamification/question';
5
- export * from './lib/gamification/question-list';
6
- export * from './lib/gamification/user-statistics';
7
- export * from './lib/gamification/vote';
8
- export * from './lib/demo';
9
- export * from './lib/theme';
10
- export * from './lib/theme/theme';
11
- //# sourceMappingURL=index.js.map
package/src/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/react-ui/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,oCAAoC,CAAA;AAClD,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA"}
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import type { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
- import type { Gamification } from '@streamlayer/feature-gamification';
4
- export declare const GamificationComponent: React.FC<{
5
- gamification: Gamification;
6
- sdk: StreamLayerSDK;
7
- }>;
@@ -1,30 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import { useStore } from '@nanostores/react';
3
- import { UserSummary, QuestionsList, Question, Notifications, InPlayGame } from './components';
4
- import { DemoContainer, DemoContainerNotifications, UserStatisticsContainer } from './styles';
5
- export const GamificationComponent = ({ gamification, sdk, }) => {
6
- const onbordingComplete = useStore(gamification.onbordingComplete);
7
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
- // @ts-ignore
9
- const { slStreamId } = useStore(sdk.sdkStore);
10
- if (slStreamId?.loading) {
11
- return (_jsx(DemoContainer, { children: _jsx("div", { children: "Event is loading" }) }));
12
- }
13
- if (!slStreamId?.data) {
14
- return (_jsx(DemoContainer, { children: _jsx("div", { children: "Event is forbidden" }) }));
15
- }
16
- if (!onbordingComplete) {
17
- return (_jsx(DemoContainer, { children: _jsx(InPlayGame, { action: gamification.submitInplay }) }));
18
- }
19
- const openQuestion = (questionId) => {
20
- gamification.openQuestion(questionId);
21
- };
22
- const closeQuestion = () => {
23
- gamification.closeQuestion();
24
- };
25
- const vote = (questionId, answerId) => {
26
- void gamification.submitAnswer(questionId, answerId);
27
- };
28
- return (_jsxs(DemoContainer, { children: [_jsx(DemoContainerNotifications, { children: _jsx(Notifications, { notificationsStore: sdk.getNotificationsStore(), openQuestion: openQuestion }) }), _jsx(UserStatisticsContainer, { children: gamification.userSummary && _jsx(UserSummary, { store: gamification.userSummary.getStore() }) }), gamification.questions && (_jsx(QuestionsList, { openQuestion: openQuestion, store: gamification.questions.getStore() })), gamification.openedQuestion && (_jsx(Question, { closeQuestion: closeQuestion, vote: vote, store: gamification.openedQuestion.getStore() }))] }));
29
- };
30
- //# sourceMappingURL=Gamification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gamification.js","sourceRoot":"","sources":["../../../../../../packages/react-ui/src/lib/demo/Gamification.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9F,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAE7F,MAAM,CAAC,MAAM,qBAAqB,GAAkE,CAAC,EACnG,YAAY,EACZ,GAAG,GACJ,EAAE,EAAE;IACH,MAAM,iBAAiB,GAAG,QAAQ,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;IAClE,6DAA6D;IAC7D,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAE7C,IAAI,UAAU,EAAE,OAAO,EAAE;QACvB,OAAO,CACL,KAAC,aAAa,cACZ,6CAA2B,GACb,CACjB,CAAA;KACF;IAED,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE;QACrB,OAAO,CACL,KAAC,aAAa,cACZ,+CAA6B,GACf,CACjB,CAAA;KACF;IAED,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,CACL,KAAC,aAAa,cACZ,KAAC,UAAU,IAAC,MAAM,EAAE,YAAY,CAAC,YAAY,GAAI,GACnC,CACjB,CAAA;KACF;IAED,MAAM,YAAY,GAAG,CAAC,UAAkB,EAAE,EAAE;QAC1C,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;IACvC,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,YAAY,CAAC,aAAa,EAAE,CAAA;IAC9B,CAAC,CAAA;IAED,MAAM,IAAI,GAAG,CAAC,UAAkB,EAAE,QAAgB,EAAE,EAAE;QACpD,KAAK,YAAY,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;IACtD,CAAC,CAAA;IAED,OAAO,CACL,MAAC,aAAa,eACZ,KAAC,0BAA0B,cACzB,KAAC,aAAa,IAAC,kBAAkB,EAAE,GAAG,CAAC,qBAAqB,EAAE,EAAE,YAAY,EAAE,YAAY,GAAI,GACnE,EAC7B,KAAC,uBAAuB,cACrB,YAAY,CAAC,WAAW,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,YAAY,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAI,GAChE,EACzB,YAAY,CAAC,SAAS,IAAI,CACzB,KAAC,aAAa,IAAC,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAI,CACxF,EACA,YAAY,CAAC,cAAc,IAAI,CAC9B,KAAC,QAAQ,IAAC,aAAa,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAI,CACtG,IACa,CACjB,CAAA;AACH,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
- export declare const LoginComponent: React.FC<{
4
- sdk: StreamLayerSDK;
5
- }>;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { Login } from '../gamification/login';
3
- export const LoginComponent = ({ sdk }) => {
4
- const login = async (token) => {
5
- try {
6
- await sdk.authorizationBypass('streamlayer:streamlayer', token);
7
- }
8
- catch (err) {
9
- console.log('login err', err);
10
- throw err;
11
- }
12
- };
13
- return _jsx(Login, { login: login, anonymousLogin: sdk.anonymousAuthorization, host: sdk.host });
14
- };
15
- //# sourceMappingURL=Login.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Login.js","sourceRoot":"","sources":["../../../../../../packages/react-ui/src/lib/demo/Login.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAsC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IAC3E,MAAM,KAAK,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE;QACpC,IAAI;YACF,MAAM,GAAG,CAAC,mBAAmB,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAA;SAChE;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAA;YAE7B,MAAM,GAAG,CAAA;SACV;IACH,CAAC,CAAA;IAED,OAAO,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,GAAI,CAAA;AAC5F,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- type InPlayGameType = {
3
- action: () => void;
4
- };
5
- export declare const InPlayGame: React.FC<InPlayGameType>;
6
- export {};
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { Onboarding } from '../../gamification/onboarding';
3
- export const InPlayGame = ({ action }) => {
4
- return _jsx(Onboarding, { action: action });
5
- };
6
- //# sourceMappingURL=InPlayGame.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InPlayGame.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/demo/components/InPlayGame.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAM1D,MAAM,CAAC,MAAM,UAAU,GAA6B,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IACjE,OAAO,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,GAAI,CAAA;AACvC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { NotificationsStore } from '@streamlayer/sdk-web-core/notifications';
3
- export declare const Notifications: React.FC<{
4
- notificationsStore: NotificationsStore;
5
- openQuestion: (questionId: string) => void;
6
- }>;
@@ -1,37 +0,0 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { useStore } from '@nanostores/react';
3
- import { useEffect, useRef, useState } from 'react';
4
- import { InApp } from '../../gamification/inapp';
5
- export const Notifications = ({ notificationsStore, openQuestion }) => {
6
- const timeout = useRef();
7
- const [lastNotification, setLastNotification] = useState();
8
- const notifications = useStore(notificationsStore);
9
- useEffect(() => {
10
- if (notifications) {
11
- setLastNotification(notifications[notifications.length - 1]?.data);
12
- timeout.current = setTimeout(() => {
13
- setLastNotification(undefined);
14
- }, 5000);
15
- }
16
- return () => {
17
- if (timeout.current) {
18
- clearTimeout(timeout.current);
19
- }
20
- };
21
- }, [notifications]);
22
- if (!lastNotification?.question || !lastNotification?.notification) {
23
- return null;
24
- }
25
- const closeInApp = () => {
26
- if (timeout.current) {
27
- clearTimeout(timeout.current);
28
- }
29
- setLastNotification(undefined);
30
- };
31
- const openVoiting = () => {
32
- closeInApp();
33
- openQuestion(lastNotification.question.id);
34
- };
35
- return (_jsx(InApp, { openVoiting: openVoiting, closeInApp: closeInApp, title: lastNotification.notification.title, icon: lastNotification.notification.image, color: lastNotification.notification.indicatorColor }));
36
- };
37
- //# sourceMappingURL=Notifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Notifications.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/demo/components/Notifications.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,MAAM,CAAC,MAAM,aAAa,GAGrB,CAAC,EAAE,kBAAkB,EAAE,YAAY,EAAE,EAAE,EAAE;IAC5C,MAAM,OAAO,GAAG,MAAM,EAAkB,CAAA;IACxC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,EAAoC,CAAA;IAE5F,MAAM,aAAa,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAA;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,aAAa,EAAE;YACjB,mBAAmB,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;YAElE,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAChC,mBAAmB,CAAC,SAAS,CAAC,CAAA;YAChC,CAAC,EAAE,IAAI,CAAC,CAAA;SACT;QAED,OAAO,GAAG,EAAE;YACV,IAAI,OAAO,CAAC,OAAO,EAAE;gBACnB,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;aAC9B;QACH,CAAC,CAAA;IACH,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAA;IAEnB,IAAI,CAAC,gBAAgB,EAAE,QAAQ,IAAI,CAAC,gBAAgB,EAAE,YAAY,EAAE;QAClE,OAAO,IAAI,CAAA;KACZ;IAED,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,IAAI,OAAO,CAAC,OAAO,EAAE;YACnB,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;SAC9B;QAED,mBAAmB,CAAC,SAAS,CAAC,CAAA;IAChC,CAAC,CAAA;IAED,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,UAAU,EAAE,CAAA;QACZ,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IAC5C,CAAC,CAAA;IAED,OAAO,CACL,KAAC,KAAK,IACJ,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,gBAAgB,CAAC,YAAY,CAAC,KAAK,EAC1C,IAAI,EAAE,gBAAgB,CAAC,YAAY,CAAC,KAAK,EACzC,KAAK,EAAE,gBAAgB,CAAC,YAAY,CAAC,cAAc,GACnD,CACH,CAAA;AACH,CAAC,CAAA"}
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Gamification } from '@streamlayer/feature-gamification';
3
- export declare const Question: React.FC<{
4
- store: ReturnType<Exclude<Gamification['openedQuestion'], undefined>['getStore']>;
5
- closeQuestion: () => void;
6
- vote: (questionId: string, answerId: string) => void;
7
- }>;
@@ -1,61 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
2
- import styled from '@emotion/styled';
3
- import { useStore } from '@nanostores/react';
4
- import { useState, useCallback, useMemo } from 'react';
5
- import { Vote } from '../../gamification/vote';
6
- import { VotingHeader } from '../../gamification/vote/components/voting-header';
7
- import iconSponsorship from '../../../assets/icons/fedex.svg';
8
- const QuestionContainer = styled.div `
9
- position: absolute;
10
- top: 0;
11
- background: ${(props) => props.theme.COLORS.BG_TRANSPARENT_ITEM};
12
- width: 100%;
13
- height: 100%;
14
-
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- flex-direction: column;
19
-
20
- > div {
21
- width: 100%;
22
- background: #000;
23
- animation: slidein 0.3s ease-in;
24
- }
25
-
26
- @keyframes slidein {
27
- from {
28
- transform: translateX(-100%);
29
- }
30
-
31
- to {
32
- transform: translateX(0);
33
- }
34
- }
35
- `;
36
- export const Question = ({ store, closeQuestion, vote }) => {
37
- const { data: openedQuestion } = useStore(store);
38
- const [answerTimeExpired, setAnswerTimeExpired] = useState(false);
39
- const setTimeToExpire = useCallback((flag) => {
40
- setAnswerTimeExpired(flag);
41
- }, [setAnswerTimeExpired]);
42
- const questionAnswered = useMemo(() => openedQuestion?.answers.find((answer) => answer.youVoted === true), [openedQuestion]);
43
- const hasCorrectAnswer = useMemo(() => !!openedQuestion?.answers.find((answer) => answer.correct === true), [openedQuestion]);
44
- if (!openedQuestion) {
45
- return null;
46
- }
47
- return (_jsx(QuestionContainer, { children: _jsxs("div", { children: [_jsx(VotingHeader, { points: questionAnswered?.points || 0, questionAnswered: !!questionAnswered, questionAnsweredCorrectly: questionAnswered?.correct, logo: iconSponsorship, closeQuestion: closeQuestion, setTimeToExpire: setTimeToExpire, questionType: openedQuestion.type }), _jsx("div", { children: _jsx(Vote, { title: openedQuestion.subject, feedbackMessages: openedQuestion.options?.options.value, questionType: openedQuestion.type, questionId: openedQuestion.id, questionAnswered: !!questionAnswered, questionAnsweredCorrectly: questionAnswered?.correct, options: openedQuestion.answers.map((answer) => ({
48
- id: answer.id,
49
- title: answer.text,
50
- icon: answer.icon,
51
- type: openedQuestion.type,
52
- correct: answer.correct,
53
- percentage: answer.percentage,
54
- answered: answer.youVoted,
55
- disabled: !!questionAnswered || openedQuestion.marketClosed || answerTimeExpired,
56
- questionAnswered: !!questionAnswered,
57
- hasCorrectAnswer,
58
- onVote: vote,
59
- })) }) })] }) }));
60
- };
61
- //# sourceMappingURL=Question.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/demo/components/Question.tsx"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAA;AAC/E,OAAO,eAAe,MAAM,iCAAiC,CAAA;AAE7D,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA;;;gBAGpB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;CAwBhE,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAIhB,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE;IACtC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAChD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEjE,MAAM,eAAe,GAAG,WAAW,CACjC,CAAC,IAAa,EAAE,EAAE;QAChB,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,EACD,CAAC,oBAAoB,CAAC,CACvB,CAAA;IAED,MAAM,gBAAgB,GAAG,OAAO,CAC9B,GAAG,EAAE,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC,EACxE,CAAC,cAAc,CAAC,CACjB,CAAA;IACD,MAAM,gBAAgB,GAAG,OAAO,CAC9B,GAAG,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,EACzE,CAAC,cAAc,CAAC,CACjB,CAAA;IAED,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL,KAAC,iBAAiB,cAChB,0BACE,KAAC,YAAY,IACX,MAAM,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC,EACrC,gBAAgB,EAAE,CAAC,CAAC,gBAAgB,EACpC,yBAAyB,EAAE,gBAAgB,EAAE,OAAO,EACpD,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,YAAY,EAAE,cAAc,CAAC,IAAI,GACjC,EACF,wBACE,KAAC,IAAI,IACH,KAAK,EAAE,cAAc,CAAC,OAAO,EAC7B,gBAAgB,EAAE,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EACvD,YAAY,EAAE,cAAc,CAAC,IAAI,EACjC,UAAU,EAAE,cAAc,CAAC,EAAE,EAC7B,gBAAgB,EAAE,CAAC,CAAC,gBAAgB,EACpC,yBAAyB,EAAE,gBAAgB,EAAE,OAAO,EACpD,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;4BAC/C,EAAE,EAAE,MAAM,CAAC,EAAE;4BACb,KAAK,EAAE,MAAM,CAAC,IAAI;4BAClB,IAAI,EAAE,MAAM,CAAC,IAAI;4BACjB,IAAI,EAAE,cAAc,CAAC,IAAI;4BACzB,OAAO,EAAE,MAAM,CAAC,OAAO;4BACvB,UAAU,EAAE,MAAM,CAAC,UAAU;4BAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;4BACzB,QAAQ,EAAE,CAAC,CAAC,gBAAgB,IAAI,cAAc,CAAC,YAAY,IAAI,iBAAiB;4BAChF,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;4BACpC,gBAAgB;4BAChB,MAAM,EAAE,IAAI;yBACb,CAAC,CAAC,GACH,GACE,IACF,GACY,CACrB,CAAA;AACH,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Gamification } from '@streamlayer/feature-gamification';
3
- export declare const QuestionsList: React.FC<{
4
- store: ReturnType<Exclude<Gamification['questions'], undefined>['getStore']>;
5
- openQuestion: (questionId: string) => void;
6
- }>;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { useStore } from '@nanostores/react';
3
- import { QuestionList } from '../../gamification/question-list';
4
- export const QuestionsList = ({ store, openQuestion }) => {
5
- const { data: questions } = useStore(store);
6
- if (!questions) {
7
- return _jsx("div", { children: "wait questions..." });
8
- }
9
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
- // @ts-ignore
11
- return _jsx(QuestionList, { openQuestion: openQuestion, questions: questions });
12
- };
13
- //# sourceMappingURL=QuestionsList.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuestionsList.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/demo/components/QuestionsList.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAE/D,MAAM,CAAC,MAAM,aAAa,GAGrB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE;IAC/B,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE3C,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,8CAA4B,CAAA;KACpC;IAED,6DAA6D;IAC7D,aAAa;IACb,OAAO,KAAC,YAAY,IAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,GAAI,CAAA;AAC3E,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { Gamification } from '@streamlayer/feature-gamification';
3
- export declare const UserSummary: React.FC<{
4
- store: ReturnType<Exclude<Gamification['userSummary'], undefined>['getStore']>;
5
- }>;
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
- import { useStore } from '@nanostores/react';
3
- import { UserStatistics } from '../../gamification/user-statistics';
4
- export const UserSummary = ({ store }) => {
5
- const { data: user } = useStore(store);
6
- if (!user?.summary) {
7
- return _jsx("div", { children: "wait user..." });
8
- }
9
- return (_jsx(UserStatistics, { avatar: user.summary.avatar, name: user.summary.name, points: user.summary.points, grade: '0', friendsRank: user.summary.friendsRank, globalRank: user.summary.rank, winStreak: user.summary.streak, correct: user.summary.correct, incorrect: user.summary.incorrect, successRate: user.percentage?.correct }));
10
- };
11
- //# sourceMappingURL=UserSummary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserSummary.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/demo/components/UserSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AAEnE,MAAM,CAAC,MAAM,WAAW,GAEnB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAEtC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE;QAClB,OAAO,yCAAuB,CAAA;KAC/B;IAED,OAAO,CACL,KAAC,cAAc,IACb,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAC3B,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EACvB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAC3B,KAAK,EAAE,GAAG,EACV,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,EACrC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAC7B,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAC7B,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EACjC,WAAW,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,GACrC,CACH,CAAA;AACH,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- export { UserSummary } from './UserSummary';
2
- export { QuestionsList } from './QuestionsList';
3
- export { Question } from './Question';
4
- export { Notifications } from './Notifications';
5
- export { InPlayGame } from './InPlayGame';
@@ -1,6 +0,0 @@
1
- export { UserSummary } from './UserSummary';
2
- export { QuestionsList } from './QuestionsList';
3
- export { Question } from './Question';
4
- export { Notifications } from './Notifications';
5
- export { InPlayGame } from './InPlayGame';
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-ui/src/lib/demo/components/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA"}