Socket
Socket
Sign inDemoInstall

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 3.0.1 to 3.0.2

dist/utils.spec.d.ts

3

dist/index.d.ts

@@ -7,2 +7,3 @@ /**

interface Props {
className: string;
href: string;

@@ -20,5 +21,5 @@ event: ICalEvent;

constructor(props: any);
handleClick: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
handleClick: (e: React.MouseEvent<HTMLAnchorElement>) => void;
render(): JSX.Element;
}
export {};

@@ -43,14 +43,2 @@ import * as React from 'react';

function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function pad(num) {

@@ -77,21 +65,24 @@ if (num < 10) {

var body = [];
body.push("URL:" + (event.url || document.URL));
if (!event || !event.startTime || !event.title)
throw Error("Both startTime and title fields are mandatory");
body.push("DTSTART:" + formatDate(event.startTime));
body.push("SUMMARY:" + event.title);
event.attendees && event.attendees.forEach(function (attendee) {
var regExp = /^([^<]+)\s*<(.+)>/;
var matches = attendee.match(regExp);
if (matches) {
var name_1 = matches[1];
var email = matches[2];
body.push([
'ATTENDEE',
"CN=" + name_1,
'CUTYPE=INDIVIDUAL',
'PARTSTAT=NEEDS-ACTION',
'ROLE=REQ-PARTICIPANT',
"RSVP=TRUE:mailto:" + email
].join(';'));
}
});
event.url && body.push("URL:" + event.url);
event.attendees &&
event.attendees.forEach(function (attendee) {
var regExp = /^([^<]+)\s*<(.+)>/;
var matches = attendee.match(regExp);
if (matches) {
var name_1 = matches[1];
var email = matches[2];
body.push([
"ATTENDEE",
"CN=" + name_1,
"CUTYPE=INDIVIDUAL",
"PARTSTAT=NEEDS-ACTION",
"ROLE=REQ-PARTICIPANT",
"RSVP=TRUE:mailto:" + email
].join(";"));
}
});
event.endTime && body.push("DTEND:" + formatDate(event.endTime));

@@ -170,4 +161,4 @@ event.description && body.push("DESCRIPTION:" + event.description);

ICalLink.prototype.render = function () {
var _a = this.props, children = _a.children, otherProps = __rest(_a, ["children"]);
return (React.createElement("a", __assign({ onClick: this.handleClick }, otherProps), children));
var _a = this.props, children = _a.children, href = _a.href, className = _a.className;
return (React.createElement("a", __assign({ onClick: this.handleClick }, { href: href, className: className }), children));
};

@@ -185,3 +176,3 @@ // FIXME - iOS Chrome doesn't support adding to iCal at the moment.

export default ICalLink;
export { ICalLink as default };
//# sourceMappingURL=index.es.js.map

@@ -16,5 +16,3 @@ 'use strict';

enumerable: true,
get: function () {
return e[k];
}
get: function () { return e[k]; }
});

@@ -24,3 +22,3 @@ }

}
n['default'] = e;
n["default"] = e;
return Object.freeze(n);

@@ -71,14 +69,2 @@ }

function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
}
function pad(num) {

@@ -105,21 +91,24 @@ if (num < 10) {

var body = [];
body.push("URL:" + (event.url || document.URL));
if (!event || !event.startTime || !event.title)
throw Error("Both startTime and title fields are mandatory");
body.push("DTSTART:" + formatDate(event.startTime));
body.push("SUMMARY:" + event.title);
event.attendees && event.attendees.forEach(function (attendee) {
var regExp = /^([^<]+)\s*<(.+)>/;
var matches = attendee.match(regExp);
if (matches) {
var name_1 = matches[1];
var email = matches[2];
body.push([
'ATTENDEE',
"CN=" + name_1,
'CUTYPE=INDIVIDUAL',
'PARTSTAT=NEEDS-ACTION',
'ROLE=REQ-PARTICIPANT',
"RSVP=TRUE:mailto:" + email
].join(';'));
}
});
event.url && body.push("URL:" + event.url);
event.attendees &&
event.attendees.forEach(function (attendee) {
var regExp = /^([^<]+)\s*<(.+)>/;
var matches = attendee.match(regExp);
if (matches) {
var name_1 = matches[1];
var email = matches[2];
body.push([
"ATTENDEE",
"CN=" + name_1,
"CUTYPE=INDIVIDUAL",
"PARTSTAT=NEEDS-ACTION",
"ROLE=REQ-PARTICIPANT",
"RSVP=TRUE:mailto:" + email
].join(";"));
}
});
event.endTime && body.push("DTEND:" + formatDate(event.endTime));

@@ -198,4 +187,4 @@ event.description && body.push("DESCRIPTION:" + event.description);

ICalLink.prototype.render = function () {
var _a = this.props, children = _a.children, otherProps = __rest(_a, ["children"]);
return (React__namespace.createElement("a", __assign({ onClick: this.handleClick }, otherProps), children));
var _a = this.props, children = _a.children, href = _a.href, className = _a.className;
return (React__namespace.createElement("a", __assign({ onClick: this.handleClick }, { href: href, className: className }), children));
};

@@ -213,3 +202,3 @@ // FIXME - iOS Chrome doesn't support adding to iCal at the moment.

exports.default = ICalLink;
exports["default"] = ICalLink;
//# sourceMappingURL=index.js.map
{
"name": "react-icalendar-link",
"version": "3.0.1",
"version": "3.0.2",
"description": "Ability to create link for downloading ics file",

@@ -16,12 +16,14 @@ "author": "josephj",

"scripts": {
"test": "cross-env CI=1 react-scripts-ts test --env=jsdom",
"test:watch": "react-scripts-ts test --env=jsdom",
"build": "rollup -c",
"test": "jest",
"test:watch": "jest --watch",
"build": "yarn test && rollup -c",
"start": "rollup -c -w",
"prepare": "npm run build",
"predeploy": "cd example && npm install && npm run build",
"prepare": "yarn build",
"predeploy": "cd example && yarn && yarn build",
"deploy": "gh-pages -d example/build",
"lint": "tslint 'src/**/*.{ts,tsx}'"
},
"dependencies": {},
"dependencies": {
"@jest/globals": "^27.0.1"
},
"peerDependencies": {

@@ -33,3 +35,3 @@ "prop-types": "^15.5.4",

"devDependencies": {
"@types/jest": "^26.0.23",
"@types/jest": "^27.0.2",
"@types/react": "^17.0.5",

@@ -39,5 +41,6 @@ "@types/react-dom": "^17.0.3",

"babel-runtime": "^6.26.0",
"cross-env": "^5.1.4",
"gh-pages": "^1.2.0",
"prettier": "^1.14.3",
"cross-env": "^7.0.3",
"gh-pages": "^3.2.3",
"jest": "^27.0.1",
"prettier": "^2.4.1",
"react": "^17.0.2",

@@ -53,7 +56,8 @@ "react-dom": "^17.0.2",

"rollup-plugin-url": "^3.0.1",
"tslint": "^5.11.0",
"ts-jest": "^27.0.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0",
"tslint-config-standard": "^8.0.1",
"tslint-react": "^3.6.0",
"typescript": "^2.8.3"
"tslint-config-standard": "^9.0.0",
"tslint-react": "^5.0.0",
"typescript": "^4.3.2"
},

@@ -60,0 +64,0 @@ "files": [

@@ -26,3 +26,7 @@ # react-icalendar-link

endTime: "2018-10-07T12:00:00+10:00",
location: "10 Carlotta St, Artarmon NSW 2064, Australia";
location: "10 Carlotta St, Artarmon NSW 2064, Australia",
attendees: [
"Hello World <hello@world.com>",
"Hey <hey@test.com>",
]
}

@@ -29,0 +33,0 @@ return (

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