Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cronofy-elements

Package Overview
Dependencies
Maintainers
3
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cronofy-elements - npm Package Compare versions

Comparing version 1.29.2 to 1.30.0

build/CronofyElements.v1.30.0.js

2

package.json
{
"name": "cronofy-elements",
"version": "1.29.2",
"version": "1.30.0",
"description": "Fast track scheduling with Cronofy's embeddable UI Elements",

@@ -5,0 +5,0 @@ "main": "build/npm/CronofyElements.js",

@@ -95,3 +95,4 @@ import React, { useState, useEffect, useRef } from "react";

pagesLoaded: [],
startDay: options.config.startDay
startDay: options.config.startDay,
allowExpansion: options.config.allowExpansion
});

@@ -98,0 +99,0 @@

@@ -46,5 +46,9 @@ import React, { useContext, useState } from "react";

)}
{status.mode === "free_select" && <TimeExpander backwards={true} />}
{(status.mode === "free_select" || status.allowExpansion) && (
<TimeExpander backwards={true} />
)}
{labelsOutput}
{status.mode === "free_select" && <TimeExpander />}
{(status.mode === "free_select" || status.allowExpansion) && (
<TimeExpander />
)}
</div>

@@ -51,0 +55,0 @@ );

@@ -144,2 +144,8 @@ import moment from "moment-timezone";

const allowExpansion =
typeof config.allow_expansion === "undefined" ||
config.allow_expansion === "default"
? false
: config.allow_expansion;
const startDay =

@@ -174,2 +180,3 @@ typeof config.week_start_day === "undefined" ||

...config,
allowExpansion,
start_time: startTime.time,

@@ -215,2 +222,3 @@ end_time: endTime.time,

delete config.week_start_day;
delete config.allow_expansion;
delete config.translations;

@@ -217,0 +225,0 @@

@@ -32,2 +32,3 @@ import moment from "moment-timezone";

config: {
allow_expansion: true,
bounds_control: true,

@@ -46,2 +47,3 @@ start_time: "01:00",

config: {
allowExpansion: true,
boundsControl: true,

@@ -706,2 +708,38 @@ end_time: "02:00",

});
it("correctly adds config.allowExpansion", () => {
const input = {
data_center: "DATA_CENTER",
availability_query: {
query_periods: generic_query_periods,
required_duration: "TEST"
},
target_id: "TARGET",
element_token: "TOKEN"
};
const result = parseAvailabilityViewerOptions(input);
expect(result.config).toHaveProperty("allowExpansion");
expect(result.config.allowExpansion).toBe(false);
});
it("correctly parses config.allow_expansion", () => {
const input = {
data_center: "DATA_CENTER",
availability_query: {
query_periods: generic_query_periods,
required_duration: "TEST"
},
target_id: "TARGET",
element_token: "TOKEN",
config: {
allow_expansion: true
}
};
const result = parseAvailabilityViewerOptions(input);
expect(result.config).toHaveProperty("allowExpansion");
expect(result.config).not.toHaveProperty("allow_expansion");
expect(result.config.allowExpansion).toBe(true);
});
});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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