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.12.1 to 1.13.0

build/CronofyElements.v1.13.0.js

2

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

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

import React, { useContext } from "react";
import { css, jsx } from "@emotion/core";
import { SlotsContext, ThemeContext, ExtrasContext } from "./AvailabilityRules";
import {
SlotsContext,
StatusContext,
ThemeContext,
ExtrasContext
} from "./AvailabilityRules";
import { DragContext } from "./Week";
import Slot from "./Slot";
import { parseSlotsIntoDays } from "../../helpers/slots.rules";
import { buildNewRules, parseSlotsIntoDays } from "../../helpers/slots.rules";
import { arrayOfDaySlots } from "../../helpers/utils.AvailabilityRules";

@@ -16,6 +21,7 @@

const [theme, setTheme] = useContext(ThemeContext);
const [status] = useContext(StatusContext);
const days = parseSlotsIntoDays(slots, extras.limits.slotsPerDay);
const toggleMultiple = (IDs, status) => {
const availability = status === "available";
const toggleMultiple = (IDs, toggleStatus) => {
const availability = toggleStatus === "available";

@@ -27,3 +33,13 @@ const newSlots = {};

setSlots({ ...slots, ...newSlots });
const allSlots = { ...slots, ...newSlots };
const newRules = buildNewRules(allSlots);
const callbackContent = {
notification: {
type: "availability_rule_edited"
},
availability_rule: newRules
};
status.ruleSaved(callbackContent);
setSlots(allSlots);
};

@@ -30,0 +46,0 @@

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