@snapcall/stream-ui 1.44.1 → 1.44.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.
- package/dist/stream-ui.esm.js +74 -61
- package/dist/stream-ui.js +72 -59
- package/package.json +1 -1
package/dist/stream-ui.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import {QueryClient as $3Sbms$QueryClient, QueryClientProvider as $3Sbms$QueryCl
|
|
|
4
4
|
import {I18nextProvider as $3Sbms$I18nextProvider, initReactI18next as $3Sbms$initReactI18next, useTranslation as $3Sbms$useTranslation, Trans as $3Sbms$Trans} from "react-i18next";
|
|
5
5
|
import {createInstance as $3Sbms$createInstance} from "i18next";
|
|
6
6
|
import {toast as $3Sbms$toast, useToast as $3Sbms$useToast, useDialogState as $3Sbms$useDialogState, ToastAction as $3Sbms$ToastAction, TooltipProvider as $3Sbms$TooltipProvider, Toaster as $3Sbms$Toaster, DropdownMenu as $3Sbms$DropdownMenu, DropdownMenuTrigger as $3Sbms$DropdownMenuTrigger, Button as $3Sbms$Button, DropdownMenuPortal as $3Sbms$DropdownMenuPortal, DropdownMenuContent as $3Sbms$DropdownMenuContent, DropdownMenuItem as $3Sbms$DropdownMenuItem, Tooltip as $3Sbms$Tooltip, TooltipTrigger as $3Sbms$TooltipTrigger, TooltipContent as $3Sbms$TooltipContent, Select as $3Sbms$Select, SelectTrigger as $3Sbms$SelectTrigger, SelectValue as $3Sbms$SelectValue, SelectContent as $3Sbms$SelectContent, SelectGroup as $3Sbms$SelectGroup, SelectItem as $3Sbms$SelectItem, Dialog as $3Sbms$Dialog, DialogContent as $3Sbms$DialogContent, DialogHeader as $3Sbms$DialogHeader, DialogTitle as $3Sbms$DialogTitle, Tabs as $3Sbms$Tabs, TabsList as $3Sbms$TabsList, TabsTrigger as $3Sbms$TabsTrigger, TabsContent as $3Sbms$TabsContent, Separator as $3Sbms$Separator, Input as $3Sbms$Input, CreatableSelect as $3Sbms$CreatableSelect, Textarea as $3Sbms$Textarea, DialogDescription as $3Sbms$DialogDescription, DialogFooter as $3Sbms$DialogFooter, AlertDialog as $3Sbms$AlertDialog, Sheet as $3Sbms$Sheet, DialogTrigger as $3Sbms$DialogTrigger, AlertDialogTrigger as $3Sbms$AlertDialogTrigger, SheetTrigger as $3Sbms$SheetTrigger, AlertDialogHeader as $3Sbms$AlertDialogHeader, SheetHeader as $3Sbms$SheetHeader, SheetClose as $3Sbms$SheetClose, AlertDialogContent as $3Sbms$AlertDialogContent, SheetContent as $3Sbms$SheetContent, AlertDialogTitle as $3Sbms$AlertDialogTitle, SheetTitle as $3Sbms$SheetTitle, AlertDialogDescription as $3Sbms$AlertDialogDescription, SheetDescription as $3Sbms$SheetDescription, Avatar as $3Sbms$Avatar, AlertDialogFooter as $3Sbms$AlertDialogFooter, AlertDialogCancel as $3Sbms$AlertDialogCancel, AlertDialogAction as $3Sbms$AlertDialogAction, DropdownMenuSeparator as $3Sbms$DropdownMenuSeparator, Banner as $3Sbms$Banner, Popover as $3Sbms$Popover, PopoverTrigger as $3Sbms$PopoverTrigger, PopoverContent as $3Sbms$PopoverContent, PopoverArrow as $3Sbms$PopoverArrow, MediaCard as $3Sbms$MediaCard, Skeleton as $3Sbms$Skeleton} from "@snapcall/design-system";
|
|
7
|
-
import {useRef as $3Sbms$useRef, useState as $3Sbms$useState, useCallback as $3Sbms$useCallback, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, cloneElement as $3Sbms$cloneElement, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer,
|
|
7
|
+
import {useRef as $3Sbms$useRef, useState as $3Sbms$useState, useCallback as $3Sbms$useCallback, useEffect as $3Sbms$useEffect, useContext as $3Sbms$useContext, useMemo as $3Sbms$useMemo, cloneElement as $3Sbms$cloneElement, createContext as $3Sbms$createContext, useReducer as $3Sbms$useReducer, useLayoutEffect as $3Sbms$useLayoutEffect, Fragment as $3Sbms$Fragment1, forwardRef as $3Sbms$forwardRef} from "react";
|
|
8
8
|
import $3Sbms$classnames from "classnames";
|
|
9
9
|
import "inobounce";
|
|
10
10
|
import {RecordIcon as $3Sbms$RecordIcon, InfoCircleIcon as $3Sbms$InfoCircleIcon, Speedometer4Icon as $3Sbms$Speedometer4Icon, Copy7Icon as $3Sbms$Copy7Icon, LinkExternal1Icon as $3Sbms$LinkExternal1Icon, QrCode1Icon as $3Sbms$QrCode1Icon, UserPlus1Icon as $3Sbms$UserPlus1Icon, XCloseIcon as $3Sbms$XCloseIcon, Settings1Icon as $3Sbms$Settings1Icon, Menu1Icon as $3Sbms$Menu1Icon, PhoneCall1Icon as $3Sbms$PhoneCall1Icon, VideoRecorderIcon as $3Sbms$VideoRecorderIcon, Recording2Icon as $3Sbms$Recording2Icon, Monitor2Icon as $3Sbms$Monitor2Icon, Camera2Icon as $3Sbms$Camera2Icon, Copy5Icon as $3Sbms$Copy5Icon, CheckIcon as $3Sbms$CheckIcon, XCircleIcon as $3Sbms$XCircleIcon, Send3Icon as $3Sbms$Send3Icon, AlertTriangleIcon as $3Sbms$AlertTriangleIcon, CopyIcon as $3Sbms$CopyIcon, Link1Icon as $3Sbms$Link1Icon, VolumeMaxIcon as $3Sbms$VolumeMaxIcon, Settings3Icon as $3Sbms$Settings3Icon, UserSquareIcon as $3Sbms$UserSquareIcon, Recording3Icon as $3Sbms$Recording3Icon, ArrowLeftIcon as $3Sbms$ArrowLeftIcon, HelpCircleIcon as $3Sbms$HelpCircleIcon, SpinnerIcon as $3Sbms$SpinnerIcon, User1Icon as $3Sbms$User1Icon, Microphone1Icon as $3Sbms$Microphone1Icon, MicrophoneOff1Icon as $3Sbms$MicrophoneOff1Icon, VideoRecorderOffIcon as $3Sbms$VideoRecorderOffIcon, CameraPlusIcon as $3Sbms$CameraPlusIcon, CursorBoxIcon as $3Sbms$CursorBoxIcon, Minimize1Icon as $3Sbms$Minimize1Icon, Maximize1Icon as $3Sbms$Maximize1Icon, CheckCircleIcon as $3Sbms$CheckCircleIcon, Download1Icon as $3Sbms$Download1Icon, ScreensharingIcon as $3Sbms$ScreensharingIcon, RefreshCcw2Icon as $3Sbms$RefreshCcw2Icon, DotsVerticalIcon as $3Sbms$DotsVerticalIcon, YoutubeIcon as $3Sbms$YoutubeIcon, Upload3Icon as $3Sbms$Upload3Icon, LogIn2Icon as $3Sbms$LogIn2Icon, ChevronUpIcon as $3Sbms$ChevronUpIcon, ChevronDownIcon as $3Sbms$ChevronDownIcon, FlipBackwardIcon as $3Sbms$FlipBackwardIcon, ArrowUpRightIcon as $3Sbms$ArrowUpRightIcon, Star1Icon as $3Sbms$Star1Icon, ImageXIcon as $3Sbms$ImageXIcon, AnnotationInfoIcon as $3Sbms$AnnotationInfoIcon, Upload1Icon as $3Sbms$Upload1Icon, DotsHorizontalIcon as $3Sbms$DotsHorizontalIcon, RefreshCw3Icon as $3Sbms$RefreshCw3Icon, Camera1Icon as $3Sbms$Camera1Icon, File2Icon as $3Sbms$File2Icon, PlayIcon as $3Sbms$PlayIcon, FileQuestion3Icon as $3Sbms$FileQuestion3Icon, QrCodeIcon as $3Sbms$QrCodeIcon, MarkerPin4Icon as $3Sbms$MarkerPin4Icon, Edit5Icon as $3Sbms$Edit5Icon, UserCircleIcon as $3Sbms$UserCircleIcon, PlusCircleIcon as $3Sbms$PlusCircleIcon, Trash3Icon as $3Sbms$Trash3Icon, TrashIcon as $3Sbms$TrashIcon} from "@snapcall/design-system/icons";
|
|
@@ -16,7 +16,7 @@ import {Buffer as $3Sbms$Buffer} from "buffer";
|
|
|
16
16
|
import "./timer.43cfcbcc.js";
|
|
17
17
|
import {Form as $3Sbms$Form, FormField as $3Sbms$FormField, FormItem as $3Sbms$FormItem, FormLabel as $3Sbms$FormLabel, FormControl as $3Sbms$FormControl, FormMessage as $3Sbms$FormMessage} from "@snapcall/design-system/form";
|
|
18
18
|
import {useForm as $3Sbms$useForm} from "react-hook-form";
|
|
19
|
-
import {
|
|
19
|
+
import {toDataURL as $3Sbms$toDataURL} from "qrcode";
|
|
20
20
|
import $3Sbms$mixpanelbrowsersrcloadersloadermodulecore from "mixpanel-browser/src/loaders/loader-module-core";
|
|
21
21
|
import {createPortal as $3Sbms$createPortal} from "react-dom";
|
|
22
22
|
import $3Sbms$sumsubwebsdkreact from "@sumsub/websdk-react";
|
|
@@ -6000,10 +6000,64 @@ var $16d11fc0880587fd$export$2e2bcd8739ae039 = $16d11fc0880587fd$var$QuickConnec
|
|
|
6000
6000
|
|
|
6001
6001
|
|
|
6002
6002
|
|
|
6003
|
+
const $af23c74942bdcae7$export$2b86bedf890eab8 = (element)=>{
|
|
6004
|
+
const [size, setSize] = (0, $3Sbms$useState)([
|
|
6005
|
+
0,
|
|
6006
|
+
0
|
|
6007
|
+
]);
|
|
6008
|
+
(0, $3Sbms$useLayoutEffect)(()=>{
|
|
6009
|
+
const updateSize = ()=>setSize([
|
|
6010
|
+
element?.offsetWidth || 0,
|
|
6011
|
+
element?.offsetHeight || 0
|
|
6012
|
+
]);
|
|
6013
|
+
if (element) {
|
|
6014
|
+
const observer = new ResizeObserver(updateSize);
|
|
6015
|
+
observer.observe(element);
|
|
6016
|
+
return ()=>observer.unobserve(element);
|
|
6017
|
+
}
|
|
6018
|
+
}, [
|
|
6019
|
+
element
|
|
6020
|
+
]);
|
|
6021
|
+
return size;
|
|
6022
|
+
};
|
|
6023
|
+
const $af23c74942bdcae7$var$defaultState = {
|
|
6024
|
+
bottom: 0,
|
|
6025
|
+
height: 0,
|
|
6026
|
+
left: 0,
|
|
6027
|
+
right: 0,
|
|
6028
|
+
top: 0,
|
|
6029
|
+
width: 0,
|
|
6030
|
+
x: 0,
|
|
6031
|
+
y: 0
|
|
6032
|
+
};
|
|
6033
|
+
function $af23c74942bdcae7$export$e295b0c537d32d7d() {
|
|
6034
|
+
const [element, ref] = (0, $3Sbms$useState)(null);
|
|
6035
|
+
const [rect, setRect] = (0, $3Sbms$useState)($af23c74942bdcae7$var$defaultState);
|
|
6036
|
+
(0, $3Sbms$useLayoutEffect)(()=>{
|
|
6037
|
+
if (!element) return;
|
|
6038
|
+
const updateSize = (entries)=>setRect(entries[0].contentRect);
|
|
6039
|
+
const observer = new ResizeObserver(updateSize);
|
|
6040
|
+
observer.observe(element);
|
|
6041
|
+
return ()=>{
|
|
6042
|
+
observer.disconnect();
|
|
6043
|
+
};
|
|
6044
|
+
}, [
|
|
6045
|
+
element
|
|
6046
|
+
]);
|
|
6047
|
+
return [
|
|
6048
|
+
ref,
|
|
6049
|
+
rect
|
|
6050
|
+
];
|
|
6051
|
+
}
|
|
6052
|
+
|
|
6053
|
+
|
|
6054
|
+
|
|
6003
6055
|
const $e60b5ecf8ea46b91$export$ec0ae6f1b249c474 = ({ state: state })=>{
|
|
6004
6056
|
const { t: t } = (0, $3Sbms$useTranslation)();
|
|
6005
6057
|
const { toast: toast } = (0, $3Sbms$useToast)();
|
|
6006
6058
|
const { options: options } = (0, $3Sbms$useContext)((0, $5f30d8bf4f04621e$export$2e2bcd8739ae039));
|
|
6059
|
+
const [qrCodeDataUrl, setQrCodeDataUrl] = (0, $3Sbms$useState)('');
|
|
6060
|
+
const [QRCodeContainerRef, { width: QRCodeContainerWidth }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
|
|
6007
6061
|
const qrCodeURL = (0, $3Sbms$useMemo)(()=>{
|
|
6008
6062
|
let url = new URL(window.location.href);
|
|
6009
6063
|
if (options.sharedURL) try {
|
|
@@ -6015,6 +6069,20 @@ const $e60b5ecf8ea46b91$export$ec0ae6f1b249c474 = ({ state: state })=>{
|
|
|
6015
6069
|
}, [
|
|
6016
6070
|
options.sharedURL
|
|
6017
6071
|
]);
|
|
6072
|
+
(0, $3Sbms$useEffect)(()=>{
|
|
6073
|
+
const getQrCodeDataUrl = async ()=>{
|
|
6074
|
+
const dataUrl = await $3Sbms$toDataURL(qrCodeURL, {
|
|
6075
|
+
width: QRCodeContainerWidth > 300 ? 300 : QRCodeContainerWidth,
|
|
6076
|
+
errorCorrectionLevel: 'Q',
|
|
6077
|
+
margin: 0
|
|
6078
|
+
});
|
|
6079
|
+
setQrCodeDataUrl(dataUrl);
|
|
6080
|
+
};
|
|
6081
|
+
getQrCodeDataUrl();
|
|
6082
|
+
}, [
|
|
6083
|
+
QRCodeContainerWidth,
|
|
6084
|
+
qrCodeURL
|
|
6085
|
+
]);
|
|
6018
6086
|
const onCopyCallLinkClick = async ()=>{
|
|
6019
6087
|
try {
|
|
6020
6088
|
await (0, $57162bcada7d6f66$export$2e2bcd8739ae039)(qrCodeURL || window.location.href);
|
|
@@ -6054,17 +6122,13 @@ const $e60b5ecf8ea46b91$export$ec0ae6f1b249c474 = ({ state: state })=>{
|
|
|
6054
6122
|
]
|
|
6055
6123
|
}),
|
|
6056
6124
|
/*#__PURE__*/ (0, $3Sbms$jsxs)("div", {
|
|
6125
|
+
ref: QRCodeContainerRef,
|
|
6057
6126
|
className: "flex w-full p-6 bg-gray-25 border border-gray-200 rounded-lg aspect-square relative",
|
|
6058
6127
|
children: [
|
|
6059
|
-
/*#__PURE__*/ (0, $3Sbms$jsx)("
|
|
6128
|
+
/*#__PURE__*/ (0, $3Sbms$jsx)("img", {
|
|
6060
6129
|
className: "max-w-full max-h-full",
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
errorCorrectionLevel: 'M',
|
|
6064
|
-
scale: 15,
|
|
6065
|
-
margin: 0
|
|
6066
|
-
});
|
|
6067
|
-
}
|
|
6130
|
+
src: qrCodeDataUrl,
|
|
6131
|
+
alt: ""
|
|
6068
6132
|
}),
|
|
6069
6133
|
/*#__PURE__*/ (0, $3Sbms$jsx)((0, $16d11fc0880587fd$export$2e2bcd8739ae039), {
|
|
6070
6134
|
className: "absolute inset-0 m-auto"
|
|
@@ -7151,57 +7215,6 @@ const $1299919e02395903$export$c197ce1a352372f = ({ state: state })=>{
|
|
|
7151
7215
|
|
|
7152
7216
|
|
|
7153
7217
|
|
|
7154
|
-
const $af23c74942bdcae7$export$2b86bedf890eab8 = (element)=>{
|
|
7155
|
-
const [size, setSize] = (0, $3Sbms$useState)([
|
|
7156
|
-
0,
|
|
7157
|
-
0
|
|
7158
|
-
]);
|
|
7159
|
-
(0, $3Sbms$useLayoutEffect)(()=>{
|
|
7160
|
-
const updateSize = ()=>setSize([
|
|
7161
|
-
element?.offsetWidth || 0,
|
|
7162
|
-
element?.offsetHeight || 0
|
|
7163
|
-
]);
|
|
7164
|
-
if (element) {
|
|
7165
|
-
const observer = new ResizeObserver(updateSize);
|
|
7166
|
-
observer.observe(element);
|
|
7167
|
-
return ()=>observer.unobserve(element);
|
|
7168
|
-
}
|
|
7169
|
-
}, [
|
|
7170
|
-
element
|
|
7171
|
-
]);
|
|
7172
|
-
return size;
|
|
7173
|
-
};
|
|
7174
|
-
const $af23c74942bdcae7$var$defaultState = {
|
|
7175
|
-
bottom: 0,
|
|
7176
|
-
height: 0,
|
|
7177
|
-
left: 0,
|
|
7178
|
-
right: 0,
|
|
7179
|
-
top: 0,
|
|
7180
|
-
width: 0,
|
|
7181
|
-
x: 0,
|
|
7182
|
-
y: 0
|
|
7183
|
-
};
|
|
7184
|
-
function $af23c74942bdcae7$export$e295b0c537d32d7d() {
|
|
7185
|
-
const [element, ref] = (0, $3Sbms$useState)(null);
|
|
7186
|
-
const [rect, setRect] = (0, $3Sbms$useState)($af23c74942bdcae7$var$defaultState);
|
|
7187
|
-
(0, $3Sbms$useLayoutEffect)(()=>{
|
|
7188
|
-
if (!element) return;
|
|
7189
|
-
const updateSize = (entries)=>setRect(entries[0].contentRect);
|
|
7190
|
-
const observer = new ResizeObserver(updateSize);
|
|
7191
|
-
observer.observe(element);
|
|
7192
|
-
return ()=>{
|
|
7193
|
-
observer.disconnect();
|
|
7194
|
-
};
|
|
7195
|
-
}, [
|
|
7196
|
-
element
|
|
7197
|
-
]);
|
|
7198
|
-
return [
|
|
7199
|
-
ref,
|
|
7200
|
-
rect
|
|
7201
|
-
];
|
|
7202
|
-
}
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
7218
|
const $3942a3fa4ff47d94$export$b99021c5b7713297 = ()=>{
|
|
7206
7219
|
const originalWidth = (0, $3Sbms$useRef)(0);
|
|
7207
7220
|
const [containerRef, { width: containerWidth }] = (0, $af23c74942bdcae7$export$e295b0c537d32d7d)();
|
package/dist/stream-ui.js
CHANGED
|
@@ -6006,10 +6006,64 @@ var $8745dbdbe55f5ff3$export$2e2bcd8739ae039 = $8745dbdbe55f5ff3$var$QuickConnec
|
|
|
6006
6006
|
|
|
6007
6007
|
|
|
6008
6008
|
|
|
6009
|
+
const $56e1e7a85d8bf4bb$export$2b86bedf890eab8 = (element)=>{
|
|
6010
|
+
const [size, setSize] = (0, $jQDcL$react.useState)([
|
|
6011
|
+
0,
|
|
6012
|
+
0
|
|
6013
|
+
]);
|
|
6014
|
+
(0, $jQDcL$react.useLayoutEffect)(()=>{
|
|
6015
|
+
const updateSize = ()=>setSize([
|
|
6016
|
+
element?.offsetWidth || 0,
|
|
6017
|
+
element?.offsetHeight || 0
|
|
6018
|
+
]);
|
|
6019
|
+
if (element) {
|
|
6020
|
+
const observer = new ResizeObserver(updateSize);
|
|
6021
|
+
observer.observe(element);
|
|
6022
|
+
return ()=>observer.unobserve(element);
|
|
6023
|
+
}
|
|
6024
|
+
}, [
|
|
6025
|
+
element
|
|
6026
|
+
]);
|
|
6027
|
+
return size;
|
|
6028
|
+
};
|
|
6029
|
+
const $56e1e7a85d8bf4bb$var$defaultState = {
|
|
6030
|
+
bottom: 0,
|
|
6031
|
+
height: 0,
|
|
6032
|
+
left: 0,
|
|
6033
|
+
right: 0,
|
|
6034
|
+
top: 0,
|
|
6035
|
+
width: 0,
|
|
6036
|
+
x: 0,
|
|
6037
|
+
y: 0
|
|
6038
|
+
};
|
|
6039
|
+
function $56e1e7a85d8bf4bb$export$e295b0c537d32d7d() {
|
|
6040
|
+
const [element, ref] = (0, $jQDcL$react.useState)(null);
|
|
6041
|
+
const [rect, setRect] = (0, $jQDcL$react.useState)($56e1e7a85d8bf4bb$var$defaultState);
|
|
6042
|
+
(0, $jQDcL$react.useLayoutEffect)(()=>{
|
|
6043
|
+
if (!element) return;
|
|
6044
|
+
const updateSize = (entries)=>setRect(entries[0].contentRect);
|
|
6045
|
+
const observer = new ResizeObserver(updateSize);
|
|
6046
|
+
observer.observe(element);
|
|
6047
|
+
return ()=>{
|
|
6048
|
+
observer.disconnect();
|
|
6049
|
+
};
|
|
6050
|
+
}, [
|
|
6051
|
+
element
|
|
6052
|
+
]);
|
|
6053
|
+
return [
|
|
6054
|
+
ref,
|
|
6055
|
+
rect
|
|
6056
|
+
];
|
|
6057
|
+
}
|
|
6058
|
+
|
|
6059
|
+
|
|
6060
|
+
|
|
6009
6061
|
const $dacf6d923c304e5f$export$ec0ae6f1b249c474 = ({ state: state })=>{
|
|
6010
6062
|
const { t: t } = (0, $jQDcL$reacti18next.useTranslation)();
|
|
6011
6063
|
const { toast: toast } = (0, $jQDcL$snapcalldesignsystem.useToast)();
|
|
6012
6064
|
const { options: options } = (0, $jQDcL$react.useContext)((0, $8b39f32976a7698a$export$2e2bcd8739ae039));
|
|
6065
|
+
const [qrCodeDataUrl, setQrCodeDataUrl] = (0, $jQDcL$react.useState)('');
|
|
6066
|
+
const [QRCodeContainerRef, { width: QRCodeContainerWidth }] = (0, $56e1e7a85d8bf4bb$export$e295b0c537d32d7d)();
|
|
6013
6067
|
const qrCodeURL = (0, $jQDcL$react.useMemo)(()=>{
|
|
6014
6068
|
let url = new URL(window.location.href);
|
|
6015
6069
|
if (options.sharedURL) try {
|
|
@@ -6021,6 +6075,20 @@ const $dacf6d923c304e5f$export$ec0ae6f1b249c474 = ({ state: state })=>{
|
|
|
6021
6075
|
}, [
|
|
6022
6076
|
options.sharedURL
|
|
6023
6077
|
]);
|
|
6078
|
+
(0, $jQDcL$react.useEffect)(()=>{
|
|
6079
|
+
const getQrCodeDataUrl = async ()=>{
|
|
6080
|
+
const dataUrl = await $jQDcL$qrcode.toDataURL(qrCodeURL, {
|
|
6081
|
+
width: QRCodeContainerWidth > 300 ? 300 : QRCodeContainerWidth,
|
|
6082
|
+
errorCorrectionLevel: 'Q',
|
|
6083
|
+
margin: 0
|
|
6084
|
+
});
|
|
6085
|
+
setQrCodeDataUrl(dataUrl);
|
|
6086
|
+
};
|
|
6087
|
+
getQrCodeDataUrl();
|
|
6088
|
+
}, [
|
|
6089
|
+
QRCodeContainerWidth,
|
|
6090
|
+
qrCodeURL
|
|
6091
|
+
]);
|
|
6024
6092
|
const onCopyCallLinkClick = async ()=>{
|
|
6025
6093
|
try {
|
|
6026
6094
|
await (0, $0bea101d3ef852fb$export$2e2bcd8739ae039)(qrCodeURL || window.location.href);
|
|
@@ -6060,17 +6128,13 @@ const $dacf6d923c304e5f$export$ec0ae6f1b249c474 = ({ state: state })=>{
|
|
|
6060
6128
|
]
|
|
6061
6129
|
}),
|
|
6062
6130
|
/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsxs)("div", {
|
|
6131
|
+
ref: QRCodeContainerRef,
|
|
6063
6132
|
className: "flex w-full p-6 bg-gray-25 border border-gray-200 rounded-lg aspect-square relative",
|
|
6064
6133
|
children: [
|
|
6065
|
-
/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("
|
|
6134
|
+
/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)("img", {
|
|
6066
6135
|
className: "max-w-full max-h-full",
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
errorCorrectionLevel: 'M',
|
|
6070
|
-
scale: 15,
|
|
6071
|
-
margin: 0
|
|
6072
|
-
});
|
|
6073
|
-
}
|
|
6136
|
+
src: qrCodeDataUrl,
|
|
6137
|
+
alt: ""
|
|
6074
6138
|
}),
|
|
6075
6139
|
/*#__PURE__*/ (0, $jQDcL$reactjsxruntime.jsx)((0, $8745dbdbe55f5ff3$export$2e2bcd8739ae039), {
|
|
6076
6140
|
className: "absolute inset-0 m-auto"
|
|
@@ -7157,57 +7221,6 @@ const $e9d4b4657e98cb84$export$c197ce1a352372f = ({ state: state })=>{
|
|
|
7157
7221
|
|
|
7158
7222
|
|
|
7159
7223
|
|
|
7160
|
-
const $56e1e7a85d8bf4bb$export$2b86bedf890eab8 = (element)=>{
|
|
7161
|
-
const [size, setSize] = (0, $jQDcL$react.useState)([
|
|
7162
|
-
0,
|
|
7163
|
-
0
|
|
7164
|
-
]);
|
|
7165
|
-
(0, $jQDcL$react.useLayoutEffect)(()=>{
|
|
7166
|
-
const updateSize = ()=>setSize([
|
|
7167
|
-
element?.offsetWidth || 0,
|
|
7168
|
-
element?.offsetHeight || 0
|
|
7169
|
-
]);
|
|
7170
|
-
if (element) {
|
|
7171
|
-
const observer = new ResizeObserver(updateSize);
|
|
7172
|
-
observer.observe(element);
|
|
7173
|
-
return ()=>observer.unobserve(element);
|
|
7174
|
-
}
|
|
7175
|
-
}, [
|
|
7176
|
-
element
|
|
7177
|
-
]);
|
|
7178
|
-
return size;
|
|
7179
|
-
};
|
|
7180
|
-
const $56e1e7a85d8bf4bb$var$defaultState = {
|
|
7181
|
-
bottom: 0,
|
|
7182
|
-
height: 0,
|
|
7183
|
-
left: 0,
|
|
7184
|
-
right: 0,
|
|
7185
|
-
top: 0,
|
|
7186
|
-
width: 0,
|
|
7187
|
-
x: 0,
|
|
7188
|
-
y: 0
|
|
7189
|
-
};
|
|
7190
|
-
function $56e1e7a85d8bf4bb$export$e295b0c537d32d7d() {
|
|
7191
|
-
const [element, ref] = (0, $jQDcL$react.useState)(null);
|
|
7192
|
-
const [rect, setRect] = (0, $jQDcL$react.useState)($56e1e7a85d8bf4bb$var$defaultState);
|
|
7193
|
-
(0, $jQDcL$react.useLayoutEffect)(()=>{
|
|
7194
|
-
if (!element) return;
|
|
7195
|
-
const updateSize = (entries)=>setRect(entries[0].contentRect);
|
|
7196
|
-
const observer = new ResizeObserver(updateSize);
|
|
7197
|
-
observer.observe(element);
|
|
7198
|
-
return ()=>{
|
|
7199
|
-
observer.disconnect();
|
|
7200
|
-
};
|
|
7201
|
-
}, [
|
|
7202
|
-
element
|
|
7203
|
-
]);
|
|
7204
|
-
return [
|
|
7205
|
-
ref,
|
|
7206
|
-
rect
|
|
7207
|
-
];
|
|
7208
|
-
}
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
7224
|
const $55e2321d8d7b41d6$export$b99021c5b7713297 = ()=>{
|
|
7212
7225
|
const originalWidth = (0, $jQDcL$react.useRef)(0);
|
|
7213
7226
|
const [containerRef, { width: containerWidth }] = (0, $56e1e7a85d8bf4bb$export$e295b0c537d32d7d)();
|