Socket
Socket
Sign inDemoInstall

cronofy-elements

Package Overview
Dependencies
Maintainers
3
Versions
171
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.11.1 to 1.12.0

build/CronofyElements.v1.12.0.js

2

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

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

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

res.available_slots,
status.locale
status.locale,
status.tzid
);

@@ -158,0 +159,0 @@

@@ -9,3 +9,8 @@ import React, { useContext } from "react";

import { I18nContext, ThemeContext, SlotsContext } from "./SlotPicker";
import {
I18nContext,
ThemeContext,
SlotsContext,
StatusContext
} from "./SlotPicker";

@@ -16,2 +21,3 @@ const TimeSlots = props => {

const slots = useContext(SlotsContext);
const [status] = useContext(StatusContext);
return (

@@ -76,3 +82,5 @@ <div

{i18n.f(
moment(slots.day, "YYYY-MM-DDTThh:mm:00Z"),
moment(slots.day, "YYYY-MM-DDTThh:mm:00Z").tz(
status.tzid
),
`dddd Do MMMM`

@@ -79,0 +87,0 @@ )}

@@ -112,3 +112,3 @@ const moment = require("moment-timezone");

export const arangeSlotsByDay = (days, available_periods, locale) =>
export const arangeSlotsByDay = (days, available_periods, locale, tzid) =>
days.reduce(

@@ -126,5 +126,7 @@ (acc, day) => ({

label: `${moment(slot.start)
.tz(tzid)
.locale(locale)
.format("LT")
.replace(" ", "")} - ${moment(slot.end)
.tz(tzid)
.locale(locale)

@@ -131,0 +133,0 @@ .format("LT")

@@ -290,5 +290,12 @@ import * as slotsHelpers from "../src/js/helpers/slots";

const result = slotsHelpers.arangeSlotsByDay(days, slots, "en-US");
const sniffedTimezone = moment.tz.guess();
const result = slotsHelpers.arangeSlotsByDay(
days,
slots,
"en-US",
sniffedTimezone
);
expect(result).toEqual(expectedResult);
});
});

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