@streamlayer/react-ui 0.75.0 → 0.76.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/assets/style.css +1 -1
- package/lib/ui/app/Features/Gamification/Question.js +41 -32
- package/lib/ui/app/Features/Gamification/QuestionsList.js +10 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +15 -7
- package/lib/ui/app/Features/Gamification/gamification-feature.js +10 -0
- package/lib/ui/app/Features/Gamification/index.js +12 -2
- package/lib/ui/app/Notifications/index.js +4 -2
- package/lib/ui/app/masters.js +4 -2
- package/lib/ui/gamification/question/list/index.js +22 -10
- package/lib/ui/gamification/question/notification/index.js +13 -11
- package/lib/ui/gamification/question/notification/insight/index.js +12 -12
- package/lib/ui/gamification/question/notification/tweet/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/tweet/index.js +10 -18
- package/lib/ui/gamification/question/notification/tweet/styles.d.ts +0 -3
- package/lib/ui/gamification/question/notification/tweet/styles.js +10 -25
- package/lib/ui/gamification/question/twitter/index.d.ts +4 -2
- package/lib/ui/gamification/question/twitter/index.js +33 -9
- package/lib/ui/gamification/question/twitter/styles.d.ts +2 -0
- package/lib/ui/gamification/question/twitter/styles.js +16 -6
- package/lib/ui/gamification/vote/twitter-details/index.d.ts +1 -1
- package/lib/ui/gamification/vote/twitter-details/index.js +28 -6
- package/lib/ui/gamification/vote/twitter-details/styles.d.ts +2 -0
- package/lib/ui/gamification/vote/twitter-details/styles.js +12 -2
- package/lib/ui/icons/index.d.ts +1 -0
- package/lib/ui/icons/index.js +14 -13
- package/lib/ui/questions/insight/index.js +13 -13
- package/lib/ui/questions/twitter/account/index.js +15 -9
- package/lib/ui/questions/twitter/account/styles.d.ts +1 -0
- package/lib/ui/questions/twitter/account/styles.js +21 -13
- package/lib/ui/questions/twitter/index.d.ts +3 -6
- package/lib/ui/questions/twitter/index.js +8 -13
- package/lib/ui/questions/twitter/styles.d.ts +0 -3
- package/lib/ui/questions/twitter/styles.js +8 -23
- package/package.json +8 -8
package/lib/ui/app/masters.js
CHANGED
|
@@ -30,8 +30,10 @@ import "../video-player/styles.js";
|
|
|
30
30
|
import "../gamification/question/notification/insight/styles.js";
|
|
31
31
|
import "../gamification/question/notification/styles.js";
|
|
32
32
|
import "../gamification/question/notification/tweet/index.js";
|
|
33
|
+
import "../questions/twitter/index.js";
|
|
33
34
|
import "../questions/twitter/account/index.js";
|
|
34
35
|
import "../questions/twitter/account/styles.js";
|
|
36
|
+
import "../questions/twitter/styles.js";
|
|
35
37
|
import "../gamification/question/notification/tweet/styles.js";
|
|
36
38
|
import "../gamification/question/notification/prediction-result/index.js";
|
|
37
39
|
import "../gamification/question/notification/prediction-result/animation-lines/index.js";
|
|
@@ -60,7 +62,7 @@ import "../navigation/button/index.js";
|
|
|
60
62
|
const F = ({ sdk: r, className: i }) => {
|
|
61
63
|
const [, m] = I(r);
|
|
62
64
|
return /* @__PURE__ */ t(g, { className: i, feature: m, sdk: r });
|
|
63
|
-
},
|
|
65
|
+
}, Lt = ({ sdk: r, overlays: i, children: m }) => {
|
|
64
66
|
const { sdkEnabled: p, sdkReady: e, activeOverlay: o, activateAndLoadOverlay: d, activateEventWithId: c, deactivate: l, isLogged: f } = C(r);
|
|
65
67
|
return y(() => {
|
|
66
68
|
import("./Features/Gamification/gamification-feature.js");
|
|
@@ -96,5 +98,5 @@ const F = ({ sdk: r, className: i }) => {
|
|
|
96
98
|
] });
|
|
97
99
|
};
|
|
98
100
|
export {
|
|
99
|
-
|
|
101
|
+
Lt as MastersApp
|
|
100
102
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Question as
|
|
3
|
-
import { Insight as
|
|
4
|
-
import {
|
|
2
|
+
import { Question as b } from "../index.js";
|
|
3
|
+
import { Insight as c } from "../insight/index.js";
|
|
4
|
+
import { Twitter as p } from "../twitter/index.js";
|
|
5
|
+
import { QuestionsContainer as d } from "./styles.js";
|
|
5
6
|
import "@streamlayer/sdk-web-types";
|
|
6
7
|
import "../../constants.js";
|
|
7
8
|
import "../styles.js";
|
|
@@ -14,18 +15,29 @@ import "../../../video-player/styles.js";
|
|
|
14
15
|
import "../../../../utils/common.js";
|
|
15
16
|
import "../../../questions/insight/styles.js";
|
|
16
17
|
import "../insight/styles.js";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
import "../../../questions/twitter/index.js";
|
|
19
|
+
import "../../../questions/twitter/account/index.js";
|
|
20
|
+
import "../../../questions/twitter/account/styles.js";
|
|
21
|
+
import "../../../questions/twitter/styles.js";
|
|
22
|
+
import "../twitter/styles.js";
|
|
23
|
+
import "../../../button/index.js";
|
|
24
|
+
import "../../../button/styles.js";
|
|
25
|
+
const J = ({ questions: r, openQuestion: m }) => /* @__PURE__ */ e(d, { children: r == null ? void 0 : r.map((t) => {
|
|
26
|
+
var o, u, a;
|
|
27
|
+
if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
|
|
20
28
|
const i = t.attributes.attributes.value;
|
|
21
|
-
return /* @__PURE__ */ e(
|
|
29
|
+
return /* @__PURE__ */ e(b, { openQuestion: m, ...i }, i.questionId);
|
|
22
30
|
}
|
|
23
|
-
if (t.type === "insight" && ((
|
|
31
|
+
if (t.type === "insight" && ((u = t.attributes) == null ? void 0 : u.attributes.case) === "insight") {
|
|
24
32
|
const i = t.attributes.attributes.value;
|
|
25
|
-
return /* @__PURE__ */ e(
|
|
33
|
+
return /* @__PURE__ */ e(c, { openInsight: m, ...i }, i.questionId);
|
|
34
|
+
}
|
|
35
|
+
if (t.type === "tweet" && ((a = t.attributes) == null ? void 0 : a.attributes.case) === "tweet") {
|
|
36
|
+
const i = t.attributes.attributes.value, n = t.attributes.id, s = t.attributes.created;
|
|
37
|
+
return /* @__PURE__ */ e(p, { openTweet: m, ...i, tweetId: n, created: s }, n);
|
|
26
38
|
}
|
|
27
39
|
return null;
|
|
28
40
|
}) });
|
|
29
41
|
export {
|
|
30
|
-
|
|
42
|
+
J as QuestionList
|
|
31
43
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as p, jsx as o, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import { QuestionType as t } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { QuestionTypeData as d } from "../../constants.js";
|
|
4
4
|
import { Insight as f } from "./insight/index.js";
|
|
@@ -10,18 +10,20 @@ import "../../../icons/index.js";
|
|
|
10
10
|
import "@linaria/react";
|
|
11
11
|
import "../../../video-player/styles.js";
|
|
12
12
|
import "./insight/styles.js";
|
|
13
|
+
import "../../../questions/twitter/index.js";
|
|
13
14
|
import "../../../questions/twitter/account/index.js";
|
|
14
15
|
import "../../../questions/twitter/account/styles.js";
|
|
16
|
+
import "../../../questions/twitter/styles.js";
|
|
15
17
|
import "./tweet/styles.js";
|
|
16
|
-
const
|
|
17
|
-
close:
|
|
18
|
+
const y = ({
|
|
19
|
+
close: a,
|
|
18
20
|
action: i,
|
|
19
|
-
data: { questionType: r, question: m, insight:
|
|
21
|
+
data: { questionType: r, question: m, insight: e, tweet: l }
|
|
20
22
|
}) => {
|
|
21
23
|
const n = d[r];
|
|
22
|
-
return n ? /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */ o(I, { onClick:
|
|
24
|
-
r !== t.TWEET && /* @__PURE__ */
|
|
24
|
+
return n ? /* @__PURE__ */ p(h, { children: [
|
|
25
|
+
/* @__PURE__ */ o(I, { onClick: a, children: /* @__PURE__ */ o(T, { name: "icon-cross" }) }),
|
|
26
|
+
r !== t.TWEET && /* @__PURE__ */ p(C, { children: [
|
|
25
27
|
/* @__PURE__ */ o(
|
|
26
28
|
E,
|
|
27
29
|
{
|
|
@@ -32,17 +34,17 @@ const R = ({
|
|
|
32
34
|
),
|
|
33
35
|
/* @__PURE__ */ o(s, { children: n.label })
|
|
34
36
|
] }),
|
|
35
|
-
r === t.FACTOID && /* @__PURE__ */ o(f, { ...
|
|
37
|
+
r === t.FACTOID && /* @__PURE__ */ o(f, { ...e, action: i }),
|
|
36
38
|
r === t.TWEET && // ToDo: connect with real Api data
|
|
37
39
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
38
40
|
// @ts-ignore
|
|
39
|
-
/* @__PURE__ */ o(W, { ...
|
|
40
|
-
r !== t.FACTOID && r !== t.TWEET && /* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o(W, { ...l, action: i }),
|
|
42
|
+
r !== t.FACTOID && r !== t.TWEET && /* @__PURE__ */ p(c, { children: [
|
|
41
43
|
/* @__PURE__ */ o(A, { children: m == null ? void 0 : m.title }),
|
|
42
44
|
/* @__PURE__ */ o(D, { onClick: i, children: "Answer" })
|
|
43
45
|
] })
|
|
44
46
|
] }) : null;
|
|
45
47
|
};
|
|
46
48
|
export {
|
|
47
|
-
|
|
49
|
+
y as Notification
|
|
48
50
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { VideoPlayer as
|
|
3
|
-
import { InsightContainer as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { VideoPlayer as c } from "../../../../video-player/index.js";
|
|
3
|
+
import { InsightContainer as h, Image as p, InsightContent as o, Title as u, Description as e, ActionBtn as I } from "./styles.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../../../icons/index.js";
|
|
6
6
|
import "@linaria/react";
|
|
@@ -8,16 +8,16 @@ import "../../../../video-player/styles.js";
|
|
|
8
8
|
const b = ({
|
|
9
9
|
video: r,
|
|
10
10
|
image: n,
|
|
11
|
-
heading:
|
|
12
|
-
body:
|
|
13
|
-
action:
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
-
(r == null ? void 0 : r.url) && /* @__PURE__ */ t(
|
|
16
|
-
n && /* @__PURE__ */ t(
|
|
17
|
-
/* @__PURE__ */ o
|
|
18
|
-
/* @__PURE__ */ t(p, { children: l }),
|
|
11
|
+
heading: s,
|
|
12
|
+
body: m,
|
|
13
|
+
action: l
|
|
14
|
+
}) => /* @__PURE__ */ i(h, { children: [
|
|
15
|
+
(r == null ? void 0 : r.url) && /* @__PURE__ */ t(c, { source: r.url, poster: r.thumbnailUrl }),
|
|
16
|
+
n && !(r != null && r.url) && /* @__PURE__ */ t(p, { src: n }),
|
|
17
|
+
/* @__PURE__ */ i(o, { children: [
|
|
19
18
|
/* @__PURE__ */ t(u, { children: s }),
|
|
20
|
-
|
|
19
|
+
/* @__PURE__ */ t(e, { children: m }),
|
|
20
|
+
l && /* @__PURE__ */ t(I, { onClick: l, children: "View Insight" })
|
|
21
21
|
] })
|
|
22
22
|
] });
|
|
23
23
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Notification } from '@streamlayer/sdk-web-notifications';
|
|
3
|
-
import { TwitterContentProps } from '../../../../questions/twitter';
|
|
3
|
+
import { type TwitterContentProps } from '../../../../questions/twitter';
|
|
4
4
|
export declare const Tweet: React.FC<TwitterContentProps & {
|
|
5
5
|
action: Notification['action'];
|
|
6
6
|
}>;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { Container as
|
|
1
|
+
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { TwitterContent as e } from "../../../../questions/twitter/index.js";
|
|
3
|
+
import { Container as n, QuoteWrap as m, Quote as l, ActionBtn as p } from "./styles.js";
|
|
4
|
+
import "../../../../questions/twitter/account/index.js";
|
|
4
5
|
import "../../../../icons/index.js";
|
|
5
6
|
import "@linaria/react";
|
|
6
7
|
import "react";
|
|
7
8
|
import "../../../../questions/twitter/account/styles.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
action: t
|
|
14
|
-
}) => /* @__PURE__ */ e(p, { children: [
|
|
15
|
-
/* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(d, { children: c }) }),
|
|
16
|
-
/* @__PURE__ */ e(h, { children: [
|
|
17
|
-
/* @__PURE__ */ r(m, { ...i }),
|
|
18
|
-
/* @__PURE__ */ r(s, { children: n }),
|
|
19
|
-
o && /* @__PURE__ */ r(u, { src: o })
|
|
20
|
-
] }),
|
|
21
|
-
t && /* @__PURE__ */ r(f, { onClick: t, children: "View Tweet" })
|
|
9
|
+
import "../../../../questions/twitter/styles.js";
|
|
10
|
+
const j = ({ action: r, ...i }) => /* @__PURE__ */ o(n, { children: [
|
|
11
|
+
i.title && /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(l, { children: i.title }) }),
|
|
12
|
+
/* @__PURE__ */ t(e, { ...i }),
|
|
13
|
+
r && /* @__PURE__ */ t(p, { onClick: r, children: "View Insight" })
|
|
22
14
|
] });
|
|
23
15
|
export {
|
|
24
|
-
|
|
16
|
+
j as Tweet
|
|
25
17
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const ActionBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
4
|
-
export declare const Body: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
-
export declare const Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
6
|
-
export declare const Details: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
4
|
export declare const QuoteWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
5
|
export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
|
|
@@ -1,39 +1,24 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const t = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "c1t4f0x4",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}),
|
|
6
|
+
}), n = /* @__PURE__ */ s("button")({
|
|
7
7
|
name: "ActionBtn",
|
|
8
8
|
class: "a16w1nl6",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
name: "Body",
|
|
12
|
-
class: "b14u54rf",
|
|
13
|
-
propsAsIs: !1
|
|
14
|
-
}), n = /* @__PURE__ */ s("img")({
|
|
15
|
-
name: "Image",
|
|
16
|
-
class: "i1hxm6zo",
|
|
17
|
-
propsAsIs: !1
|
|
18
|
-
}), l = /* @__PURE__ */ s("div")({
|
|
19
|
-
name: "Details",
|
|
20
|
-
class: "d1s19yop",
|
|
21
|
-
propsAsIs: !1
|
|
22
|
-
}), c = /* @__PURE__ */ s("div")({
|
|
10
|
+
}), e = /* @__PURE__ */ s("div")({
|
|
23
11
|
name: "QuoteWrap",
|
|
24
|
-
class: "
|
|
12
|
+
class: "q14u54rf",
|
|
25
13
|
propsAsIs: !1
|
|
26
|
-
}),
|
|
14
|
+
}), a = /* @__PURE__ */ s("blockquote")({
|
|
27
15
|
name: "Quote",
|
|
28
|
-
class: "
|
|
16
|
+
class: "q1hxm6zo",
|
|
29
17
|
propsAsIs: !1
|
|
30
18
|
});
|
|
31
19
|
export {
|
|
32
|
-
|
|
33
|
-
t as
|
|
34
|
-
a as
|
|
35
|
-
|
|
36
|
-
n as Image,
|
|
37
|
-
p as Quote,
|
|
38
|
-
c as QuoteWrap
|
|
20
|
+
n as ActionBtn,
|
|
21
|
+
t as Container,
|
|
22
|
+
a as Quote,
|
|
23
|
+
e as QuoteWrap
|
|
39
24
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TwitterContentProps } from '../../../questions/twitter';
|
|
3
|
-
export declare const Twitter: React.FC<TwitterContentProps
|
|
2
|
+
import { type TwitterContentProps } from '../../../questions/twitter';
|
|
3
|
+
export declare const Twitter: React.FC<TwitterContentProps & {
|
|
4
|
+
openTweet?: (questionId: string) => void;
|
|
5
|
+
}>;
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as a } from "react";
|
|
3
|
+
import { TwitterContent as l } from "../../../questions/twitter/index.js";
|
|
4
|
+
import { isValidDate as f, formatDate as d, formatTime as c } from "../../../../utils/common.js";
|
|
5
|
+
import { Container as u, DateTime as p, Quote as s, ActionButton as h } from "./styles.js";
|
|
4
6
|
import "../../../questions/twitter/account/index.js";
|
|
5
7
|
import "../../../icons/index.js";
|
|
6
8
|
import "@linaria/react";
|
|
7
|
-
import "react";
|
|
8
9
|
import "../../../questions/twitter/account/styles.js";
|
|
9
10
|
import "../../../questions/twitter/styles.js";
|
|
10
11
|
import "../../../button/index.js";
|
|
11
12
|
import "../../../button/styles.js";
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const M = ({
|
|
14
|
+
openTweet: m,
|
|
15
|
+
created: i,
|
|
16
|
+
...t
|
|
17
|
+
}) => {
|
|
18
|
+
const r = a(() => {
|
|
19
|
+
if (i) {
|
|
20
|
+
const e = new Date(i);
|
|
21
|
+
if (f(e))
|
|
22
|
+
return {
|
|
23
|
+
date: d(e),
|
|
24
|
+
time: c(e)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}, [i]);
|
|
29
|
+
return /* @__PURE__ */ n(u, { children: [
|
|
30
|
+
r && /* @__PURE__ */ n(p, { children: [
|
|
31
|
+
r.date,
|
|
32
|
+
" · ",
|
|
33
|
+
r.time
|
|
34
|
+
] }),
|
|
35
|
+
t.title && /* @__PURE__ */ o(s, { children: t.title }),
|
|
36
|
+
/* @__PURE__ */ o(l, { ...t }),
|
|
37
|
+
m && /* @__PURE__ */ o(h, { onClick: () => m(t.tweetId), children: "View Insight" })
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
16
40
|
export {
|
|
17
|
-
|
|
41
|
+
M as Twitter
|
|
18
42
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const ActionButton: any;
|
|
4
|
+
export declare const DateTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { styled as s } from "@linaria/react";
|
|
2
|
+
import { Button as t } from "../../../button/index.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../../button/styles.js";
|
|
5
|
-
const c = /* @__PURE__ */
|
|
5
|
+
const c = /* @__PURE__ */ s("div")({
|
|
6
6
|
name: "Container",
|
|
7
7
|
class: "cl56x6b",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), o = () => t, r = /* @__PURE__ */ s(o())({
|
|
10
10
|
name: "ActionButton",
|
|
11
11
|
class: "a11pzf92",
|
|
12
12
|
propsAsIs: !0
|
|
13
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
14
|
+
name: "DateTime",
|
|
15
|
+
class: "d1hbaleq",
|
|
16
|
+
propsAsIs: !1
|
|
17
|
+
}), i = /* @__PURE__ */ s("blockquote")({
|
|
18
|
+
name: "Quote",
|
|
19
|
+
class: "qvvgqjm",
|
|
20
|
+
propsAsIs: !1
|
|
13
21
|
});
|
|
14
22
|
export {
|
|
15
|
-
|
|
16
|
-
c as Container
|
|
23
|
+
r as ActionButton,
|
|
24
|
+
c as Container,
|
|
25
|
+
m as DateTime,
|
|
26
|
+
i as Quote
|
|
17
27
|
};
|
|
@@ -1,13 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as n } from "react";
|
|
3
|
+
import { TwitterContent as a } from "../../../questions/twitter/index.js";
|
|
4
|
+
import { isValidDate as f, formatDate as l, formatTime as p } from "../../../../utils/common.js";
|
|
5
|
+
import { Container as s, DateTime as d, Quote as u } from "./styles.js";
|
|
4
6
|
import "../../../questions/twitter/account/index.js";
|
|
5
7
|
import "../../../icons/index.js";
|
|
6
8
|
import "@linaria/react";
|
|
7
|
-
import "react";
|
|
8
9
|
import "../../../questions/twitter/account/styles.js";
|
|
9
10
|
import "../../../questions/twitter/styles.js";
|
|
10
|
-
const
|
|
11
|
+
const V = ({ created: t, ...i }) => {
|
|
12
|
+
const e = n(() => {
|
|
13
|
+
if (t) {
|
|
14
|
+
const r = new Date(t);
|
|
15
|
+
if (f(r))
|
|
16
|
+
return {
|
|
17
|
+
date: l(r),
|
|
18
|
+
time: p(r)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
}, [t]);
|
|
23
|
+
return /* @__PURE__ */ m(s, { children: [
|
|
24
|
+
e && /* @__PURE__ */ m(d, { children: [
|
|
25
|
+
e.date,
|
|
26
|
+
" · ",
|
|
27
|
+
e.time
|
|
28
|
+
] }),
|
|
29
|
+
i.title && /* @__PURE__ */ o(u, { children: i.title }),
|
|
30
|
+
/* @__PURE__ */ o(a, { ...i })
|
|
31
|
+
] });
|
|
32
|
+
};
|
|
11
33
|
export {
|
|
12
|
-
|
|
34
|
+
V as TwitterDetails
|
|
13
35
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const DateTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const o = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "c1dcxmvf",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
7
|
+
name: "DateTime",
|
|
8
|
+
class: "db4q22c",
|
|
9
|
+
propsAsIs: !1
|
|
10
|
+
}), a = /* @__PURE__ */ s("blockquote")({
|
|
11
|
+
name: "Quote",
|
|
12
|
+
class: "q111mmic",
|
|
13
|
+
propsAsIs: !1
|
|
6
14
|
});
|
|
7
15
|
export {
|
|
8
|
-
|
|
16
|
+
o as Container,
|
|
17
|
+
t as DateTime,
|
|
18
|
+
a as Quote
|
|
9
19
|
};
|