New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-period-of-stay-input

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-period-of-stay-input - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

demo.js

@@ -13,4 +13,2 @@ (function () {

environment: new api.Environment(true, moment().format('YYYY-MM-DD')),
checkInInputId: 'check-in',
checkOutInputId: 'check-out',

@@ -17,0 +15,0 @@ onChange: function (model) {

2

package.json
{
"name": "react-period-of-stay-input",
"version": "1.1.0",
"version": "1.2.0",
"description": "React.js component for entering a period of stay in a hotel: check-in + check-out date",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -25,3 +25,2 @@ /* global window */

value: this.valueToRender(),
id: this.props.id,
onChange: this.handleEdit,

@@ -28,0 +27,0 @@ className: this.classToRender()

@@ -26,4 +26,2 @@ (function () {

model: React.PropTypes.instanceOf(Model),
checkInInputId: React.PropTypes.string,
checkOutInputId: React.PropTypes.string,
onChange: React.PropTypes.func

@@ -49,3 +47,2 @@ },

ref: 'checkIn',
id: this.props.checkInInputId,
value: m.checkInDate,

@@ -62,3 +59,2 @@ onChange: this.handleCheckInChange

ref: 'checkOut',
id: this.props.checkOutInputId,
value: m.checkOutDate,

@@ -65,0 +61,0 @@ onChange: this.handleCheckOutChange

@@ -32,4 +32,3 @@ describe('DateInput instance', function () {

beforeEach(function () {
element = TestUtils.renderIntoDocument(
DateInput({value: '2014-09-29', id: 'foo'})).getDOMNode();
element = TestUtils.renderIntoDocument(DateInput({value: '2014-09-29'})).getDOMNode();
});

@@ -49,6 +48,2 @@

it('assigns the specified id', function () {
assert.strictEqual(element.getAttribute('id'), 'foo');
});
it('has no error class', function () {

@@ -55,0 +50,0 @@ assert(!$(element).hasClass('error'));

@@ -30,3 +30,3 @@ describe('PeriodOfStayInput', function () {

['environment', 'model', 'checkInInputId', 'checkOutInputId', 'onChange'].forEach(function (p) {
['environment', 'model', 'onChange'].forEach(function (p) {
it('declares the ' + p + ' property', function () {

@@ -43,5 +43,3 @@ assert(PeriodOfStayInput.propTypes[p]);

model: new Model('2014-09-26', '2014-09-27'),
environment: new Environment(false, '2014-09-26'),
checkInInputId: 'A',
checkOutInputId: 'B'
environment: new Environment(false, '2014-09-26')
};

@@ -86,12 +84,2 @@ };

it('assigns the specified check-in input ID', function () {
assert.strictEqual(
$('label.period-of-stay-check-in input', component.getDOMNode()).attr('id'), 'A');
});
it('assigns the specified check-out input ID', function () {
assert.strictEqual(
$('label.period-of-stay-check-out input', component.getDOMNode()).attr('id'), 'B');
});
it('contains the nights count span', function () {

@@ -98,0 +86,0 @@ assert.strictEqual($('span.period-of-stay-nights', component.getDOMNode()).size(), 1);

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