@streamlayer/react-ui 0.76.1 → 0.76.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { InsightContent as n } from "../../../questions/insight/index.js";
|
|
3
|
-
import { Container as p, ActionBtn as
|
|
3
|
+
import { Container as p, ActionBtn as s } from "./styles.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../../video-player/index.js";
|
|
6
6
|
import "../../../icons/index.js";
|
|
@@ -8,14 +8,14 @@ import "@linaria/react";
|
|
|
8
8
|
import "../../../video-player/styles.js";
|
|
9
9
|
import "../../../../utils/common.js";
|
|
10
10
|
import "../../../questions/insight/styles.js";
|
|
11
|
-
const
|
|
11
|
+
const a = ({
|
|
12
12
|
openInsight: r,
|
|
13
13
|
questionId: t,
|
|
14
14
|
...o
|
|
15
15
|
}) => /* @__PURE__ */ m(p, { children: [
|
|
16
|
-
/* @__PURE__ */ i(n, { questionId: t, ...o }),
|
|
17
|
-
r && /* @__PURE__ */ i(
|
|
16
|
+
/* @__PURE__ */ i(n, { questionId: t, ...o, isPickHistory: !0 }),
|
|
17
|
+
r && /* @__PURE__ */ i(s, { onClick: () => r(t), children: "View Insight" })
|
|
18
18
|
] });
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
a as Insight
|
|
21
21
|
};
|
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { VideoPlayer as
|
|
4
|
-
import { isValidDate as
|
|
5
|
-
import { Container as
|
|
2
|
+
import { useMemo as u } from "react";
|
|
3
|
+
import { VideoPlayer as g } from "../../video-player/index.js";
|
|
4
|
+
import { isValidDate as D, formatDate as v, formatTime as x } from "../../../utils/common.js";
|
|
5
|
+
import { Container as C, DateWrap as T, Image as b, Content as j, Title as I, Description as U } from "./styles.js";
|
|
6
6
|
import "../../icons/index.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "../../video-player/styles.js";
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const F = ({
|
|
10
|
+
created: m,
|
|
11
|
+
image: f,
|
|
12
|
+
title: h,
|
|
13
|
+
isPickHistory: e,
|
|
14
|
+
instantView: r
|
|
15
|
+
}) => {
|
|
16
|
+
const d = u(() => {
|
|
11
17
|
if (m) {
|
|
12
18
|
const l = new Date(m);
|
|
13
|
-
if (
|
|
19
|
+
if (D(l))
|
|
14
20
|
return {
|
|
15
|
-
date:
|
|
16
|
-
time:
|
|
21
|
+
date: v(l),
|
|
22
|
+
time: x(l)
|
|
17
23
|
};
|
|
18
24
|
}
|
|
19
25
|
return null;
|
|
20
|
-
}, [m]),
|
|
21
|
-
return /* @__PURE__ */ p(
|
|
22
|
-
d && /* @__PURE__ */ p(
|
|
26
|
+
}, [m]), c = (r == null ? void 0 : r.image) || f;
|
|
27
|
+
return /* @__PURE__ */ p(C, { children: [
|
|
28
|
+
d && /* @__PURE__ */ p(T, { children: [
|
|
23
29
|
d.date,
|
|
24
30
|
" · ",
|
|
25
31
|
d.time
|
|
26
32
|
] }),
|
|
27
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */ o(
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ p(
|
|
30
|
-
/* @__PURE__ */ o(
|
|
31
|
-
/* @__PURE__ */ o(
|
|
33
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ o(g, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
34
|
+
c && !(r != null && r.video) && /* @__PURE__ */ o(b, { src: c }),
|
|
35
|
+
/* @__PURE__ */ p(j, { children: [
|
|
36
|
+
/* @__PURE__ */ o(I, { children: e ? h : r == null ? void 0 : r.heading }),
|
|
37
|
+
!e && /* @__PURE__ */ o(U, { children: r == null ? void 0 : r.body })
|
|
32
38
|
] })
|
|
33
39
|
] });
|
|
34
40
|
};
|
|
35
41
|
export {
|
|
36
|
-
|
|
42
|
+
F as InsightContent
|
|
37
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"@streamlayer/sdk-web": "^0.29.5",
|
|
45
45
|
"@streamlayer/sdk-web-anonymous-auth": "^0.11.30",
|
|
46
46
|
"@streamlayer/sdk-web-api": "^0.1.0",
|
|
47
|
-
"@streamlayer/sdk-web-features": "^0.10.37",
|
|
48
47
|
"@streamlayer/sdk-web-core": "^0.0.7",
|
|
49
48
|
"@streamlayer/sdk-web-interfaces": "^0.0.1",
|
|
49
|
+
"@streamlayer/sdk-web-features": "^0.10.37",
|
|
50
50
|
"@streamlayer/sdk-web-notifications": "^0.1.0",
|
|
51
51
|
"@streamlayer/sdk-web-storage": "^0.0.4",
|
|
52
52
|
"@streamlayer/sdk-web-logger": "^0.0.1",
|
|
@@ -90,6 +90,6 @@
|
|
|
90
90
|
"vite-plugin-svgr": "^4.1.0",
|
|
91
91
|
"vite-svg-loader": "^4.0.0",
|
|
92
92
|
"vite-tsconfig-paths": "^4.2.1",
|
|
93
|
-
"@streamlayer/react": "^0.32.
|
|
93
|
+
"@streamlayer/react": "^0.32.9"
|
|
94
94
|
}
|
|
95
95
|
}
|