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

rn-tryndbuy-trial-room-ms

v1.2.3

Published

Trial room plugin by Tryndbuy

Downloads

100

Readme

rn-tryndbuy-trial-room-ms

npm version

Trial room plugin by Tryndbuy. Supports Android & iOS integration.

Installation

  1. Install:

    • Using npm: npm install rn-tryndbuy-trial-room-ms
    • Using Yarn: yarn add rn-tryndbuy-trial-room-ms
  2. Import it in your JS:

    import VTRScreen from 'rn-tryndbuy-trial-room-ms';

How it works

        <VTRScreen
            uuid={Math.random()}
            sessionid={Math.random()}
            deviceid={Math.random()}
            styleid={'P60202026'}
            colorcode={'F0'}
            gender = {"1"}
            category={0}
            available_sizes={['XXS', 'XS', 'S']}
            closePopup={() => this.closeVTR()}
            enableShoppability={false}
            addToBagDisabled={false}
            addToBag={(obj)=> this.addToBag(obj)}
            addToWishList={(obj)=> this.addToWishList(obj)}
            goToBag={()=> this.goToBag()}
            available_in_bag={true}
            logEvent={(uuid, eventName, eventData)=>this.logEvent(uuid, eventName, eventData)}
          />

Parameters

Below are the list of different parameters to be sent while implementing Scene component:

| Key | Data type | Default value? | Description | |-----|-----------|----------------|-------------| | uuid | string | Required. | Unique id of user. | | sessionid | string | Optional | Session id to be stored for logs. | | deviceid | string | Optional | Device unique identifier to be stored for logs. | | styleid | string | Required. | Style id of the apparel. | | colorcode | string | Optional. | Color code of the apparel. | | gender | string | '0' | '0' for female, '1' for male, '2' for boy & '3' for girl | | category | string | 0 | category id for special apparels like lingerie etc. | | available_sizes | array of strings | Required. | List of available sizes for the selected style. | | closePopup | method | obj = {tightFit: 'S', recommendedFit: 'M', looseFit: 'L'}\ (parameters passed) | Implement callback when user click on close button in VTR. Button is placed on top left of VTR landing page. This will exit VTR and send a callback 'closePopup' to implement any funcitonality on client side. It also sends the recommended sizes as object. | | enableShoppability | boolean | Required. | To show/hide shoppability functionality (add to bag & wishlist) in VTR | | addToBagDisabled | boolean | false | If 'false' add to bag option will not be available in VTR side. | | addToBag | method | obj = { skuid: this.state.skuid, recommendedSizes: {tightFit: 'S', recommendedFit: 'M', looseFit: 'L'}, selectedItem: 'M'}\ (parameters passed) | This callback method will be called when user click on add to bag on VTR page. This callback enables to add to bag functionality on client side. | | addToWishList | method | obj = { skuid: this.state.skuid, selectedItem: 'M'}\ (parameters passed) | This callback method will be called when user click on add to wishlist on VTR page. This callback enables to add to wishlist functionality on client side. | | goToBag | method | | This callback method will be called when user click on go to bag on VTR page. This callback enables to go to bag functionality on client side. | | available_in_bag | boolean | Optional. | To show/hide add to bag functionality in VTR | | logEvent | method | uuid = unique identifier of users eventName = Name of event to be logged\ eventData = JSON obj for the data to be captured for logs. | This callback method can be implemented to capture the logs for events happening on VTR side. Tryndbuy has already implemented logging functionality on VTR where data is captured and store in VTR database for the specified events. logEvent is additional callback method implemented for clients to capture and log the events on their side. |

Implementation Samples

        closeVTR = () => {
            // console.log('closeVTR')
        }
        
        addToBag =(obj) =>{
            // console.log('addToBag: ', obj)
        }

        addToWishList =(obj) =>{
            // console.log('addToWishList: ', obj)
        }

        goToBag =() =>{
            // console.log('goToBag')
        }

         logEvent = (uuid, eventName, eventData) => {
            // console.log('Log event: ', `${uuid} : ${eventName} : ${eventData}`)
        }