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

@culturehq/add-to-calendar

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

@culturehq/add-to-calendar - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

CODE_OF_CONDUCT.md

18

CHANGELOG.md

@@ -9,4 +9,14 @@ # Changelog

## [1.0.1] - 2019-06-07
### Changed
- Switched to using `@culturehq/scripts` for development.
- Switched to using `@testing-library/react` for testing.
- Use `prepublishOnly` so that the `dist` directory does not need to be checked in.
## [1.0.0] - 2019-03-12
### Added
- Properly handles focus by focusing on the first link when the dropdown is rendered and then passing it back to the previous active element when the dropdown is hidden.

@@ -16,15 +26,21 @@ - Keyboard handling on the dropdown to allow the user to hit escape to close it.

### Changed
- Rewrote the state management using hooks (and updated the `react` and `react-dom` dependencies to require 16.8).
## [0.2.0] - 2018-12-19
### Changed
- Document the default wording using the `defaultProps` static value.
## [0.1.0] - 2018-12-06
### Added
- Initial release 🎉
[Unreleased]: https://github.com/CultureHQ/add-to-calendar/compare/v1.0.0...HEAD
[unreleased]: https://github.com/CultureHQ/add-to-calendar/compare/v1.0.1...HEAD
[1.0.1]: https://github.com/CultureHQ/add-to-calendar/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/CultureHQ/add-to-calendar/compare/v0.2.0...v1.0.0
[0.2.0]: https://github.com/CultureHQ/add-to-calendar/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/CultureHQ/add-to-calendar/compare/d105a7...v0.1.0

36

dist/AddToCalendar.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -13,5 +13,5 @@ var _react = _interopRequireWildcard(require("react"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }

@@ -67,3 +67,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }

var Calendar = _react.default.forwardRef(function (_ref, ref) {
var Calendar = _react["default"].forwardRef(function (_ref, ref) {
var children = _ref.children,

@@ -73,3 +73,3 @@ _ref$download = _ref.download,

href = _ref.href;
return _react.default.createElement("a", {
return _react["default"].createElement("a", {
ref: ref,

@@ -94,18 +94,18 @@ download: download,

}, [onToggle]);
return _react.default.createElement("div", {
return _react["default"].createElement("div", {
className: "chq-atc--dropdown",
onKeyDown: onKeyDown,
role: "presentation"
}, _react.default.createElement(Calendar, {
}, _react["default"].createElement(Calendar, {
href: urls.ics,
download: true,
ref: ref
}, "Apple Calendar"), _react.default.createElement(Calendar, {
}, "Apple Calendar"), _react["default"].createElement(Calendar, {
href: urls.google
}, "Google"), _react.default.createElement(Calendar, {
}, "Google"), _react["default"].createElement(Calendar, {
href: urls.ics,
download: true
}, "Outlook"), _react.default.createElement(Calendar, {
}, "Outlook"), _react["default"].createElement(Calendar, {
href: urls.outlook
}, "Outlook Web App"), _react.default.createElement(Calendar, {
}, "Outlook Web App"), _react["default"].createElement(Calendar, {
href: urls.yahoo

@@ -127,17 +127,17 @@ }, "Yahoo"));

var urls = (0, _react.useMemo)(function () {
return (0, _makeUrls.default)(event);
return (0, _makeUrls["default"])(event);
}, [event]);
return _react.default.createElement("div", {
return _react["default"].createElement("div", {
className: "chq-atc"
}, event && _react.default.createElement("button", {
}, event && _react["default"].createElement("button", {
type: "button",
className: "chq-atc--button",
onClick: onToggle
}, _react.default.createElement("svg", {
}, _react["default"].createElement("svg", {
width: "20px",
height: "20px",
viewBox: "0 0 1024 1024"
}, _react.default.createElement("path", {
}, _react["default"].createElement("path", {
d: "M704 192v-64h-32v64h-320v-64h-32v64h-192v704h768v-704h-192z M864 864h-704v-480h704v480z M864 352h-704v-128h160v64h32v-64h320v64h32v-64h160v128z"
})), " ", children), open && _react.default.createElement(Dropdown, {
})), " ", children), open && _react["default"].createElement(Dropdown, {
onToggle: onToggle,

@@ -149,2 +149,2 @@ urls: urls

var _default = AddToCalendar;
exports.default = _default;
exports["default"] = _default;

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -76,2 +76,2 @@ var makeDuration = function makeDuration(event) {

var _default = makeUrls;
exports.default = _default;
exports["default"] = _default;
{
"name": "@culturehq/add-to-calendar",
"version": "1.0.0",
"version": "1.0.1",
"description": "A small package for adding an event to a calendar.",
"main": "dist/AddToCalendar.js",
"scripts": {
"build": "yarn build:js && yarn build:docs",
"build:js": "babel src --out-dir ./dist --ignore '**/__tests__' && cp src/styles.css dist",
"build:docs": "webpack --mode production",
"lint": "eslint .",
"docs": "webpack --mode production",
"lint": "chq-scripts lint",
"prepublishOnly": "rm -f dist/* && babel src --out-dir ./dist --ignore '**/__tests__' && cp src/styles.css dist",
"start": "webpack-dev-server --mode development --hot",
"test": "jest"
"test": "chq-scripts test"
},

@@ -29,26 +28,17 @@ "repository": {

"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/preset-env": "^7.3.4",
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/preset-react": "^7.0.0",
"@culturehq/eslint-config": "^1.0.0",
"babel-core": "^7.0.0-0",
"babel-jest": "^24.5.0",
"babel-loader": "^8.0.5",
"@culturehq/scripts": "^1.0.0",
"@testing-library/react": "^8.0.1",
"babel-loader": "^8.0.6",
"css-loader": "^2.1.1",
"eslint": "^5.15.1",
"jest": "^24.5.0",
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-testing-library": "^6.0.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"style-loader": "^0.23.0",
"webpack": "^4.29.6",
"webpack-cli": "^3.2.3",
"webpack-dev-server": "^3.2.1"
},
"jest": {
"setupFilesAfterEnv": [
"./setupTests.js"
]
"webpack": "^4.33.0",
"webpack-cli": "^3.3.3",
"webpack-dev-server": "^3.7.1"
}
}

@@ -33,7 +33,7 @@ # @culturehq/add-to-calendar

* `name` - the name of the event
* `details` - the details of the event
* `location` - the location of the event
* `startsAt` - the start time of the event, formatted as an ISO string
* `endsAt` - the end time of the event, formatted as an ISO string
- `name` - the name of the event
- `details` - the details of the event
- `location` - the location of the event
- `startsAt` - the start time of the event, formatted as an ISO string
- `endsAt` - the end time of the event, formatted as an ISO string

@@ -47,1 +47,9 @@ ### `open`

You can run the tests by running `yarn test` and lint by running `yarn lint`. You can run the local server by running `yarn start` which will start the docs server on `http://localhost:8080`.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/CultureHQ/add-to-calendar.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

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