@orderly.network/ui-scaffold 2.8.10-alpha.0 → 2.8.11-alpha.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/dist/index.js +10 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -2677,8 +2677,7 @@ var QRCodeScanner = (props) => {
|
|
|
2677
2677
|
const tick = () => {
|
|
2678
2678
|
const video = videoRef.current;
|
|
2679
2679
|
const canvas = canvasRef.current;
|
|
2680
|
-
if (!video || !canvas)
|
|
2681
|
-
return;
|
|
2680
|
+
if (!video || !canvas) return;
|
|
2682
2681
|
const ctx = canvas.getContext("2d");
|
|
2683
2682
|
if (video.readyState === video.HAVE_ENOUGH_DATA) {
|
|
2684
2683
|
const videoWidth = video.videoWidth;
|
|
@@ -2720,8 +2719,7 @@ var QRCodeScanner = (props) => {
|
|
|
2720
2719
|
};
|
|
2721
2720
|
useEffect(() => {
|
|
2722
2721
|
const video = videoRef.current;
|
|
2723
|
-
if (!open || !video)
|
|
2724
|
-
return;
|
|
2722
|
+
if (!open || !video) return;
|
|
2725
2723
|
navigator?.mediaDevices?.getUserMedia({
|
|
2726
2724
|
video: {
|
|
2727
2725
|
facingMode: "environment",
|
|
@@ -3181,8 +3179,7 @@ var QRCode = (props) => {
|
|
|
3181
3179
|
var QRCodeCanvas = (props) => {
|
|
3182
3180
|
const canvasRef = useRef(null);
|
|
3183
3181
|
useEffect(() => {
|
|
3184
|
-
if (!canvasRef.current || !props.content)
|
|
3185
|
-
return;
|
|
3182
|
+
if (!canvasRef.current || !props.content) return;
|
|
3186
3183
|
const qrcode$1 = qrcode(props.content);
|
|
3187
3184
|
const width = props.width;
|
|
3188
3185
|
const height = props.height;
|
|
@@ -3641,8 +3638,7 @@ var NotificationUI = (props) => {
|
|
|
3641
3638
|
const { dataSource, showAnnouncement } = props;
|
|
3642
3639
|
const { routerAdapter } = useScaffoldContext();
|
|
3643
3640
|
const onItemClick = (url) => {
|
|
3644
|
-
if (!url)
|
|
3645
|
-
return;
|
|
3641
|
+
if (!url) return;
|
|
3646
3642
|
routerAdapter?.onRouteChange({
|
|
3647
3643
|
href: url,
|
|
3648
3644
|
name: url,
|
|
@@ -4436,14 +4432,12 @@ var useMainNavScript = (props) => {
|
|
|
4436
4432
|
const { connectedChain } = useWalletConnector();
|
|
4437
4433
|
const { wrongNetwork, disabledConnect } = useAppContext();
|
|
4438
4434
|
const [current, setCurrent] = useState(() => {
|
|
4439
|
-
if (typeof props.initialMenu === "undefined")
|
|
4440
|
-
return [];
|
|
4435
|
+
if (typeof props.initialMenu === "undefined") return [];
|
|
4441
4436
|
return !Array.isArray(props.initialMenu) ? [props.initialMenu] : props.initialMenu;
|
|
4442
4437
|
});
|
|
4443
4438
|
const onItemClickHandler = (scope) => (item) => {
|
|
4444
4439
|
const lastItem = item[item.length - 1];
|
|
4445
|
-
if (!lastItem)
|
|
4446
|
-
return;
|
|
4440
|
+
if (!lastItem) return;
|
|
4447
4441
|
if (lastItem.target !== "_blank") {
|
|
4448
4442
|
setCurrent(item.map((item2) => item2.href));
|
|
4449
4443
|
}
|
|
@@ -5128,8 +5122,7 @@ var MessageCenter = (props) => {
|
|
|
5128
5122
|
const messageSize = useMemo(() => messages.length, [messages]);
|
|
5129
5123
|
const [popoverOpen, setPopoverOpen] = useState(false);
|
|
5130
5124
|
const onItemClick = (url) => {
|
|
5131
|
-
if (!url)
|
|
5132
|
-
return;
|
|
5125
|
+
if (!url) return;
|
|
5133
5126
|
routerAdapter?.onRouteChange({
|
|
5134
5127
|
href: url,
|
|
5135
5128
|
name: url,
|
|
@@ -5266,10 +5259,8 @@ var NavItem2 = (props) => {
|
|
|
5266
5259
|
}, [showButtonTooltip]);
|
|
5267
5260
|
const isActive = useMemo(() => {
|
|
5268
5261
|
const current = currentPath?.[0];
|
|
5269
|
-
if (!current)
|
|
5270
|
-
|
|
5271
|
-
if (current === item.href)
|
|
5272
|
-
return true;
|
|
5262
|
+
if (!current) return false;
|
|
5263
|
+
if (current === item.href) return true;
|
|
5273
5264
|
return Array.isArray(item.activeHrefs) && item.activeHrefs.includes(current);
|
|
5274
5265
|
}, [currentPath, item.href, item.activeHrefs]);
|
|
5275
5266
|
const hasSubMenu = Array.isArray(item.children) || typeof item.customSubMenuRender === "function";
|
|
@@ -5833,5 +5824,5 @@ var MaintenanceTipsWidget = () => {
|
|
|
5833
5824
|
init_restrictedInfo();
|
|
5834
5825
|
|
|
5835
5826
|
export { AccountMenuWidget, AccountSummaryWidget, BottomNav, BottomNavWidget, CampaignPositionEnum, ChainMenu, ChainMenuWidget, Footer, FooterWidget, LanguageSwitcher, LanguageSwitcherWidget, LeftNavUI, LeftNavWidget, MainLogo, MainNavMobile, MainNavWidget, MaintenanceTipsUI, MaintenanceTipsWidget, RestrictedInfo, RestrictedInfoWidget, Scaffold, ScaffoldContext, ScanQRCode, ScanQRCodeWidget, SideBar, SideNavbarWidget, SubAccountScript, SubAccountUI, SubAccountWidget, useLanguageSwitcherScript, useRestrictedInfoScript, useScaffoldContext, useScanQRCodeScript };
|
|
5836
|
-
//# sourceMappingURL=
|
|
5827
|
+
//# sourceMappingURL=index.mjs.map
|
|
5837
5828
|
//# sourceMappingURL=index.mjs.map
|