Socket
Socket
Sign inDemoInstall

react-datatrans-light-box

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-datatrans-light-box - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

.circleci/config.yml

2

package.json
{
"name": "react-datatrans-light-box",
"version": "1.0.5",
"version": "1.0.6",
"description": "Datatrans light box component for react apps",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

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

[![Build Status](https://circleci.com/gh/datatrans/react-datatrans-light-box.png?circle-token=:circle-token)](https://circleci.com/gh/datatrans/react-datatrans-light-box)
[![NPM version][npm-version-image]][npm-url] [![Build Status](https://circleci.com/gh/datatrans/react-datatrans-light-box.png?circle-token=:circle-token)](https://circleci.com/gh/datatrans/react-datatrans-light-box)

@@ -175,3 +175,3 @@ # react-datatrans-light-box

|----- |:------ |------------|
|`production` | Boolean | Indicates whether requests hit Datatrans' production or development environment. Defaults to *false*.|
|`production` | Boolean | Indicates whether requests hit Datatrans' production or development environment. Defaults to *false*.|
|`onCancelled` | Function | Called when user has cancelled payment.|

@@ -183,1 +183,3 @@ |`onLoaded` | Function | Called when payment page is loaded.|

[npm-url]: https://npmjs.com/package/react-datatrans-light-box
[npm-version-image]: https://img.shields.io/npm/v/react-datatrans-light-box.svg?style=flat-square

@@ -5,3 +5,3 @@ import React, {Component} from 'react'

import {
filterProps, toUrlParams, parseUrl,
filterProps, toUrlParams, getBaseUrl,
lockScrolling,

@@ -35,3 +35,3 @@ releaseLock

this.url = buildUrl(urlParams, this.props.production)
this.origin = parseUrl(this.url).origin
this.origin = getBaseUrl(this.url)

@@ -38,0 +38,0 @@ this.state = { visible: true}

@@ -13,3 +13,2 @@ import React from 'react'

frameBorder={0}
allowTransparency={true}
/>

@@ -16,0 +15,0 @@ }

@@ -17,2 +17,3 @@

}
export const toUrlParams = props => Object.keys(props)

@@ -22,7 +23,7 @@ .map(key => `${key}=${props[key]}`)

export const parseUrl = url => {
const a = document.createElement('a')
a.href = url
return a
export const getBaseUrl = url => {
const pathArray = url.split('/')
const protocol = pathArray[0]
const host = pathArray[2]
return protocol + '//' + host
}

@@ -29,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc