@streamlayer/react-ui 0.55.0 → 0.56.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/lib/index.d.ts +5 -12
- package/lib/index.js +6 -115
- package/lib/ui/app/Features/Gamification/index.d.ts +0 -2
- package/lib/ui/app/Features/Gamification/index.js +4 -3
- package/lib/ui/app/Notifications/index.js +21 -15
- package/lib/ui/app/Notifications/styles.d.ts +1 -0
- package/lib/ui/app/Notifications/styles.js +17 -0
- package/lib/ui/app/masters.js +43 -31
- package/lib/ui/gamification/question/notification/index.d.ts +3 -0
- package/lib/ui/gamification/question/notification/index.js +30 -0
- package/lib/ui/gamification/question/notification/insight/index.d.ts +6 -0
- package/lib/ui/gamification/question/notification/insight/index.js +23 -0
- package/lib/ui/gamification/question/notification/insight/styles.d.ts +6 -0
- package/lib/ui/gamification/question/notification/insight/styles.js +60 -0
- package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +3 -0
- package/lib/ui/gamification/question/notification/prediction-result/index.js +7 -0
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +2 -0
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -0
- package/lib/ui/gamification/question/notification/styles.d.ts +9 -0
- package/lib/ui/gamification/question/notification/styles.js +87 -0
- package/lib/ui/show-in/index.d.ts +1 -0
- package/lib/ui/show-in/index.js +35 -6
- package/package.json +15 -10
- package/lib/ui/demo/DemoPoints.d.ts +0 -5
- package/lib/ui/demo/DemoPoints.js +0 -28
- package/lib/ui/demo/Gamification.d.ts +0 -7
- package/lib/ui/demo/Gamification.js +0 -117
- package/lib/ui/demo/Highlights.d.ts +0 -7
- package/lib/ui/demo/Highlights.js +0 -68
- package/lib/ui/demo/Login.d.ts +0 -5
- package/lib/ui/demo/Login.js +0 -26
- package/lib/ui/demo/components/EventProvider.d.ts +0 -2
- package/lib/ui/demo/components/EventProvider.js +0 -5
- package/lib/ui/demo/components/Insight.d.ts +0 -8
- package/lib/ui/demo/components/Insight.js +0 -32
- package/lib/ui/demo/components/Insights.d.ts +0 -7
- package/lib/ui/demo/components/Insights.js +0 -15
- package/lib/ui/demo/components/Leaderboard.d.ts +0 -5
- package/lib/ui/demo/components/Leaderboard.js +0 -35
- package/lib/ui/demo/components/Question.d.ts +0 -7
- package/lib/ui/demo/components/Question.js +0 -89
- package/lib/ui/demo/components/QuestionsList.d.ts +0 -6
- package/lib/ui/demo/components/QuestionsList.js +0 -24
- package/lib/ui/demo/components/UserSummary.d.ts +0 -5
- package/lib/ui/demo/components/UserSummary.js +0 -17
- package/lib/ui/demo/components/index.d.ts +0 -7
- package/lib/ui/demo/components/index.js +0 -74
- package/lib/ui/demo/index.d.ts +0 -5
- package/lib/ui/demo/index.js +0 -184
- package/lib/ui/demo/styles.d.ts +0 -6
- package/lib/ui/demo/styles.js +0 -58
- package/lib/ui/notifications/decorator.d.ts +0 -4
- package/lib/ui/notifications/decorator.js +0 -64
- package/lib/ui/notifications/index.d.ts +0 -5
- package/lib/ui/notifications/index.js +0 -28
- package/lib/ui/notifications/notification/index.d.ts +0 -6
- package/lib/ui/notifications/notification/index.js +0 -36
- package/lib/ui/notifications/notification/onboarding-inapp/index.d.ts +0 -3
- package/lib/ui/notifications/notification/onboarding-inapp/index.js +0 -25
- package/lib/ui/notifications/notification/onboarding-inapp/styles.d.ts +0 -12
- package/lib/ui/notifications/notification/onboarding-inapp/styles.js +0 -77
- package/lib/ui/notifications/notification/question-inapp/index.d.ts +0 -3
- package/lib/ui/notifications/notification/question-inapp/index.js +0 -23
- package/lib/ui/notifications/notification/question-inapp/styles.d.ts +0 -10
- package/lib/ui/notifications/notification/question-inapp/styles.js +0 -61
- package/lib/ui/notifications/notification/styles.d.ts +0 -2
- package/lib/ui/notifications/notification/styles.js +0 -32
- package/lib/ui/notifications/styles.d.ts +0 -2
- package/lib/ui/notifications/styles.js +0 -15
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useStore as o } from "@nanostores/react";
|
|
3
|
-
import { UserStatistics as i } from "../../gamification/user-statistics/index.js";
|
|
4
|
-
import "../../../utils/common.js";
|
|
5
|
-
import "../../gamification/user-statistics/components/rank/index.js";
|
|
6
|
-
import "../../gamification/user-statistics/components/rank/styles.js";
|
|
7
|
-
import "@linaria/react";
|
|
8
|
-
import "../../gamification/user-statistics/components/statistic/index.js";
|
|
9
|
-
import "../../gamification/user-statistics/components/statistic/styles.js";
|
|
10
|
-
import "../../gamification/user-statistics/styles.js";
|
|
11
|
-
const S = ({ store: m }) => {
|
|
12
|
-
const { data: r } = o(m);
|
|
13
|
-
return r != null && r.summary ? /* @__PURE__ */ t(i, { ...r.summary, ...r.percentage }) : /* @__PURE__ */ t("div", { children: "wait user..." });
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
S as UserSummary
|
|
17
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { UserSummary } from './UserSummary';
|
|
2
|
-
export { QuestionsList } from './QuestionsList';
|
|
3
|
-
export { Question } from './Question';
|
|
4
|
-
export { Onboarding } from '../../gamification/onboarding';
|
|
5
|
-
export { Insights } from './Insights';
|
|
6
|
-
export { Insight } from './Insight';
|
|
7
|
-
export { Leaderboard } from './Leaderboard';
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { UserSummary as er } from "./UserSummary.js";
|
|
2
|
-
import { QuestionsList as fr } from "./QuestionsList.js";
|
|
3
|
-
import { Question as nr } from "./Question.js";
|
|
4
|
-
import { Onboarding as dr } from "../../gamification/onboarding/index.js";
|
|
5
|
-
import { Insights as ur } from "./Insights.js";
|
|
6
|
-
import { Insight as hr } from "./Insight.js";
|
|
7
|
-
import { Leaderboard as Lr } from "./Leaderboard.js";
|
|
8
|
-
import "react/jsx-runtime";
|
|
9
|
-
import "@nanostores/react";
|
|
10
|
-
import "../../gamification/user-statistics/index.js";
|
|
11
|
-
import "../../../utils/common.js";
|
|
12
|
-
import "../../gamification/user-statistics/components/rank/index.js";
|
|
13
|
-
import "../../gamification/user-statistics/components/rank/styles.js";
|
|
14
|
-
import "@linaria/react";
|
|
15
|
-
import "../../gamification/user-statistics/components/statistic/index.js";
|
|
16
|
-
import "../../gamification/user-statistics/components/statistic/styles.js";
|
|
17
|
-
import "../../gamification/user-statistics/styles.js";
|
|
18
|
-
import "../../gamification/question/list/index.js";
|
|
19
|
-
import "../../gamification/question/index.js";
|
|
20
|
-
import "@streamlayer/sdk-web-types";
|
|
21
|
-
import "../../button/index.js";
|
|
22
|
-
import "../../button/styles.js";
|
|
23
|
-
import "../../gamification/constants.js";
|
|
24
|
-
import "../../gamification/question/styles.js";
|
|
25
|
-
import "../../icons/index.js";
|
|
26
|
-
import "react";
|
|
27
|
-
import "../../gamification/question/insight/index.js";
|
|
28
|
-
import "../../video-player/index.js";
|
|
29
|
-
import "../../video-player/styles.js";
|
|
30
|
-
import "../../gamification/question/insight/styles.js";
|
|
31
|
-
import "../../gamification/question/list/styles.js";
|
|
32
|
-
import "../../gamification/vote/index.js";
|
|
33
|
-
import "../../app/styles.js";
|
|
34
|
-
import "../../gamification/vote/feedback/index.js";
|
|
35
|
-
import "../../gamification/vote/feedback/styles.js";
|
|
36
|
-
import "../../gamification/vote/styles.js";
|
|
37
|
-
import "../../gamification/vote/vote-option/index.js";
|
|
38
|
-
import "../../gamification/vote/vote-option/styles.js";
|
|
39
|
-
import "../../gamification/vote/win-bar/index.js";
|
|
40
|
-
import "../../timer/index.js";
|
|
41
|
-
import "react-countdown-circle-timer";
|
|
42
|
-
import "../../theme/constants.js";
|
|
43
|
-
import "../../gamification/vote/win-bar/styles.js";
|
|
44
|
-
import "../../../icon-exit-d3f9fc80.js";
|
|
45
|
-
import "../../gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js";
|
|
46
|
-
import "../../gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js";
|
|
47
|
-
import "../../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js";
|
|
48
|
-
import "../../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js";
|
|
49
|
-
import "../../gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js";
|
|
50
|
-
import "../../gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js";
|
|
51
|
-
import "../../gamification/onboarding/styles.js";
|
|
52
|
-
import "../../gamification/insight-list/index.js";
|
|
53
|
-
import "../../gamification/insight/index.js";
|
|
54
|
-
import "../../gamification/insight/styles.js";
|
|
55
|
-
import "../../gamification/insight-list/styles.js";
|
|
56
|
-
import "../../gamification/detailed-insight/index.js";
|
|
57
|
-
import "../../gamification/common-header/index.js";
|
|
58
|
-
import "../../gamification/common-header/styles.js";
|
|
59
|
-
import "../../gamification/detailed-insight/styles.js";
|
|
60
|
-
import "../../gamification/leaderboard/index.js";
|
|
61
|
-
import "react-virtualized-auto-sizer";
|
|
62
|
-
import "react-window";
|
|
63
|
-
import "react-window-infinite-loader";
|
|
64
|
-
import "../../gamification/leaderboard/list-item/index.js";
|
|
65
|
-
import "../../gamification/leaderboard/list-item/styles.js";
|
|
66
|
-
export {
|
|
67
|
-
hr as Insight,
|
|
68
|
-
ur as Insights,
|
|
69
|
-
Lr as Leaderboard,
|
|
70
|
-
dr as Onboarding,
|
|
71
|
-
nr as Question,
|
|
72
|
-
fr as QuestionsList,
|
|
73
|
-
er as UserSummary
|
|
74
|
-
};
|
package/lib/ui/demo/index.d.ts
DELETED
package/lib/ui/demo/index.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
var y = Object.defineProperty;
|
|
2
|
-
var b = (o, r, t) => r in o ? y(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t;
|
|
3
|
-
var m = (o, r, t) => (b(o, typeof r != "symbol" ? r + "" : r, t), t);
|
|
4
|
-
import { jsx as e, jsxs as l, Fragment as T } from "react/jsx-runtime";
|
|
5
|
-
import { FeatureStatus as c } from "@streamlayer/sdk-web-interfaces";
|
|
6
|
-
import { FeatureType as g } from "@streamlayer/sdk-web-types";
|
|
7
|
-
import { AvailableFeatures as C } from "@streamlayer/sdk-web-features";
|
|
8
|
-
import { useState as w, useMemo as S, useEffect as F } from "react";
|
|
9
|
-
import "@streamlayer/sdk-web-api";
|
|
10
|
-
import { Storage as k } from "@streamlayer/sdk-web-storage";
|
|
11
|
-
import { useStore as f } from "@nanostores/react";
|
|
12
|
-
import { Notifications as x } from "../notifications/index.js";
|
|
13
|
-
import { GamificationComponent as E } from "./Gamification.js";
|
|
14
|
-
import { HighlightsComponent as G } from "./Highlights.js";
|
|
15
|
-
import { LoginComponent as H } from "./Login.js";
|
|
16
|
-
import { Buttons as A, Button as d } from "./styles.js";
|
|
17
|
-
import "../notifications/notification/index.js";
|
|
18
|
-
import "@streamlayer/sdk-web-notifications";
|
|
19
|
-
import "../notifications/notification/onboarding-inapp/index.js";
|
|
20
|
-
import "../notifications/notification/onboarding-inapp/styles.js";
|
|
21
|
-
import "@linaria/react";
|
|
22
|
-
import "../notifications/notification/question-inapp/index.js";
|
|
23
|
-
import "../../icon-exit-d3f9fc80.js";
|
|
24
|
-
import "../notifications/notification/question-inapp/styles.js";
|
|
25
|
-
import "../notifications/notification/styles.js";
|
|
26
|
-
import "../notifications/styles.js";
|
|
27
|
-
import "../gamification/tabs/index.js";
|
|
28
|
-
import "../gamification/tabs/styles.js";
|
|
29
|
-
import "./components/UserSummary.js";
|
|
30
|
-
import "../gamification/user-statistics/index.js";
|
|
31
|
-
import "../../utils/common.js";
|
|
32
|
-
import "../gamification/user-statistics/components/rank/index.js";
|
|
33
|
-
import "../gamification/user-statistics/components/rank/styles.js";
|
|
34
|
-
import "../gamification/user-statistics/components/statistic/index.js";
|
|
35
|
-
import "../gamification/user-statistics/components/statistic/styles.js";
|
|
36
|
-
import "../gamification/user-statistics/styles.js";
|
|
37
|
-
import "./components/QuestionsList.js";
|
|
38
|
-
import "../gamification/question/list/index.js";
|
|
39
|
-
import "../gamification/question/index.js";
|
|
40
|
-
import "../button/index.js";
|
|
41
|
-
import "../button/styles.js";
|
|
42
|
-
import "../gamification/constants.js";
|
|
43
|
-
import "../gamification/question/styles.js";
|
|
44
|
-
import "../icons/index.js";
|
|
45
|
-
import "../gamification/question/insight/index.js";
|
|
46
|
-
import "../video-player/index.js";
|
|
47
|
-
import "../video-player/styles.js";
|
|
48
|
-
import "../gamification/question/insight/styles.js";
|
|
49
|
-
import "../gamification/question/list/styles.js";
|
|
50
|
-
import "./components/Question.js";
|
|
51
|
-
import "../gamification/vote/index.js";
|
|
52
|
-
import "../app/styles.js";
|
|
53
|
-
import "../gamification/vote/feedback/index.js";
|
|
54
|
-
import "../gamification/vote/feedback/styles.js";
|
|
55
|
-
import "../gamification/vote/styles.js";
|
|
56
|
-
import "../gamification/vote/vote-option/index.js";
|
|
57
|
-
import "../gamification/vote/vote-option/styles.js";
|
|
58
|
-
import "../gamification/vote/win-bar/index.js";
|
|
59
|
-
import "../timer/index.js";
|
|
60
|
-
import "react-countdown-circle-timer";
|
|
61
|
-
import "../theme/constants.js";
|
|
62
|
-
import "../gamification/vote/win-bar/styles.js";
|
|
63
|
-
import "../gamification/onboarding/index.js";
|
|
64
|
-
import "../gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js";
|
|
65
|
-
import "../gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js";
|
|
66
|
-
import "../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js";
|
|
67
|
-
import "../gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js";
|
|
68
|
-
import "../gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js";
|
|
69
|
-
import "../gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js";
|
|
70
|
-
import "../gamification/onboarding/styles.js";
|
|
71
|
-
import "../gamification/insight/styles.js";
|
|
72
|
-
import "../gamification/insight-list/styles.js";
|
|
73
|
-
import "../gamification/common-header/styles.js";
|
|
74
|
-
import "../gamification/detailed-insight/styles.js";
|
|
75
|
-
import "./components/Leaderboard.js";
|
|
76
|
-
import "../gamification/leaderboard/index.js";
|
|
77
|
-
import "react-virtualized-auto-sizer";
|
|
78
|
-
import "react-window";
|
|
79
|
-
import "react-window-infinite-loader";
|
|
80
|
-
import "../gamification/leaderboard/list-item/index.js";
|
|
81
|
-
import "../gamification/leaderboard/list-item/styles.js";
|
|
82
|
-
import "./components/Insights.js";
|
|
83
|
-
import "../gamification/insight-list/index.js";
|
|
84
|
-
import "../gamification/insight/index.js";
|
|
85
|
-
import "./components/Insight.js";
|
|
86
|
-
import "../gamification/detailed-insight/index.js";
|
|
87
|
-
import "../gamification/common-header/index.js";
|
|
88
|
-
import "@streamlayer/sdk-web-anonymous-auth";
|
|
89
|
-
import "../login/index.js";
|
|
90
|
-
import "react-auth-code-input";
|
|
91
|
-
import "react-phone-number-input";
|
|
92
|
-
import "../../utils/login.js";
|
|
93
|
-
import "@connectrpc/connect";
|
|
94
|
-
import "@connectrpc/connect-web";
|
|
95
|
-
import "@streamlayer/sl-eslib/users/users_connect";
|
|
96
|
-
import "../login/styles.js";
|
|
97
|
-
class B extends k {
|
|
98
|
-
constructor() {
|
|
99
|
-
super("user");
|
|
100
|
-
// Schema
|
|
101
|
-
m(this, "setSchema", (t) => {
|
|
102
|
-
this.write("schema", t);
|
|
103
|
-
});
|
|
104
|
-
m(this, "getSchema", () => this.read(
|
|
105
|
-
"schema"
|
|
106
|
-
/* SCHEMA */
|
|
107
|
-
));
|
|
108
|
-
// Token
|
|
109
|
-
m(this, "setToken", (t) => {
|
|
110
|
-
this.write("token", t);
|
|
111
|
-
});
|
|
112
|
-
m(this, "getToken", () => this.read(
|
|
113
|
-
"token"
|
|
114
|
-
/* TOKEN */
|
|
115
|
-
));
|
|
116
|
-
// External Token
|
|
117
|
-
m(this, "setExternalToken", (t) => {
|
|
118
|
-
this.write("eToken", t);
|
|
119
|
-
});
|
|
120
|
-
m(this, "getExternalToken", () => this.read(
|
|
121
|
-
"eToken"
|
|
122
|
-
/* EXTERNAL_TOKEN */
|
|
123
|
-
));
|
|
124
|
-
m(this, "removeToken", () => {
|
|
125
|
-
this.remove(
|
|
126
|
-
"token"
|
|
127
|
-
/* TOKEN */
|
|
128
|
-
);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
new B();
|
|
133
|
-
const R = ({ activeFeature: o, sdk: r }) => {
|
|
134
|
-
const [t, a] = w(null), { organizationSettings: s, streamSettings: u } = f(r.sdkStore), v = S(() => {
|
|
135
|
-
const i = (u == null ? void 0 : u.data) || (s == null ? void 0 : s.data);
|
|
136
|
-
return i != null && i.overlays ? i.overlays : [];
|
|
137
|
-
}, [s, u]);
|
|
138
|
-
F(() => {
|
|
139
|
-
const i = r.getFeatures();
|
|
140
|
-
if (o)
|
|
141
|
-
for (const [n, p] of i)
|
|
142
|
-
n === o ? p.status.get() === c.Suspended && (p.enable(), a(p)) : p.status.get() === c.Ready && p.disable();
|
|
143
|
-
else {
|
|
144
|
-
for (const [, n] of i)
|
|
145
|
-
n.status.get() === c.Ready && n.disable();
|
|
146
|
-
a(null);
|
|
147
|
-
}
|
|
148
|
-
return () => {
|
|
149
|
-
for (const [, n] of i)
|
|
150
|
-
n.status.get() === c.Ready && n.disable();
|
|
151
|
-
};
|
|
152
|
-
}, [o, r]);
|
|
153
|
-
const h = S(() => t ? t.featureConfig.get().type === g.GAMES ? t ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(E, { gamification: t, sdk: r }) }) : /* @__PURE__ */ e("div", { children: "wait gamification..." }) : t.featureConfig.get().type === g.HIGHLIGHTS ? t ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(G, { highlights: t, sdk: r }) }) : /* @__PURE__ */ e("div", { children: "wait highlights..." }) : /* @__PURE__ */ e("div", { children: "unknown feature" }) : null, [r, t]);
|
|
154
|
-
return /* @__PURE__ */ l("div", { children: [
|
|
155
|
-
/* @__PURE__ */ l(A, { children: [
|
|
156
|
-
/* @__PURE__ */ e(d, { onClick: () => r.closeFeature(), disabled: !h, children: "close" }),
|
|
157
|
-
/* @__PURE__ */ e(d, { onClick: () => r.logout(), children: "logout" }),
|
|
158
|
-
v.map((i) => /* @__PURE__ */ l(
|
|
159
|
-
d,
|
|
160
|
-
{
|
|
161
|
-
onClick: () => r.openFeature(i.type),
|
|
162
|
-
disabled: !(i.type in C),
|
|
163
|
-
"data-enable_sdk_button": i.enableSdkButton.toString(),
|
|
164
|
-
"data-selected": i.type === o,
|
|
165
|
-
children: [
|
|
166
|
-
/* @__PURE__ */ e("img", { src: i.icon, alt: "" }),
|
|
167
|
-
i.name
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
|
-
i.name
|
|
171
|
-
))
|
|
172
|
-
] }),
|
|
173
|
-
h
|
|
174
|
-
] });
|
|
175
|
-
}, yr = ({ sdk: o }) => {
|
|
176
|
-
const r = f(o.organizationStore()), t = f(o.getUserStore()), a = f(o.getActiveFeature());
|
|
177
|
-
return r.loading ? /* @__PURE__ */ e("div", { children: "authentication..." }) : r.data ? t.loading ? /* @__PURE__ */ e("div", { children: "authentication..." }) : t.data ? /* @__PURE__ */ l(T, { children: [
|
|
178
|
-
/* @__PURE__ */ e(x, { notificationsStore: o.getNotificationsStore() }),
|
|
179
|
-
/* @__PURE__ */ e(R, { sdk: o, activeFeature: a })
|
|
180
|
-
] }) : /* @__PURE__ */ e(H, { sdk: o }) : /* @__PURE__ */ e("div", { children: "wrong sdk key..." });
|
|
181
|
-
};
|
|
182
|
-
export {
|
|
183
|
-
yr as Demo
|
|
184
|
-
};
|
package/lib/ui/demo/styles.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const DemoContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
-
export declare const UserStatisticsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
-
export declare const QuestionsContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
-
export declare const Buttons: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
-
export declare const Button: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
package/lib/ui/demo/styles.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { styled as o } from "@linaria/react";
|
|
2
|
-
const e = o.div`
|
|
3
|
-
position: relative;
|
|
4
|
-
height: 100%;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
`, i = o.div`
|
|
7
|
-
margin-bottom: 15px;
|
|
8
|
-
`, r = o.div`
|
|
9
|
-
position: relative;
|
|
10
|
-
height: calc(100% - 160px);
|
|
11
|
-
`, n = o.div`
|
|
12
|
-
display: flex;
|
|
13
|
-
margin-bottom: 10px;
|
|
14
|
-
`, a = o.button`
|
|
15
|
-
background: rgb(29, 123, 255);
|
|
16
|
-
border: none;
|
|
17
|
-
color: #fff;
|
|
18
|
-
padding: 5px 6px;
|
|
19
|
-
border-radius: 3px;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
margin-right: 5px;
|
|
22
|
-
transition: all 0.3s ease-in;
|
|
23
|
-
|
|
24
|
-
& > img {
|
|
25
|
-
max-width: 10px;
|
|
26
|
-
max-height: 10px;
|
|
27
|
-
margin-right: 5px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&:enabled:hover {
|
|
31
|
-
box-shadow: inset 0 0 0 2em rgb(2, 88, 208);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&[data-selected='true'] {
|
|
35
|
-
box-shadow: inset 0 0 0 2em rgb(0, 60, 145);
|
|
36
|
-
|
|
37
|
-
&:enabled:hover {
|
|
38
|
-
box-shadow: inset 0 0 0 2em rgb(0, 60, 145);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&:disabled {
|
|
43
|
-
opacity: 0.5;
|
|
44
|
-
background-color: gray;
|
|
45
|
-
cursor: default;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&[data-enable_sdk_button='false'] {
|
|
49
|
-
opacity: 0.7;
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
export {
|
|
53
|
-
a as Button,
|
|
54
|
-
n as Buttons,
|
|
55
|
-
e as DemoContainer,
|
|
56
|
-
r as QuestionsContainer,
|
|
57
|
-
i as UserStatisticsContainer
|
|
58
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { styled as m } from "@linaria/react";
|
|
3
|
-
import { useMemo as b, useRef as a } from "react";
|
|
4
|
-
import { NotificationType as o, Notifications as f } from "@streamlayer/sdk-web-notifications";
|
|
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 = m.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 = b(
|
|
43
|
-
() => new f({ 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
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useStore as p } from "@nanostores/react";
|
|
3
|
-
import { NotificationComponent as n } from "./notification/index.js";
|
|
4
|
-
import { NotificationsContainer as e } from "./styles.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "@streamlayer/sdk-web-notifications";
|
|
7
|
-
import "./notification/onboarding-inapp/index.js";
|
|
8
|
-
import "./notification/onboarding-inapp/styles.js";
|
|
9
|
-
import "@linaria/react";
|
|
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
|
-
const S = ({ notificationsStore: i }) => {
|
|
15
|
-
const o = p(i);
|
|
16
|
-
return /* @__PURE__ */ r(e, { children: o == null ? void 0 : o.map((t, m) => /* @__PURE__ */ r(
|
|
17
|
-
n,
|
|
18
|
-
{
|
|
19
|
-
index: m,
|
|
20
|
-
total: o.length,
|
|
21
|
-
...t
|
|
22
|
-
},
|
|
23
|
-
t.id
|
|
24
|
-
)) });
|
|
25
|
-
};
|
|
26
|
-
export {
|
|
27
|
-
S as Notifications
|
|
28
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as f, useEffect as s } from "react";
|
|
3
|
-
import { NotificationType as i } from "@streamlayer/sdk-web-notifications";
|
|
4
|
-
import { OnBoardingInApp as N } from "./onboarding-inapp/index.js";
|
|
5
|
-
import { QuestionInApp as e } from "./question-inapp/index.js";
|
|
6
|
-
import { NotificationContainer as a } from "./styles.js";
|
|
7
|
-
import "./onboarding-inapp/styles.js";
|
|
8
|
-
import "@linaria/react";
|
|
9
|
-
import "../../../icon-exit-d3f9fc80.js";
|
|
10
|
-
import "./question-inapp/styles.js";
|
|
11
|
-
const l = {
|
|
12
|
-
[i.ONBOARDING]: N,
|
|
13
|
-
[i.QUESTION]: e
|
|
14
|
-
}, y = ({
|
|
15
|
-
index: t,
|
|
16
|
-
total: m,
|
|
17
|
-
...r
|
|
18
|
-
}) => {
|
|
19
|
-
const o = f(null), p = l[r.type] || e;
|
|
20
|
-
return s(() => {
|
|
21
|
-
o.current !== null && r.hiding && o.current.animate([{ right: "0" }, { right: "-100%" }], {
|
|
22
|
-
duration: 300,
|
|
23
|
-
fill: "forwards"
|
|
24
|
-
});
|
|
25
|
-
}, [r.hiding]), /* @__PURE__ */ n(
|
|
26
|
-
a,
|
|
27
|
-
{
|
|
28
|
-
ref: o,
|
|
29
|
-
style: { zIndex: t + 1, transform: `translateY(${100 * (m - t - 1)}%)` },
|
|
30
|
-
children: /* @__PURE__ */ n(p, { ...r })
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
y as NotificationComponent
|
|
36
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as i, Fragment as t } from "react/jsx-runtime";
|
|
2
|
-
import { Container as g, CloseBtn as s, IconClose as C, BackgroundBlock as M, Icon as p, ContentWrap as m, SponsorLogo as Z, SponsorText as b, ContentTitle as D, ContentSubtitle as S, ActionBtn as h } from "./styles.js";
|
|
3
|
-
import "@linaria/react";
|
|
4
|
-
const W = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=", P = ({
|
|
5
|
-
close: I,
|
|
6
|
-
action: l,
|
|
7
|
-
data: { icon: c, header: a, title: e, subtitle: r, graphicBg: d, sponsorLogo: o }
|
|
8
|
-
}) => /* @__PURE__ */ n(g, { children: [
|
|
9
|
-
/* @__PURE__ */ i(s, { onClick: I, children: /* @__PURE__ */ i(C, { alt: "icon-close-onboarding-inapp", src: W }) }),
|
|
10
|
-
/* @__PURE__ */ i(M, { style: { backgroundImage: `url(${d || ""})` }, children: c && /* @__PURE__ */ i(p, { alt: "onboarding-inapp-icon", src: c }) }),
|
|
11
|
-
/* @__PURE__ */ n(m, { children: [
|
|
12
|
-
/* @__PURE__ */ n("div", { children: [
|
|
13
|
-
/* @__PURE__ */ i("div", { children: o ? /* @__PURE__ */ n(t, { children: [
|
|
14
|
-
/* @__PURE__ */ i(Z, { alt: "sponsor-logo", src: o }),
|
|
15
|
-
/* @__PURE__ */ i(b, { children: "Presents" })
|
|
16
|
-
] }) : a || "" }),
|
|
17
|
-
/* @__PURE__ */ i(D, { children: e || "" }),
|
|
18
|
-
/* @__PURE__ */ i(S, { children: r || "" })
|
|
19
|
-
] }),
|
|
20
|
-
/* @__PURE__ */ i(h, { onClick: l, children: "Play" })
|
|
21
|
-
] })
|
|
22
|
-
] });
|
|
23
|
-
export {
|
|
24
|
-
P as OnBoardingInApp
|
|
25
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
-
export declare const BackgroundBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
-
export declare const Icon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
5
|
-
export declare const ContentWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
-
export declare const SponsorLogo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
7
|
-
export declare const SponsorText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
8
|
-
export declare const ContentTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
|
-
export declare const ContentSubtitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
10
|
-
export declare const ActionBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
11
|
-
export declare const CloseBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
12
|
-
export declare const IconClose: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { styled as o } from "@linaria/react";
|
|
2
|
-
const n = o.div`
|
|
3
|
-
background-color: var(--color-transparent-onboarding-inapp);
|
|
4
|
-
max-height: 120px;
|
|
5
|
-
`, r = o.div`
|
|
6
|
-
background-repeat: no-repeat;
|
|
7
|
-
background-size: contain;
|
|
8
|
-
border-top-left-radius: 8px;
|
|
9
|
-
border-bottom-left-radius: 8px;
|
|
10
|
-
width: 72px;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
`, e = o.img`
|
|
14
|
-
width: 56px;
|
|
15
|
-
margin-left: 8px;
|
|
16
|
-
`, i = o.div`
|
|
17
|
-
padding: 16px 8px 16px 0px;
|
|
18
|
-
margin-right: 8px;
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-weight: 600;
|
|
21
|
-
display: flex;
|
|
22
|
-
flex: 1;
|
|
23
|
-
justify-content: space-between;
|
|
24
|
-
align-items: center;
|
|
25
|
-
`, p = o.img`
|
|
26
|
-
width: 16px;
|
|
27
|
-
height: 16px;
|
|
28
|
-
margin-right: 4px;
|
|
29
|
-
`, a = o.span`
|
|
30
|
-
font-style: italic;
|
|
31
|
-
font-weight: 600;
|
|
32
|
-
font-size: 8px;
|
|
33
|
-
text-transform: uppercase;
|
|
34
|
-
`, s = o.div`
|
|
35
|
-
margin-top: 8px;
|
|
36
|
-
margin-bottom: 2px;
|
|
37
|
-
font-size: 14px;
|
|
38
|
-
`, c = o.div`
|
|
39
|
-
color: var(--color-grey-primary-onboarding-inapp);
|
|
40
|
-
`, d = o.button`
|
|
41
|
-
border: none;
|
|
42
|
-
outline: none;
|
|
43
|
-
background-color: var(--color-green-primary-btn);
|
|
44
|
-
padding: 8px 16px;
|
|
45
|
-
color: #fff;
|
|
46
|
-
font-size: 12px;
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
cursor: pointer;
|
|
49
|
-
border-radius: 24px;
|
|
50
|
-
`, x = o.button`
|
|
51
|
-
position: absolute;
|
|
52
|
-
right: 8px;
|
|
53
|
-
top: 4px;
|
|
54
|
-
border: none;
|
|
55
|
-
outline: none;
|
|
56
|
-
background-color: transparent;
|
|
57
|
-
padding: 5px;
|
|
58
|
-
color: #fff;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
border-radius: 50%;
|
|
61
|
-
`, g = o.img`
|
|
62
|
-
width: 10px;
|
|
63
|
-
height: 10px;
|
|
64
|
-
`;
|
|
65
|
-
export {
|
|
66
|
-
d as ActionBtn,
|
|
67
|
-
r as BackgroundBlock,
|
|
68
|
-
x as CloseBtn,
|
|
69
|
-
n as Container,
|
|
70
|
-
c as ContentSubtitle,
|
|
71
|
-
s as ContentTitle,
|
|
72
|
-
i as ContentWrap,
|
|
73
|
-
e as Icon,
|
|
74
|
-
g as IconClose,
|
|
75
|
-
p as SponsorLogo,
|
|
76
|
-
a as SponsorText
|
|
77
|
-
};
|