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

@schedule-x/react

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@schedule-x/react - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

development/next-app/app/favicon.ico

10

CHANGELOG.md

@@ -5,8 +5,14 @@ # Changelog

## [1.2.1](https://github.com/schedule-x/react/compare/v1.2.0...v1.2.1) (2024-01-04)
### Bug Fixes
* usage in nextjs ([#22](https://github.com/schedule-x/react/issues/22)) ([70f81df](https://github.com/schedule-x/react/commit/70f81dff94c7c3334cf69ed5935aa4b0fdf6966d))
# [1.2.0](https://github.com/schedule-x/react/compare/v1.1.1...v1.2.0) (2024-01-04)
### Features
* bump calendar monorepo packages to 1.3.0 ([#21](https://github.com/schedule-x/react/issues/21)) ([bcba535](https://github.com/schedule-x/react/commit/bcba5359d430942ea82ec5662c9848791c9b2f13))
- bump calendar monorepo packages to 1.3.0 ([#21](https://github.com/schedule-x/react/issues/21)) ([bcba535](https://github.com/schedule-x/react/commit/bcba5359d430942ea82ec5662c9848791c9b2f13))

@@ -13,0 +19,0 @@ ## [1.1.1](https://github.com/schedule-x/react/compare/v1.1.0...v1.1.1) (2023-12-29)

2

cypress/e2e/001-smoke.cy.ts
import { createCalendarHeaderPageObject } from '@schedule-x/e2e-testing'
describe('Smoke Test', () => {
describe('Smoke test', () => {
const calendarHeader = createCalendarHeaderPageObject()

@@ -5,0 +5,0 @@

@@ -15,3 +15,3 @@ 'use strict';

function ScheduleXCalendar({ calendarApp, customComponents }) {
const randomId = 'sx' + Math.random().toString(36).substring(2, 11);
const [randomId, setRandomId] = react.useState('');
const [customComponentsMeta, setCustomComponentsMeta] = react.useState([]);

@@ -30,7 +30,13 @@ const setComponent = (component) => {

react.useEffect(() => {
setRandomId('sx' + Math.random().toString(36).substring(2, 11));
}, []);
react.useEffect(() => {
for (const [componentName, Component] of Object.entries(customComponents || {})) {
calendarApp._setCustomComponentFn(componentName, createCustomComponentFn(setComponent, Component));
}
calendarApp.render(document.getElementById(randomId));
}, [calendarApp, randomId, customComponents]);
const calendarElement = document.getElementById(randomId);
if (!calendarElement)
return;
calendarApp.render(calendarElement);
}, [calendarApp, customComponents, randomId]);
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(react.Fragment, { children: [jsxRuntime.jsx("div", { className: "sx-react-calendar-wrapper", id: randomId }), customComponentsMeta.map(({ Component, wrapperElement }) => {

@@ -37,0 +43,0 @@ return reactDom.createPortal(Component, wrapperElement);

@@ -13,3 +13,3 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';

function ScheduleXCalendar({ calendarApp, customComponents }) {
const randomId = 'sx' + Math.random().toString(36).substring(2, 11);
const [randomId, setRandomId] = useState('');
const [customComponentsMeta, setCustomComponentsMeta] = useState([]);

@@ -28,7 +28,13 @@ const setComponent = (component) => {

useEffect(() => {
setRandomId('sx' + Math.random().toString(36).substring(2, 11));
}, []);
useEffect(() => {
for (const [componentName, Component] of Object.entries(customComponents || {})) {
calendarApp._setCustomComponentFn(componentName, createCustomComponentFn(setComponent, Component));
}
calendarApp.render(document.getElementById(randomId));
}, [calendarApp, randomId, customComponents]);
const calendarElement = document.getElementById(randomId);
if (!calendarElement)
return;
calendarApp.render(calendarElement);
}, [calendarApp, customComponents, randomId]);
return (jsx(Fragment, { children: jsxs(Fragment$1, { children: [jsx("div", { className: "sx-react-calendar-wrapper", id: randomId }), customComponentsMeta.map(({ Component, wrapperElement }) => {

@@ -35,0 +41,0 @@ return createPortal(Component, wrapperElement);

@@ -17,3 +17,3 @@ {

"types": "dist/types/index.d.ts",
"version": "1.2.0",
"version": "1.2.1",
"type": "module",

@@ -20,0 +20,0 @@ "scripts": {

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