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

react-icalendar-link

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-icalendar-link - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

dist/index.d.ts

@@ -12,5 +12,7 @@ /**

isCrappyIE: boolean;
isSupported: boolean;
}
export default class ICalLink extends React.Component<Props> {
isCrappyIE: boolean;
static isSupported: boolean;
static defaultProps: Partial<Props>;

@@ -17,0 +19,0 @@ constructor(props: any);

12

dist/index.es.js

@@ -127,3 +127,3 @@ function __$styleInject(css, ref) {

}
function isMobileSafari() {
function isIOSSafari() {
var ua = window.navigator.userAgent;

@@ -134,2 +134,7 @@ var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);

}
function isIOSChrome() {
var ua = window.navigator.userAgent;
var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);
return iOS && !!ua.match(/CriOS/i);
}

@@ -147,3 +152,3 @@ /**

var _a = _this.props, event = _a.event, filename = _a.filename;
var url = buildUrl(event, isMobileSafari());
var url = buildUrl(event, isIOSSafari());
var blob = new Blob([url], {

@@ -158,3 +163,3 @@ type: "text/calendar;charset=utf-8"

// Safari
if (isMobileSafari()) {
if (isIOSSafari()) {
window.open(url, "_blank");

@@ -175,2 +180,3 @@ return;

};
ICalLink.isSupported = !isIOSChrome();
ICalLink.defaultProps = {

@@ -177,0 +183,0 @@ filename: "download.ics",

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

}
function isMobileSafari() {
function isIOSSafari() {
var ua = window.navigator.userAgent;

@@ -138,2 +138,7 @@ var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);

}
function isIOSChrome() {
var ua = window.navigator.userAgent;
var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i);
return iOS && !!ua.match(/CriOS/i);
}

@@ -151,3 +156,3 @@ /**

var _a = _this.props, event = _a.event, filename = _a.filename;
var url = buildUrl(event, isMobileSafari());
var url = buildUrl(event, isIOSSafari());
var blob = new Blob([url], {

@@ -162,3 +167,3 @@ type: "text/calendar;charset=utf-8"

// Safari
if (isMobileSafari()) {
if (isIOSSafari()) {
window.open(url, "_blank");

@@ -179,2 +184,3 @@ return;

};
ICalLink.isSupported = !isIOSChrome();
ICalLink.defaultProps = {

@@ -181,0 +187,0 @@ filename: "download.ics",

@@ -12,2 +12,3 @@ export interface ICalEvent {

export declare function isCrappyIE(): boolean;
export declare function isMobileSafari(): boolean;
export declare function isIOSSafari(): boolean;
export declare function isIOSChrome(): boolean;
{
"name": "react-icalendar-link",
"version": "1.0.1",
"version": "1.0.2",
"description": "Ability to create link for downloading ics file",

@@ -5,0 +5,0 @@ "author": "josephj",

Sorry, the diff of this file is not supported yet

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