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.34.3 to 1.34.4

build/CronofyElements.v1.34.4.js

2

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

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

@@ -40,2 +40,3 @@ import React, { useContext, useEffect, useState } from "react";

i18n,
locale: status.locale,
})

@@ -100,2 +101,3 @@ );

i18n,
locale: status.locale,
})

@@ -102,0 +104,0 @@ );

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

const tzRef = useRef();
const tzListRef = useRef();

@@ -67,3 +68,16 @@

const handleClickOutside = e => {
if (tzRef.current && !tzRef.current.contains(e.target)) {
setShowList(false);
}
};
useEffect(() => {
document.addEventListener("click", handleClickOutside);
return () => {
document.removeEventListener("click", handleClickOutside);
};
}, []);
useEffect(() => {
if (showList && tzListRef.current) {

@@ -115,3 +129,3 @@ tzListRef.current.focus();

return (
<div className={theme.classBuilder("timezone-selector")}>
<div className={theme.classBuilder("timezone-selector")} ref={tzRef}>
<button

@@ -118,0 +132,0 @@ className={theme.classBuilder("timezone-selector--button")}

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

export const getMonthsDescription = days => {
export const getMonthsDescription = (days, locale) => {
const coverage = days

@@ -297,4 +297,4 @@ .map(day => moment.utc(day, "YYYY-MM-DD"))

(acc, curr) => {
acc.months.push(curr.format("MMM"));
acc.years.push(curr.format("YYYY"));
acc.months.push(curr.locale(locale).format("MMM"));
acc.years.push(curr.locale(locale).format("YYYY"));
return acc;

@@ -301,0 +301,0 @@ },

@@ -694,3 +694,3 @@ import moment from "moment-timezone";

export const getAllLabels = ({ days, limits, tzid, i18n }) => {
export const getAllLabels = ({ days, limits, tzid, i18n, locale }) => {
// For each week that the AV could potentially show we

@@ -737,3 +737,3 @@ // want to calculate:

...week,
month: getMonthsDescription(simpleDaysArray),
month: getMonthsDescription(simpleDaysArray, locale),
};

@@ -740,0 +740,0 @@ });

@@ -96,2 +96,3 @@ import React from "react";

demo: true,
locale: "en",
};

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

@@ -1570,2 +1570,3 @@ import * as utils from "../src/js/helpers/utils.AvailabilityViewer";

},
locale: "en",
};

@@ -1572,0 +1573,0 @@ const allLabels = utils.getAllLabels(options);

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

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