@edifice.io/react 2.6.13-develop-integration-demo.20261108143606 → 2.6.13-develop-b2school.20261109110305
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/dist/homepage.js +0 -4
- package/dist/modules/homepage/components/Header/Header.js +1 -1
- package/dist/modules/homepage/components/index.d.ts +1 -3
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +5 -7
- package/dist/modules/icons/components/nav/IconHomeBeta.js +6 -3
- package/dist/modules/icons/components/nav/IconMessagesBeta.js +7 -7
- package/dist/modules/icons/components/nav/IconMyAppsBeta.js +2 -3
- package/dist/modules/icons/components/nav/IconNotificationBeta.js +2 -4
- package/package.json +6 -6
- package/dist/modules/homepage/components/Captation/CaptationAudio/CaptationAudio.js +0 -44
- package/dist/modules/homepage/components/Captation/CaptationVideo/CaptationVideo.js +0 -44
- package/dist/modules/homepage/components/Captation/index.d.ts +0 -2
package/dist/homepage.js
CHANGED
|
@@ -30,8 +30,6 @@ import { BriefMeContainer } from "./modules/homepage/components/BriefMe/BriefMeC
|
|
|
30
30
|
import { COMMUNITIES_PREVIEW_SIZE, useCommunities } from "./modules/homepage/components/Communities/useCommunities.js";
|
|
31
31
|
import { CantineContainer } from "./modules/homepage/components/Cantine/CantineContainer.js";
|
|
32
32
|
import { CantineModalContainer } from "./modules/homepage/components/Cantine/CantineModalContainer.js";
|
|
33
|
-
import { CaptationAudio } from "./modules/homepage/components/Captation/CaptationAudio/CaptationAudio.js";
|
|
34
|
-
import { CaptationVideo } from "./modules/homepage/components/Captation/CaptationVideo/CaptationVideo.js";
|
|
35
33
|
import { CommunitiesContainer } from "./modules/homepage/components/Communities/CommunitiesContainer.js";
|
|
36
34
|
import { EDUMALIN_TYPES } from "./modules/homepage/components/Edumalin/types.js";
|
|
37
35
|
import { EdumalinContainer } from "./modules/homepage/components/Edumalin/EdumalinContainer.js";
|
|
@@ -79,8 +77,6 @@ export {
|
|
|
79
77
|
CantineContainer,
|
|
80
78
|
default5 as CantineModal,
|
|
81
79
|
CantineModalContainer,
|
|
82
|
-
CaptationAudio,
|
|
83
|
-
CaptationVideo,
|
|
84
80
|
default6 as Communities,
|
|
85
81
|
CommunitiesContainer,
|
|
86
82
|
default7 as CommunitiesItem,
|
|
@@ -63,7 +63,7 @@ const Header = ({
|
|
|
63
63
|
onNotificationsClick == null || onNotificationsClick();
|
|
64
64
|
};
|
|
65
65
|
return /* @__PURE__ */ jsx("header", { className: classes, "data-product": dataProduct, children: /* @__PURE__ */ jsxs(Navbar, { className: "px-24", children: [
|
|
66
|
-
/* @__PURE__ */ jsx(LogoBeta, { src: `${src}/img/illustrations/logo.png` }),
|
|
66
|
+
/* @__PURE__ */ jsx(LogoBeta, { src: `${src}/img/illustrations/logo-v2.png` }),
|
|
67
67
|
/* @__PURE__ */ jsxs("ul", { className: "navbar-nav", children: [
|
|
68
68
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/timeline/timeline", translate: t("navbar.home"), "data-testid": "header-home-button", title: t("navbar.home"), children: /* @__PURE__ */ jsx(SvgIconHomeBeta, {}) }) }),
|
|
69
69
|
communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/communities", translate: t("navbar.community"), "data-testid": "header-community-button", title: t("navbar.community"), children: /* @__PURE__ */ jsx(SvgIconCommunitiesBeta, { className: "icon community" }) }) }),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from './Agenda';
|
|
2
|
+
export * from './AlloRegion';
|
|
2
3
|
export * from './Communities';
|
|
3
4
|
export * from './BriefMe';
|
|
4
5
|
export * from './Cantine';
|
|
5
|
-
export * from './Captation';
|
|
6
6
|
export * from './Edumalin';
|
|
7
7
|
export * from './Favorites';
|
|
8
8
|
export * from './GenerationHdf';
|
|
@@ -19,7 +19,5 @@ export * from './ScreenTime';
|
|
|
19
19
|
export * from './UsefulLinks';
|
|
20
20
|
export * from './Universalis';
|
|
21
21
|
export * from './UserSpace';
|
|
22
|
-
export * from './Communities';
|
|
23
|
-
export * from './AlloRegion';
|
|
24
22
|
export * from './WidgetsPersonalizationPanel';
|
|
25
23
|
export * from './TabsKids';
|
|
@@ -3,15 +3,13 @@ const SvgIconCommunitiesBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", {
|
|
9
|
-
/* @__PURE__ */ jsx("path", {
|
|
10
|
-
/* @__PURE__ */ jsx("path", {
|
|
11
|
-
/* @__PURE__ */ jsx("path", { stroke: "#FC94FF", d: "M6.389 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H1.14v-6.837a5.25 5.25 0 0 1 5.248-5.248ZM25.637 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H20.389v-6.837a5.25 5.25 0 0 1 5.248-5.248Z" }),
|
|
12
|
-
/* @__PURE__ */ jsx("path", { fill: "#FEECFE", stroke: "#E26AE2", d: "M16.158 12.955a5.25 5.25 0 0 1 5.248 5.248v12.73H10.91v-12.73a5.25 5.25 0 0 1 5.248-5.248Z" })
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { fill: "currentColor", clipPath: "url(#icon-communities-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "M13.97 3.852a1.852 1.852 0 1 0-3.704.001 1.852 1.852 0 0 0 3.705-.001m2 0a3.853 3.853 0 1 1-7.705-.001 3.853 3.853 0 0 1 7.706 0M6.251 8.396a1.852 1.852 0 1 0-3.705.001 1.852 1.852 0 0 0 3.705-.001m2 0a3.853 3.853 0 1 1-7.706-.001 3.853 3.853 0 0 1 7.706 0M21.69 8.396a1.852 1.852 0 1 0-3.704.001 1.852 1.852 0 0 0 3.704-.001m2 0a3.853 3.853 0 1 1-7.705-.001 3.853 3.853 0 0 1 7.705 0M6.728 17.57c0-1.75-1.216-2.935-2.437-2.935s-2.435 1.185-2.435 2.936V21.7h4.872zm2 6.13H-.144v-6.13c0-2.591 1.864-4.934 4.435-4.935 2.572 0 4.436 2.344 4.437 4.936zM22.164 17.57c0-1.75-1.216-2.935-2.437-2.935s-2.435 1.185-2.436 2.936V21.7h4.873zm2 6.13H15.29v-6.13c0-2.591 1.865-4.934 4.436-4.935 2.572 0 4.436 2.344 4.437 4.936z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { d: "M15.055 13.152a2.94 2.94 0 0 0-2.937-2.935 2.94 2.94 0 0 0-2.935 2.935v8.549h5.872zm2 10.549H7.183V13.152a4.94 4.94 0 0 1 4.935-4.935 4.94 4.94 0 0 1 4.937 4.935z" })
|
|
13
11
|
] }),
|
|
14
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0
|
|
12
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-communities-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
15
13
|
] });
|
|
16
14
|
export {
|
|
17
15
|
SvgIconCommunitiesBeta as default
|
|
@@ -3,10 +3,13 @@ const SvgIconHomeBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { fill: "currentColor", clipPath: "url(#icon-home-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "M20.9 9.188 12 2.266 3.1 9.188V20.8A1.2 1.2 0 0 0 4.3 22h15.4a1.2 1.2 0 0 0 1.2-1.2zm2 11.612a3.2 3.2 0 0 1-3.2 3.2H4.3a3.2 3.2 0 0 1-3.2-3.2V8.7a1 1 0 0 1 .386-.789l9.9-7.7.142-.093a1 1 0 0 1 1.086.093l9.9 7.7a1 1 0 0 1 .386.79z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { d: "M14.3 23V13H9.7v10a1 1 0 1 1-2 0V12a1 1 0 0 1 1-1h6.6a1 1 0 0 1 1 1v11a1 1 0 1 1-2 0" })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-home-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
10
13
|
] });
|
|
11
14
|
export {
|
|
12
15
|
SvgIconHomeBeta as default
|
|
@@ -3,15 +3,15 @@ const SvgIconMessagesBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsxs("g", { clipPath: "url(#icon-messages-beta_svg__a)", children: [
|
|
9
|
-
/* @__PURE__ */ jsx("path", {
|
|
10
|
-
/* @__PURE__ */ jsx("path", {
|
|
11
|
-
/* @__PURE__ */ jsx("path", {
|
|
12
|
-
/* @__PURE__ */ jsx("path", {
|
|
8
|
+
/* @__PURE__ */ jsxs("g", { fill: "currentColor", clipPath: "url(#icon-messages-beta_svg__a)", children: [
|
|
9
|
+
/* @__PURE__ */ jsx("path", { d: "M23.401 9.243V23.4H4.821A4.824 4.824 0 0 1 0 18.578V9.243l3.898-2.508L4.98 8.417 2 10.334v8.244A2.824 2.824 0 0 0 4.821 21.4h16.58V10.334l-2.9-1.863.541-.841.54-.842z" }),
|
|
10
|
+
/* @__PURE__ */ jsx("path", { d: "M19.962 0v11.318h-2V2H5.439v9.318h-2V0z" }),
|
|
11
|
+
/* @__PURE__ */ jsx("path", { d: "M16.669 3.773v2H6.732v-2zM15.904 7.546v2H7.496v-2z" }),
|
|
12
|
+
/* @__PURE__ */ jsx("path", { d: "m22.898 10.657-10.702 6.114-.496.284-.496-.284-10.7-6.114.992-1.736L11.7 14.75l10.204-5.83z" })
|
|
13
13
|
] }),
|
|
14
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0
|
|
14
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-messages-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h24v24H0z" }) }) })
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
17
|
SvgIconMessagesBeta as default
|
|
@@ -3,10 +3,9 @@ const SvgIconMyAppsBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("g", {
|
|
9
|
-
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("clipPath", { id: "icon-my-apps-beta_svg__a", children: /* @__PURE__ */ jsx("path", { fill: "#fff", d: "M0 0h32v32H0z" }) }) })
|
|
8
|
+
/* @__PURE__ */ jsx("g", { fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M23 1v10.182H12.818V1zm-8.182 8.182H21V3h-6.182zM23 12.818V23H12.818V12.818zM14.818 21H21v-6.182h-6.182zM11.182 12.818V23H1V12.818zM3 21h6.182v-6.182H3zM2.049 1l.141.003q.181.005.492.03c.41.034.98.108 1.63.26 1.287.301 2.963.931 4.304 2.272 1.341 1.342 1.972 3.018 2.274 4.304.152.65.224 1.22.26 1.631a9 9 0 0 1 .032.633v.061l-.013.988H1V1.014L1.986 1 2 2l-.014-1zM3 9.182h6.1a10 10 0 0 0-.158-.857c-.255-1.088-.76-2.366-1.74-3.346C6.223 4 4.945 3.495 3.856 3.24A10 10 0 0 0 3 3.081z" }) })
|
|
10
9
|
] });
|
|
11
10
|
export {
|
|
12
11
|
SvgIconMyAppsBeta as default
|
|
@@ -3,11 +3,9 @@ const SvgIconNotificationBeta = ({
|
|
|
3
3
|
title,
|
|
4
4
|
titleId,
|
|
5
5
|
...props
|
|
6
|
-
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0
|
|
6
|
+
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", {
|
|
9
|
-
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M28.62 18.901H4.058v6.682h24.56z" }),
|
|
10
|
-
/* @__PURE__ */ jsx("path", { stroke: "#1C1C73", strokeMiterlimit: 10, strokeWidth: 2.667, d: "M16.189 4.889c5.639 0 10.22 4.581 10.22 10.22v3.794H5.97V15.11c0-5.639 4.581-10.22 10.22-10.22Z" })
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M12.016.5a3.04 3.04 0 0 1 3.02 2.663c3.36 1.192 5.771 4.401 5.772 8.168v1.845h1.656v7.01h-6.522a3.94 3.94 0 0 1-7.778 0h-6.12v-7.01h1.434V11.33c0-3.666 2.284-6.802 5.505-8.066A3.045 3.045 0 0 1 12.016.5m-1.798 19.687a1.94 1.94 0 0 0 3.67 0zm-6.175-5.01v3.01h16.42v-3.01zm8.1-10.511a6.67 6.67 0 0 0-6.665 6.665v1.845h13.33V11.33a6.67 6.67 0 0 0-6.665-6.665" })
|
|
11
9
|
] });
|
|
12
10
|
export {
|
|
13
11
|
SvgIconNotificationBeta as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.6.13-develop-
|
|
3
|
+
"version": "2.6.13-develop-b2school.20261109110305",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -141,9 +141,9 @@
|
|
|
141
141
|
"swiper": "10.1.0",
|
|
142
142
|
"ua-parser-js": "1.0.36",
|
|
143
143
|
"zustand": "4.5.7",
|
|
144
|
-
"@edifice.io/
|
|
145
|
-
"@edifice.io/
|
|
146
|
-
"@edifice.io/
|
|
144
|
+
"@edifice.io/tiptap-extensions": "2.6.13-develop-b2school.20261109110305",
|
|
145
|
+
"@edifice.io/utilities": "2.6.13-develop-b2school.20261109110305",
|
|
146
|
+
"@edifice.io/bootstrap": "2.6.13-develop-b2school.20261109110305"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
|
149
149
|
"@babel/plugin-transform-react-pure-annotations": "7.27.1",
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
"vite": "5.4.14",
|
|
176
176
|
"vite-plugin-dts": "4.5.4",
|
|
177
177
|
"vite-tsconfig-paths": "5.1.4",
|
|
178
|
-
"@edifice.io/client": "2.6.13-develop-
|
|
179
|
-
"@edifice.io/config": "2.6.13-develop-
|
|
178
|
+
"@edifice.io/client": "2.6.13-develop-b2school.20261109110305",
|
|
179
|
+
"@edifice.io/config": "2.6.13-develop-b2school.20261109110305"
|
|
180
180
|
},
|
|
181
181
|
"peerDependencies": {
|
|
182
182
|
"@react-spring/web": "9.7.5",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState, useEffect } from "react";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import useToast from "../../../../../hooks/useToast/useToast.js";
|
|
5
|
-
import ModalBeta from "../../../../../components/ModalBeta/ModalBeta.js";
|
|
6
|
-
import AudioRecorder from "../../../../multimedia/AudioRecorder/AudioRecorder.js";
|
|
7
|
-
import ButtonBeta from "../../../../../components/ButtonBeta/ButtonBeta.js";
|
|
8
|
-
function CaptationAudio({
|
|
9
|
-
isOpen,
|
|
10
|
-
onClose,
|
|
11
|
-
onSaveSuccess
|
|
12
|
-
}) {
|
|
13
|
-
const {
|
|
14
|
-
t
|
|
15
|
-
} = useTranslation(), recorderRef = useRef(null), [recordURL, setRecordURL] = useState(), [hasName, setHasName] = useState(!0), [isSaving, setIsSaving] = useState(!1), toast = useToast();
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
isOpen && setHasName(!0);
|
|
18
|
-
}, [isOpen]);
|
|
19
|
-
const handleSave = async () => {
|
|
20
|
-
var _a;
|
|
21
|
-
setIsSaving(!0);
|
|
22
|
-
try {
|
|
23
|
-
const resource = await ((_a = recorderRef.current) == null ? void 0 : _a.save());
|
|
24
|
-
if (!resource)
|
|
25
|
-
throw new Error("Audio record was not saved");
|
|
26
|
-
onSaveSuccess == null || onSaveSuccess(resource), toast.success(t("homepage.captationAudio.alert.sucess")), onClose();
|
|
27
|
-
} catch (err) {
|
|
28
|
-
toast.error(t("homepage.captationAudio.alert.error")), console.error(err);
|
|
29
|
-
} finally {
|
|
30
|
-
setIsSaving(!1);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ jsxs(ModalBeta, { id: "captation-audio-modal", isOpen, size: "xl", onModalClose: onClose, children: [
|
|
34
|
-
/* @__PURE__ */ jsx(ModalBeta.Header, { onModalClose: onClose, children: t("homepage.captationAudio.modal.title") }),
|
|
35
|
-
/* @__PURE__ */ jsx(ModalBeta.Body, { children: /* @__PURE__ */ jsx(AudioRecorder, { ref: recorderRef, hideSaveAction: !0, onRecordUpdated: setRecordURL, onNameChange: (name) => setHasName(!!name.trim()) }) }),
|
|
36
|
-
/* @__PURE__ */ jsxs(ModalBeta.Footer, { children: [
|
|
37
|
-
/* @__PURE__ */ jsx(ButtonBeta, { type: "button", variant: "ghost", color: "tertiary", "data-testid": "captation-audio-button-cancel", onClick: onClose, children: t("homepage.captationAudio.cancel") }),
|
|
38
|
-
/* @__PURE__ */ jsx(ButtonBeta, { type: "button", isLoading: isSaving, disabled: !recordURL || !hasName || isSaving, "data-testid": "captation-audio-button-save", onClick: handleSave, children: t("homepage.captationAudio.save") })
|
|
39
|
-
] })
|
|
40
|
-
] });
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
CaptationAudio
|
|
44
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useRef, useState, useEffect } from "react";
|
|
3
|
-
import { useTranslation } from "react-i18next";
|
|
4
|
-
import useToast from "../../../../../hooks/useToast/useToast.js";
|
|
5
|
-
import ModalBeta from "../../../../../components/ModalBeta/ModalBeta.js";
|
|
6
|
-
import VideoRecorder from "../../../../multimedia/VideoRecorder/VideoRecorder.js";
|
|
7
|
-
import ButtonBeta from "../../../../../components/ButtonBeta/ButtonBeta.js";
|
|
8
|
-
function CaptationVideo({
|
|
9
|
-
isOpen,
|
|
10
|
-
onClose,
|
|
11
|
-
onSaveSuccess,
|
|
12
|
-
appCode = "homepage"
|
|
13
|
-
}) {
|
|
14
|
-
const {
|
|
15
|
-
t
|
|
16
|
-
} = useTranslation(), recorderRef = useRef(null), [recordURL, setRecordURL] = useState(), [hasName, setHasName] = useState(!0), [isSaving, setIsSaving] = useState(!1), toast = useToast();
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
isOpen && setHasName(!0);
|
|
19
|
-
}, [isOpen]);
|
|
20
|
-
const handleSuccess = (resources) => {
|
|
21
|
-
toast.success(t("homepage.captationVideo.save.success")), resources[0] && (onSaveSuccess == null || onSaveSuccess(resources[0])), onClose();
|
|
22
|
-
}, handleError = (error) => {
|
|
23
|
-
toast.error(t("homepage.captationVideo.save.error")), console.error(error);
|
|
24
|
-
}, handleSave = async () => {
|
|
25
|
-
var _a;
|
|
26
|
-
setIsSaving(!0);
|
|
27
|
-
try {
|
|
28
|
-
await ((_a = recorderRef.current) == null ? void 0 : _a.save());
|
|
29
|
-
} finally {
|
|
30
|
-
setIsSaving(!1);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ jsxs(ModalBeta, { id: "captation-video-modal", isOpen, size: "xl", onModalClose: onClose, children: [
|
|
34
|
-
/* @__PURE__ */ jsx(ModalBeta.Header, { onModalClose: onClose, children: t("homepage.captationVideo.modal.title") }),
|
|
35
|
-
/* @__PURE__ */ jsx(ModalBeta.Body, { children: /* @__PURE__ */ jsx(VideoRecorder, { ref: recorderRef, appCode, hideSaveAction: !0, onRecordUpdated: setRecordURL, onNameChange: (name) => setHasName(!!name.trim()), onSuccess: handleSuccess, onError: handleError }) }),
|
|
36
|
-
/* @__PURE__ */ jsxs(ModalBeta.Footer, { children: [
|
|
37
|
-
/* @__PURE__ */ jsx(ButtonBeta, { type: "button", variant: "ghost", color: "tertiary", "data-testid": "captation-video-button-cancel", onClick: onClose, children: t("homepage.captationVideo.cancel") }),
|
|
38
|
-
/* @__PURE__ */ jsx(ButtonBeta, { type: "button", isLoading: isSaving, disabled: !recordURL || !hasName || isSaving, "data-testid": "captation-video-button-save", onClick: handleSave, children: t("homepage.captationVideo.save") })
|
|
39
|
-
] })
|
|
40
|
-
] });
|
|
41
|
-
}
|
|
42
|
-
export {
|
|
43
|
-
CaptationVideo
|
|
44
|
-
};
|