🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@crossmint/client-sdk-react-ui

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crossmint/client-sdk-react-ui - npm Package Compare versions

Comparing version

to
0.1.2

import { FC } from "react";
import { BaseButtonProps } from "./types";
export declare const CrossmintStatusButton: FC<BaseButtonProps>;
import { CrossmintStatusButtonProps } from "./types";
export declare const CrossmintStatusButton: FC<CrossmintStatusButtonProps>;

@@ -44,4 +44,20 @@ "use strict";

const CrossmintStatusButton = (_a) => {
var { className, disabled, onClick, style, tabIndex, theme = "dark", clientId, auctionId, development = false } = _a, props = __rest(_a, ["className", "disabled", "onClick", "style", "tabIndex", "theme", "clientId", "auctionId", "development"]);
var { className, disabled, onClick, style, tabIndex, theme = "dark", clientId, auctionId, development = false, platformId, mintConfig } = _a, props = __rest(_a, ["className", "disabled", "onClick", "style", "tabIndex", "theme", "clientId", "auctionId", "development", "platformId", "mintConfig"]);
const status = (0, useCrossmintStatus_1.default)({ clientId, development });
const formatOnboardingQueryParams = () => {
const onboardingQueryParams = {
clientId: clientId,
};
if (platformId)
onboardingQueryParams.platformId = platformId;
if (auctionId)
onboardingQueryParams.auctionId = auctionId;
if (mintConfig)
onboardingQueryParams.mintConfig = JSON.stringify(mintConfig);
return new URLSearchParams(onboardingQueryParams).toString();
};
const goToOnboarding = () => {
const baseUrl = development ? types_1.baseUrls.dev : types_1.baseUrls.prod;
window.open(`${baseUrl}/developers/onboarding?${formatOnboardingQueryParams()}`, "_blank");
};
const handleClick = (0, react_1.useCallback)((event) => {

@@ -51,4 +67,3 @@ if (onClick)

if (status === useCrossmintStatus_1.OnboardingRequestStatusResponse.WAITING_SUBMISSION) {
const baseUrl = development ? types_1.baseUrls.dev : types_1.baseUrls.prod;
window.open(`${baseUrl}/developers/onboarding${clientId ? `?clientId=${clientId}` : ""}${auctionId ? `&auctionId=${auctionId}` : ""}`, "_blank");
goToOnboarding();
return;

@@ -55,0 +70,0 @@ }

@@ -26,2 +26,5 @@ import { CSSProperties, MouseEvent } from "react";

}
export interface StatusButtonConfig {
[propName: string]: any;
}
export interface BaseButtonProps {

@@ -49,2 +52,6 @@ className?: string;

}
export interface CrossmintStatusButtonProps extends BaseButtonProps {
platformId?: string;
mintConfig?: StatusButtonConfig;
}
export {};

@@ -1,1 +0,1 @@

export declare const LIB_VERSION = "0.1.1-alpha.0";
export declare const LIB_VERSION = "0.1.1";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LIB_VERSION = void 0;
exports.LIB_VERSION = "0.1.1-alpha.0";
exports.LIB_VERSION = "0.1.1";
//# sourceMappingURL=version.js.map
import { FC } from "react";
import { BaseButtonProps } from "./types";
export declare const CrossmintStatusButton: FC<BaseButtonProps>;
import { CrossmintStatusButtonProps } from "./types";
export declare const CrossmintStatusButton: FC<CrossmintStatusButtonProps>;

@@ -6,4 +6,20 @@ import React, { useMemo, useCallback } from "react";

import { isClientSide } from "./utils";
export const CrossmintStatusButton = ({ className, disabled, onClick, style, tabIndex, theme = "dark", clientId, auctionId, development = false, ...props }) => {
export const CrossmintStatusButton = ({ className, disabled, onClick, style, tabIndex, theme = "dark", clientId, auctionId, development = false, platformId, mintConfig, ...props }) => {
const status = useCrossmintStatus({ clientId, development });
const formatOnboardingQueryParams = () => {
const onboardingQueryParams = {
clientId: clientId,
};
if (platformId)
onboardingQueryParams.platformId = platformId;
if (auctionId)
onboardingQueryParams.auctionId = auctionId;
if (mintConfig)
onboardingQueryParams.mintConfig = JSON.stringify(mintConfig);
return new URLSearchParams(onboardingQueryParams).toString();
};
const goToOnboarding = () => {
const baseUrl = development ? baseUrls.dev : baseUrls.prod;
window.open(`${baseUrl}/developers/onboarding?${formatOnboardingQueryParams()}`, "_blank");
};
const handleClick = useCallback((event) => {

@@ -13,4 +29,3 @@ if (onClick)

if (status === OnboardingRequestStatusResponse.WAITING_SUBMISSION) {
const baseUrl = development ? baseUrls.dev : baseUrls.prod;
window.open(`${baseUrl}/developers/onboarding${clientId ? `?clientId=${clientId}` : ""}${auctionId ? `&auctionId=${auctionId}` : ""}`, "_blank");
goToOnboarding();
return;

@@ -17,0 +32,0 @@ }

@@ -26,2 +26,5 @@ import { CSSProperties, MouseEvent } from "react";

}
export interface StatusButtonConfig {
[propName: string]: any;
}
export interface BaseButtonProps {

@@ -49,2 +52,6 @@ className?: string;

}
export interface CrossmintStatusButtonProps extends BaseButtonProps {
platformId?: string;
mintConfig?: StatusButtonConfig;
}
export {};

@@ -1,1 +0,1 @@

export declare const LIB_VERSION = "0.1.1-alpha.0";
export declare const LIB_VERSION = "0.1.1";

@@ -1,2 +0,2 @@

export const LIB_VERSION = "0.1.1-alpha.0";
export const LIB_VERSION = "0.1.1";
//# sourceMappingURL=version.js.map
{
"name": "@crossmint/client-sdk-react-ui",
"version": "0.1.1",
"version": "0.1.2",
"author": "Paella Labs Inc",

@@ -52,3 +52,3 @@ "license": "Apache-2.0",

},
"gitHead": "507035f9c2a0c5b72af5007c96089f46e66e8e53"
"gitHead": "f9046d4c7681111028a1d19e9cb95cb3dde2316f"
}

@@ -34,2 +34,6 @@ import { CSSProperties, MouseEvent } from "react";

export interface StatusButtonConfig {
[propName: string]: any;
}
export interface BaseButtonProps {

@@ -58,1 +62,6 @@ className?: string;

}
export interface CrossmintStatusButtonProps extends BaseButtonProps {
platformId?: string;
mintConfig?: StatusButtonConfig;
}

@@ -1,1 +0,1 @@

export const LIB_VERSION = "0.1.1";
export const LIB_VERSION = "0.1.2";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet