npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mojito-inc/mojito-auction

v1.0.3-beta.4

Published

```

Downloads

176

Readme

To use this library install the following dependency


You can install this project with one of these commands:

    npm install --save @mojito-inc/mojito-auction
    
    yarn add @mojito-inc/mojito-auction

<br />

### Note:

You need to install the following packages:

yarn add @mui/[email protected] @mui/[email protected] @apollo/client graphql

    
Once the package is installed, you can import the library using import;

### Auction Provider

import { AuctionProvider } from '@mojito-inc/mojito-auction';

<AuctionProvider
  theme={theme} // For theme config check below
  clientOptions={{
    uri={ API_URL } 
    token={ 'Bearer <Token>' }
  }}
>
  <Component {...pageProps} />
</AuctionProvider>

#### For API URL:

<ol>
  <li><b>https://api-sandbox.mojito.xyz/query</b> - Sandbox environment</li>
  <li><b>https://api.mojito.xyz/query</b> - Production environment</li>
</ol>

|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|uri | string| ✅| Pass the API url|
|token | string ✅| Pass the bearer token|


### Auction Component

import { AuctionContainer } from '@mojito-inc/mojito-auction';

<AuctionContainer itemID= orgID= imageURL= header= tokenDetails= description= etherScanImageURL= cryptoUnit= userConfig={{ isAuthenticated, isEmailVerified: user?.email_verified ?? false, kycStatus: 'Clear', onHandleKYC: () => undefined, }} walletConfig={{ provider: getProvider(), connectedChainId: connect?.chainID, walletAddress: connect?.account, balance, }} placeBid= auctionChainId= loaderImageURL= renderBreadCrumb= onClickLoginOrWallet= onRefetchBalance= />


|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|itemID| string|✅| |
|orgID| string |✅|
|imageURL| string|✅ |
|header| Object|✅ |[Header](#Header) |
|tokenDetails| Object |✅|[TokenDetails](#TokenDetails) |
|userConfig| Object | ✅|  [UserConfig](#UserConfig)|
|walletConfig| Object | ✅| [WalletConfig](#WalletConfig)|
|description| string | ✅| |
|etherScanImageURL| string | ✅| |
|cryptoUnit| enum | ✅| [CryptoUnit](#CryptoUnit)|
|placeBid| Object | ✅| [PlaceBid](#PlaceBid)|
|auctionChainId| Int | ✅| Int can represent values between -(2^31) and 2^31 - 1 |
|loaderImageURL| string | ✅ | |
|renderBreadCrumb| event() => JSX.Element | ✅ | |
|onClickLoginOrWallet| (event: 'connectWallet' | 'login') => void | ✅ | |
|onRefetchBalance| function | ✅ | |


#### interface
##### Header
|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|title| string|✅| | 
|subTitle | string |✅|  |

##### TokenDetails
|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|networkName| string|✅| | 
|tokenType | string |✅|  |
|contractAddress| string|✅| | 
|tokenId | string |✅|  |
|creationDate| string|| | 
|dimension | string ||  |
|onClickContractAddress | event() ||  |
|onViewMetaData| event()|| | 
|onClickTokenID | event() ||  |

##### CryptoUnit
##### enum

|Enum Variable    |value    | 
|:--- | --- |
|ETH| ETH|
|MATIC | MATIC |
|WETH| WETH|
|WMATIC | WMATIC |


##### PlaceBid
|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|incrementPercent| Int|✅| value in (%) | 
|bidCurrency | enum |✅| [CryptoUnit](#CryptoUnit) |
|termsURL| string|✅| | 
|privacyURL| string|✅| |

##### WalletConfig
|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|isAuthenticated| boolean|✅| value in (%) | 
|isEmailVerified | boolean |✅| [CryptoUnit](#CryptoUnit) |
|kycStatus| string|✅| | 
|onHandleKYC| function|✅| |

##### UserConfig
|Param    |type    | Required   | Description
|:--- | --- | :---:| :---:|
|provider| ether provider|✅|  | 
|connectedChainId | number |✅|  |
|walletAddress| string|✅| | 
|balance| number|✅| |


### Development
#### Run the project:
In example directory run cmd

yarn dev


#### Theme config

import { createTheme } from '@mui/material/styles';

export const theme = createTheme({ typography: { fontFamily: 'Abel', }, components: { MuiCssBaseline: { styleOverrides: @font-face { font-family: "Abel"; font-style: normal; font-display: swap; font-weight: 400; text-transform: none; font-size: 14px; } , }, MuiButton: { styleOverrides: { root: { fontFamily: 'Abel', textTransform: 'none', borderRadius: '0px', fontWeight: 400, fontSize: '16px', backgroundColor: '#FFF', border: '1px solid #D7D8DB', color: '#242629', '&:hover': { backgroundColor: '#FFF', color: '#242629', }, }, }, }, MuiDialog: { styleOverrides: { paper: { boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.08)', }, }, }, MuiCheckbox: { styleOverrides: { root: { '&$checked': { backgroundColor: '000', }, }, }, }, }, palette: { primary: { main: '#000', }, secondary: { main: '#F9F9F9', }, background: { default: '#FFFFFF', }, text: { primary: '#000', }, grey: { 50: '#3C3F44', 100: '#6C717A', 200: '#BCBEC3', 300: '#FAFBFB', 400: '#868B93', }, error: { main: '#BF1E18', dark: '#CE2818', light: '#FFDAD5', contrastText: '#BD2200', }, divider: '#E8E9EC', }, unstable_sxConfig: { borderColor: { themeKey: '#D7D8DB', }, }, });



#### config

update tsconfig.json
check mojito-core-service present in path

compilerOptions: { ..., "paths": { "@/": [ "./src/" ], "@mojitoinc/mojito-auction": [ "../src/index.ts" ], "@mojitoinc/core-service": [ "../../mojito-core-service/src/index.ts" ] }, "files": ["../src//*.[jt]s?(x)", "../../mojito-core-service/src//*.[jt]s?(x)"], }