react-calendar-timeline
Advanced tools
Comparing version 0.11.3 to 0.12.0-0
# The MIT License (MIT) | ||
Copyright (c) 2015-2016 Marius Andra <marius.andra@gmail.com>; Namespace OÜ <info@namespace.ee> | ||
Copyright (c) 2015-2017 Marius Andra <marius.andra@gmail.com>; Namespace OÜ <info@namespace.ee> | ||
@@ -4,0 +4,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
{ | ||
"name": "react-calendar-timeline", | ||
"version": "0.11.3", | ||
"version": "0.12.0-0", | ||
"description": "react calendar timeline", | ||
"main": "modules/index.js", | ||
"main": "lib/index.js", | ||
"jsnext:main": "src/index.js", | ||
"scripts": { | ||
"build": "npm run build:lib && npm run build:demo", | ||
"build:demo": "echo '!!! Building Demo' && BABEL_ENV=react node build.js production", | ||
"build:lib": "echo '!!! Building Library' && ./node_modules/.bin/babel src --out-dir lib && ./node_modules/.bin/node-sass src/lib/Timeline.scss lib/lib/Timeline.css && sed -i'.bak' 's/Timeline\\.scss/Timeline\\.css/g' lib/lib/Timeline.js && rm lib/lib/Timeline.js.bak", | ||
"jest": "node_modules/.bin/jest", | ||
"jest:update": "node_modules/.bin/jest -u", | ||
"clean": "rimraf -rf ./build", | ||
"watch": "npm run clean && node scripts/watch.js", | ||
"build": "npm run clean && npm run build:dev && npm run build:prod", | ||
"build:dev": "echo 'DEV - BUILD' && webpack --config webpack.config.js", | ||
"build:prod": "echo 'PROD - BUILD' && webpack --config webpack.config.prod.js", | ||
"release": "npm run build && babel src --out-dir build && cp README.md build/", | ||
"module": "./node_modules/.bin/babel src --out-dir modules && ./node_modules/.bin/node-sass src/lib/Timeline.scss modules/lib/Timeline.css && sed -i'.bak' 's/Timeline\\.scss/Timeline\\.css/g' modules/lib/Timeline.js && rm modules/lib/Timeline.js.bak", | ||
"lint": "eslint --ext .js,.jsx src", | ||
"lintfix": "eslint --ext .js,.jsx src --fix", | ||
"upgrade:patch": "npm version patch", | ||
"preversion": "npm run module && npm run lint", | ||
"postversion": "git push origin `git rev-parse --abbrev-ref HEAD` && git push origin `git describe`", | ||
"npm:publish:next": "npm run release && cd build && npm publish --tag next", | ||
"npm:publish:latest": "npm run release && cd build && npm publish", | ||
"info": "npm info react-calendar-timeline", | ||
"start": "./node_modules/.bin/webpack-dev-server --inline --hot --host 0.0.0.0" | ||
"lint": "eslint --ext .js,.jsx src demo *.js", | ||
"lint:fix": "eslint --ext .js,.jsx src demo *.js --fix", | ||
"prepublish": "npm run build:lib", | ||
"start": "./node_modules/.bin/webpack-dev-server --hot --host 0.0.0.0 --port 8080 --display-modules", | ||
"test": "npm run module && npm run jest && npm run lint" | ||
}, | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"homepage": "https://github.com/namespace-ee/react-calendar-timeline", | ||
@@ -82,2 +79,4 @@ "repository": { | ||
"extract-text-webpack-plugin": "^1.0.1", | ||
"faker": "^4.1.0", | ||
"file-loader": "^0.11.2", | ||
"jasmine": "~2.5.2", | ||
@@ -92,3 +91,3 @@ "jasmine-core": "~2.5.2", | ||
"moment": "^2.11.1", | ||
"node-sass": "^3.4.2", | ||
"node-sass": "^4.5.3", | ||
"react": "^15.0.1", | ||
@@ -95,0 +94,0 @@ "react-addons-perf": "^15.0.1", |
@@ -5,3 +5,3 @@ # React Calendar Timeline | ||
![calendar demo](https://raw.githubusercontent.com/namespace-ee/react-calendar-timeline/master/doc/demo.gif) | ||
![calendar demo](https://raw.githubusercontent.com/namespace-ee/react-calendar-timeline/master/demo.gif) | ||
@@ -12,3 +12,3 @@ Demo here: http://namespace.ee/react-calendar-timeline/ | ||
``` | ||
```bash | ||
# via yarn | ||
@@ -25,3 +25,3 @@ yarn add react-calendar-timeline | ||
``` | ||
```bash | ||
# via yarn | ||
@@ -75,3 +75,3 @@ yarn add react react-dom # you probably already have these | ||
Expects either a vanilla JS array or an immutableJS array, consisting of objects with the following attributes: | ||
``` | ||
```js | ||
{ | ||
@@ -85,3 +85,3 @@ id: 1, | ||
Expects either a vanilla JS array or an immutableJS array, consisting of objects with the following attributes: | ||
``` | ||
```js | ||
{ | ||
@@ -107,3 +107,3 @@ id: 1, | ||
An array specifying keys in the `items` and `groups` objects. Defaults to | ||
``` | ||
```js | ||
{ | ||
@@ -300,3 +300,3 @@ groupIdKey: 'id', | ||
``` | ||
```css | ||
.react-calendar-timeline .rct-items .rct-item.analysis { | ||
@@ -321,3 +321,3 @@ backgroundColor: #68efad; | ||
``` | ||
```bash | ||
$ git clone https://github.com/namespace-ee/react-calendar-timeline.git react-calendar-timeline | ||
@@ -332,1 +332,12 @@ $ cd react-calendar-timeline | ||
Please run `npm run lint` before you send a pull request. `npm run jest` runs the tests. | ||
<!-- | ||
If you are core member team to patch npm run: | ||
```bash | ||
npm version patch | ||
``` | ||
--> |
import React from 'react' | ||
import { mount } from 'enzyme' | ||
import Timeline from '../timeline' | ||
import Timeline from '../Timeline' | ||
@@ -5,0 +5,0 @@ import moment from 'moment' |
@@ -197,2 +197,3 @@ import React, { Component } from 'react' | ||
}) | ||
.styleCursor(false) | ||
.on('dragstart', (e) => { | ||
@@ -199,0 +200,0 @@ if (this.props.selected) { |
@@ -227,3 +227,3 @@ import moment from 'moment' | ||
var other = group[j] | ||
if (other.top !== null && other !== item && other.dimensions.stack && collision(item.dimensions, other.dimensions, item.dimensions.lineHeight)) { | ||
if (other.dimensions.top !== null && other !== item && other.dimensions.stack && collision(item.dimensions, other.dimensions, item.dimensions.lineHeight)) { | ||
collidingItem = other | ||
@@ -325,32 +325,2 @@ break | ||
export function createGradientPattern (lineHeight, color1, color2, borderColor) { | ||
if (borderColor) { | ||
if (!color2 || color1 === color2) { | ||
return 'repeating-linear-gradient(to bottom, ' + | ||
`${color1},` + | ||
`${color1} ${lineHeight - 1}px,` + | ||
`${borderColor} ${lineHeight - 1}px,` + | ||
`${borderColor} ${lineHeight}px` + | ||
')' | ||
} else { | ||
return 'repeating-linear-gradient(to bottom, ' + | ||
`${color1},` + | ||
`${color1} ${lineHeight - 1}px,` + | ||
`${borderColor} ${lineHeight - 1}px,` + | ||
`${borderColor} ${lineHeight}px,` + | ||
`${color2} ${lineHeight}px,` + | ||
`${color2} ${lineHeight * 2 - 1}px,` + | ||
`${borderColor} ${lineHeight * 2 - 1}px,` + | ||
`${borderColor} ${lineHeight * 2}px` + | ||
')' | ||
} | ||
} else { | ||
if (!color2 || color1 === color2) { | ||
return color1 | ||
} else { | ||
return `repeating-linear-gradient(to bottom,${color1},${color1} ${lineHeight}px,${color2} ${lineHeight}px,${color2} ${lineHeight * 2}px)` | ||
} | ||
} | ||
} | ||
export function deepObjectCompare (obj1, obj2) { | ||
@@ -357,0 +327,0 @@ for (var p in obj1) { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
335
238762
39
32
5080
1