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.27.0 to 1.27.1

build/CronofyElements.v1.27.1.js

2

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

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

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

active: rulesResponse.availability_rule.calendar_ids || [],
all: calsResponse.parsed,
all: calsResponse.calendars,
profiles: calsResponse.profiles

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

@@ -93,6 +93,14 @@ import * as mocks from "./mocks";

export const parseRulesCalendars = response => {
const parsed = response["cronofy.data"].profiles.map(profile => {
return profile.profile_calendars
.filter(cal => !cal.calendar_deleted)
.map(cal => ({
// Filter deleted calendars
const profiles = response["cronofy.data"].profiles.map(profile => {
const profile_calendars = profile.profile_calendars.filter(
cal => !cal.calendar_deleted
);
return { ...profile, profile_calendars };
});
// Format and flatten calendars into 1D array
const calendars = profiles
.map(profile =>
profile.profile_calendars.map(cal => ({
name: cal.calendar_name,

@@ -102,8 +110,9 @@ id: cal.calendar_id,

provider_name: profile.provider_name
}));
});
}))
)
.reduce((acc, curr) => [...acc, ...curr], []);
return {
parsed: parsed.reduce((acc, curr) => [...acc, ...curr], []),
profiles: response["cronofy.data"].profiles
calendars,
profiles
};

@@ -110,0 +119,0 @@ };

@@ -10,2 +10,3 @@ import {

import { default_availability_rules } from "./mocks";
import moment from "moment-timezone";

@@ -12,0 +13,0 @@ export const parseAvailabilityRulesOptions = (options = {}) => {

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