@bigbinary/neeto-media-recorder 1.4.0-beta2 → 2.0.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/core.js +37 -20
- package/core.js.map +1 -1
- package/index.js +29 -14
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +4 -2
package/index.js
CHANGED
|
@@ -10,14 +10,15 @@ import { useTranslation, Trans } from 'react-i18next';
|
|
|
10
10
|
import { useMutation } from '@tanstack/react-query';
|
|
11
11
|
import axios from 'axios';
|
|
12
12
|
import withT from '@bigbinary/neeto-commons-frontend/react-utils/withT';
|
|
13
|
-
import { Computer, Unlock, Pause, Delete, Download, Close } from '@bigbinary/neeto-icons';
|
|
13
|
+
import { Computer, Unlock, Pause, Delete, Copy, Download, Close } from '@bigbinary/neeto-icons';
|
|
14
14
|
import platform from 'platform';
|
|
15
15
|
import { isNotNil, isEmpty } from 'ramda';
|
|
16
16
|
import { copyToClipboard } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
17
|
+
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
17
18
|
|
|
18
19
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
19
20
|
|
|
20
|
-
var css = ".nrec-done-button{background-color:rgb(var(--neeto-ui-error-100));padding:8px 12px}.nrec-done-button:hover{box-shadow:0 0 0 3px rgba(var(--neeto-ui-error-500),15%)}";
|
|
21
|
+
var css = ".nrec-done-button{background-color:rgb(var(--neeto-ui-error-100));padding:8px 12px}.nrec-done-button:hover{box-shadow:0 0 0 3px rgba(var(--neeto-ui-error-500),15%)}body .neeto-ui-modal__wrapper .neeto-ui-btn--style-danger{background:rgb(var(--neeto-ui-error-500))}.nrec-media-upload-loader{background:#d9d9d9;border-radius:14px;display:inline-block;height:10px;margin:0 auto;max-width:480px;overflow:hidden;position:relative;width:100%}.nrec-media-upload-loader:after{animation:movementLoader 3s linear infinite,barAnimation 1.5s linear infinite;background-color:#fff;background-image:linear-gradient(45deg,#268e6c 25%,#12805c 0,#12805c 50%,#268e6c 0,#268e6c 75%,#12805c 0,#12805c);background-size:1em 1em;border-radius:14px;box-sizing:border-box;content:\"\";height:10px;left:0;position:absolute;top:0;width:230px}@media only screen and (max-width:767px){.nrec-media-upload-loader:after{width:130px}}@keyframes barAnimation{0%{background-position:1em 0}to{background-position:0 0}}@keyframes movementLoader{0%{left:0;transform:translateX(-100%)}to{left:100%;transform:translateX(0)}}";
|
|
21
22
|
n(css,{});
|
|
22
23
|
|
|
23
24
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -969,31 +970,45 @@ var UploadingInProgress = function UploadingInProgress(_ref) {
|
|
|
969
970
|
return /*#__PURE__*/React.createElement("div", {
|
|
970
971
|
className: "flex h-screen w-full flex-col items-center justify-center"
|
|
971
972
|
}, /*#__PURE__*/React.createElement("div", {
|
|
972
|
-
className: "flex h-full w-full flex-col items-center justify-start py-
|
|
973
|
+
className: "flex h-full w-full flex-col items-center justify-start py-14 lg:py-20 xl:py-28 2xl:py-36"
|
|
973
974
|
}, /*#__PURE__*/React.createElement("div", {
|
|
974
|
-
className: "w-full
|
|
975
|
+
className: "w-full pb-6 text-center"
|
|
975
976
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
976
|
-
className: "select-none",
|
|
977
|
+
className: "select-none pb-6",
|
|
978
|
+
"data-cy": "please-dont-close-this-tab",
|
|
979
|
+
style: "h1"
|
|
980
|
+
}, t("neetoMediaRecorder.record.pleaseDontCloseThisTab")), /*#__PURE__*/React.createElement(Typography, {
|
|
981
|
+
className: "select-none pb-3",
|
|
977
982
|
"data-cy": "recorder-uploading-recording-message",
|
|
978
|
-
style: "h2"
|
|
979
|
-
|
|
980
|
-
|
|
983
|
+
style: "h2",
|
|
984
|
+
weight: "normal"
|
|
985
|
+
}, t("neetoMediaRecorder.record.uploadingRecording")), /*#__PURE__*/React.createElement("div", {
|
|
986
|
+
className: "pb-3"
|
|
987
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
988
|
+
className: "nrec-media-upload-loader"
|
|
981
989
|
})), /*#__PURE__*/React.createElement(Typography, {
|
|
982
990
|
className: "select-none",
|
|
983
|
-
"data-cy": "recorder-do-not-leave-page-message"
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
991
|
+
"data-cy": "recorder-do-not-leave-page-message",
|
|
992
|
+
style: "body2"
|
|
993
|
+
}, t("neetoMediaRecorder.record.copyLinkDescription"))), /*#__PURE__*/React.createElement("div", {
|
|
994
|
+
className: "flex flex-wrap items-center justify-center gap-3"
|
|
995
|
+
}, /*#__PURE__*/React.createElement(CopyToClipboardButton, {
|
|
996
|
+
"data-cy": "recorder-copy-link-button",
|
|
997
|
+
icon: Copy,
|
|
998
|
+
label: t("neetoMediaRecorder.record.copyToClipboard"),
|
|
999
|
+
style: "tertiary",
|
|
1000
|
+
value: generatePublicUrl(recording.id, baseURL)
|
|
1001
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
987
1002
|
"data-cy": "recorder-download-webm-button",
|
|
988
1003
|
icon: Download,
|
|
989
1004
|
label: t("neetoMediaRecorder.record.downloadWebm"),
|
|
990
|
-
style: "
|
|
1005
|
+
style: "tertiary",
|
|
991
1006
|
onClick: handleRecordingBlobDownload
|
|
992
1007
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
993
1008
|
"data-cy": "recorder-discard-recording-button",
|
|
994
1009
|
icon: Close,
|
|
995
1010
|
label: t("neetoMediaRecorder.record.discardRecording"),
|
|
996
|
-
style: "
|
|
1011
|
+
style: "tertiary",
|
|
997
1012
|
onClick: function onClick() {
|
|
998
1013
|
return setIsDiscardAlertOpen(true);
|
|
999
1014
|
}
|