From 5110bfbc1978aec7367c19f36393224633e9d948 Mon Sep 17 00:00:00 2001 From: Kirill Stepkin Date: Tue, 15 Nov 2016 23:42:26 +0200 Subject: [PATCH] update gitignore --- .gitignore | 2 +- chartify.js | 1664 -- example/.gitignore | 3 +- example/dist/bundle.js | 49709 --------------------------------------- 4 files changed, 3 insertions(+), 51375 deletions(-) delete mode 100755 chartify.js delete mode 100755 example/dist/bundle.js diff --git a/.gitignore b/.gitignore index 2a4f639..a81632f 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules/ .idea/ -example/ +/chartify.js diff --git a/chartify.js b/chartify.js deleted file mode 100755 index 5f31fc9..0000000 --- a/chartify.js +++ /dev/null @@ -1,1664 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("react")); - else if(typeof define === 'function' && define.amd) - define(["react"], factory); - else if(typeof exports === 'object') - exports["Chartify"] = factory(require("react")); - else - root["Chartify"] = factory(root["React"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_38__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ var parentHotUpdateCallback = this["webpackHotUpdateChartify"]; -/******/ this["webpackHotUpdateChartify"] = function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars -/******/ hotAddUpdateChunk(chunkId, moreModules); -/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); -/******/ } - -/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars -/******/ var head = document.getElementsByTagName("head")[0]; -/******/ var script = document.createElement("script"); -/******/ script.type = "text/javascript"; -/******/ script.charset = "utf-8"; -/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; -/******/ head.appendChild(script); -/******/ } - -/******/ function hotDownloadManifest(callback) { // eslint-disable-line no-unused-vars -/******/ if(typeof XMLHttpRequest === "undefined") -/******/ return callback(new Error("No browser support")); -/******/ try { -/******/ var request = new XMLHttpRequest(); -/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; -/******/ request.open("GET", requestPath, true); -/******/ request.timeout = 10000; -/******/ request.send(null); -/******/ } catch(err) { -/******/ return callback(err); -/******/ } -/******/ request.onreadystatechange = function() { -/******/ if(request.readyState !== 4) return; -/******/ if(request.status === 0) { -/******/ // timeout -/******/ callback(new Error("Manifest request to " + requestPath + " timed out.")); -/******/ } else if(request.status === 404) { -/******/ // no update available -/******/ callback(); -/******/ } else if(request.status !== 200 && request.status !== 304) { -/******/ // other failure -/******/ callback(new Error("Manifest request to " + requestPath + " failed.")); -/******/ } else { -/******/ // success -/******/ try { -/******/ var update = JSON.parse(request.responseText); -/******/ } catch(e) { -/******/ callback(e); -/******/ return; -/******/ } -/******/ callback(null, update); -/******/ } -/******/ }; -/******/ } - - -/******/ // Copied from https://github.com/facebook/react/blob/bef45b0/src/shared/utils/canDefineProperty.js -/******/ var canDefineProperty = false; -/******/ try { -/******/ Object.defineProperty({}, "x", { -/******/ get: function() {} -/******/ }); -/******/ canDefineProperty = true; -/******/ } catch(x) { -/******/ // IE will fail on defineProperty -/******/ } - -/******/ var hotApplyOnUpdate = true; -/******/ var hotCurrentHash = "7d63ba02e36830c023eb"; // eslint-disable-line no-unused-vars -/******/ var hotCurrentModuleData = {}; -/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars - -/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars -/******/ var me = installedModules[moduleId]; -/******/ if(!me) return __webpack_require__; -/******/ var fn = function(request) { -/******/ if(me.hot.active) { -/******/ if(installedModules[request]) { -/******/ if(installedModules[request].parents.indexOf(moduleId) < 0) -/******/ installedModules[request].parents.push(moduleId); -/******/ if(me.children.indexOf(request) < 0) -/******/ me.children.push(request); -/******/ } else hotCurrentParents = [moduleId]; -/******/ } else { -/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId); -/******/ hotCurrentParents = []; -/******/ } -/******/ return __webpack_require__(request); -/******/ }; -/******/ for(var name in __webpack_require__) { -/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name)) { -/******/ if(canDefineProperty) { -/******/ Object.defineProperty(fn, name, (function(name) { -/******/ return { -/******/ configurable: true, -/******/ enumerable: true, -/******/ get: function() { -/******/ return __webpack_require__[name]; -/******/ }, -/******/ set: function(value) { -/******/ __webpack_require__[name] = value; -/******/ } -/******/ }; -/******/ }(name))); -/******/ } else { -/******/ fn[name] = __webpack_require__[name]; -/******/ } -/******/ } -/******/ } - -/******/ function ensure(chunkId, callback) { -/******/ if(hotStatus === "ready") -/******/ hotSetStatus("prepare"); -/******/ hotChunksLoading++; -/******/ __webpack_require__.e(chunkId, function() { -/******/ try { -/******/ callback.call(null, fn); -/******/ } finally { -/******/ finishChunkLoading(); -/******/ } - -/******/ function finishChunkLoading() { -/******/ hotChunksLoading--; -/******/ if(hotStatus === "prepare") { -/******/ if(!hotWaitingFilesMap[chunkId]) { -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ } -/******/ }); -/******/ } -/******/ if(canDefineProperty) { -/******/ Object.defineProperty(fn, "e", { -/******/ enumerable: true, -/******/ value: ensure -/******/ }); -/******/ } else { -/******/ fn.e = ensure; -/******/ } -/******/ return fn; -/******/ } - -/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars -/******/ var hot = { -/******/ // private stuff -/******/ _acceptedDependencies: {}, -/******/ _declinedDependencies: {}, -/******/ _selfAccepted: false, -/******/ _selfDeclined: false, -/******/ _disposeHandlers: [], - -/******/ // Module API -/******/ active: true, -/******/ accept: function(dep, callback) { -/******/ if(typeof dep === "undefined") -/******/ hot._selfAccepted = true; -/******/ else if(typeof dep === "function") -/******/ hot._selfAccepted = dep; -/******/ else if(typeof dep === "object") -/******/ for(var i = 0; i < dep.length; i++) -/******/ hot._acceptedDependencies[dep[i]] = callback; -/******/ else -/******/ hot._acceptedDependencies[dep] = callback; -/******/ }, -/******/ decline: function(dep) { -/******/ if(typeof dep === "undefined") -/******/ hot._selfDeclined = true; -/******/ else if(typeof dep === "number") -/******/ hot._declinedDependencies[dep] = true; -/******/ else -/******/ for(var i = 0; i < dep.length; i++) -/******/ hot._declinedDependencies[dep[i]] = true; -/******/ }, -/******/ dispose: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ addDisposeHandler: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ removeDisposeHandler: function(callback) { -/******/ var idx = hot._disposeHandlers.indexOf(callback); -/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1); -/******/ }, - -/******/ // Management API -/******/ check: hotCheck, -/******/ apply: hotApply, -/******/ status: function(l) { -/******/ if(!l) return hotStatus; -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ addStatusHandler: function(l) { -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ removeStatusHandler: function(l) { -/******/ var idx = hotStatusHandlers.indexOf(l); -/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1); -/******/ }, - -/******/ //inherit from previous dispose call -/******/ data: hotCurrentModuleData[moduleId] -/******/ }; -/******/ return hot; -/******/ } - -/******/ var hotStatusHandlers = []; -/******/ var hotStatus = "idle"; - -/******/ function hotSetStatus(newStatus) { -/******/ hotStatus = newStatus; -/******/ for(var i = 0; i < hotStatusHandlers.length; i++) -/******/ hotStatusHandlers[i].call(null, newStatus); -/******/ } - -/******/ // while downloading -/******/ var hotWaitingFiles = 0; -/******/ var hotChunksLoading = 0; -/******/ var hotWaitingFilesMap = {}; -/******/ var hotRequestedFilesMap = {}; -/******/ var hotAvailibleFilesMap = {}; -/******/ var hotCallback; - -/******/ // The update info -/******/ var hotUpdate, hotUpdateNewHash; - -/******/ function toModuleId(id) { -/******/ var isNumber = (+id) + "" === id; -/******/ return isNumber ? +id : id; -/******/ } - -/******/ function hotCheck(apply, callback) { -/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status"); -/******/ if(typeof apply === "function") { -/******/ hotApplyOnUpdate = false; -/******/ callback = apply; -/******/ } else { -/******/ hotApplyOnUpdate = apply; -/******/ callback = callback || function(err) { -/******/ if(err) throw err; -/******/ }; -/******/ } -/******/ hotSetStatus("check"); -/******/ hotDownloadManifest(function(err, update) { -/******/ if(err) return callback(err); -/******/ if(!update) { -/******/ hotSetStatus("idle"); -/******/ callback(null, null); -/******/ return; -/******/ } - -/******/ hotRequestedFilesMap = {}; -/******/ hotAvailibleFilesMap = {}; -/******/ hotWaitingFilesMap = {}; -/******/ for(var i = 0; i < update.c.length; i++) -/******/ hotAvailibleFilesMap[update.c[i]] = true; -/******/ hotUpdateNewHash = update.h; - -/******/ hotSetStatus("prepare"); -/******/ hotCallback = callback; -/******/ hotUpdate = {}; -/******/ var chunkId = 0; -/******/ { // eslint-disable-line no-lone-blocks -/******/ /*globals chunkId */ -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ }); -/******/ } - -/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars -/******/ if(!hotAvailibleFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) -/******/ return; -/******/ hotRequestedFilesMap[chunkId] = false; -/******/ for(var moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ hotUpdate[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } - -/******/ function hotEnsureUpdateChunk(chunkId) { -/******/ if(!hotAvailibleFilesMap[chunkId]) { -/******/ hotWaitingFilesMap[chunkId] = true; -/******/ } else { -/******/ hotRequestedFilesMap[chunkId] = true; -/******/ hotWaitingFiles++; -/******/ hotDownloadUpdateChunk(chunkId); -/******/ } -/******/ } - -/******/ function hotUpdateDownloaded() { -/******/ hotSetStatus("ready"); -/******/ var callback = hotCallback; -/******/ hotCallback = null; -/******/ if(!callback) return; -/******/ if(hotApplyOnUpdate) { -/******/ hotApply(hotApplyOnUpdate, callback); -/******/ } else { -/******/ var outdatedModules = []; -/******/ for(var id in hotUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ outdatedModules.push(toModuleId(id)); -/******/ } -/******/ } -/******/ callback(null, outdatedModules); -/******/ } -/******/ } - -/******/ function hotApply(options, callback) { -/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status"); -/******/ if(typeof options === "function") { -/******/ callback = options; -/******/ options = {}; -/******/ } else if(options && typeof options === "object") { -/******/ callback = callback || function(err) { -/******/ if(err) throw err; -/******/ }; -/******/ } else { -/******/ options = {}; -/******/ callback = callback || function(err) { -/******/ if(err) throw err; -/******/ }; -/******/ } - -/******/ function getAffectedStuff(module) { -/******/ var outdatedModules = [module]; -/******/ var outdatedDependencies = {}; - -/******/ var queue = outdatedModules.slice(); -/******/ while(queue.length > 0) { -/******/ var moduleId = queue.pop(); -/******/ var module = installedModules[moduleId]; -/******/ if(!module || module.hot._selfAccepted) -/******/ continue; -/******/ if(module.hot._selfDeclined) { -/******/ return new Error("Aborted because of self decline: " + moduleId); -/******/ } -/******/ if(moduleId === 0) { -/******/ return; -/******/ } -/******/ for(var i = 0; i < module.parents.length; i++) { -/******/ var parentId = module.parents[i]; -/******/ var parent = installedModules[parentId]; -/******/ if(parent.hot._declinedDependencies[moduleId]) { -/******/ return new Error("Aborted because of declined dependency: " + moduleId + " in " + parentId); -/******/ } -/******/ if(outdatedModules.indexOf(parentId) >= 0) continue; -/******/ if(parent.hot._acceptedDependencies[moduleId]) { -/******/ if(!outdatedDependencies[parentId]) -/******/ outdatedDependencies[parentId] = []; -/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); -/******/ continue; -/******/ } -/******/ delete outdatedDependencies[parentId]; -/******/ outdatedModules.push(parentId); -/******/ queue.push(parentId); -/******/ } -/******/ } - -/******/ return [outdatedModules, outdatedDependencies]; -/******/ } - -/******/ function addAllToSet(a, b) { -/******/ for(var i = 0; i < b.length; i++) { -/******/ var item = b[i]; -/******/ if(a.indexOf(item) < 0) -/******/ a.push(item); -/******/ } -/******/ } - -/******/ // at begin all updates modules are outdated -/******/ // the "outdated" status can propagate to parents if they don't accept the children -/******/ var outdatedDependencies = {}; -/******/ var outdatedModules = []; -/******/ var appliedUpdate = {}; -/******/ for(var id in hotUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ var moduleId = toModuleId(id); -/******/ var result = getAffectedStuff(moduleId); -/******/ if(!result) { -/******/ if(options.ignoreUnaccepted) -/******/ continue; -/******/ hotSetStatus("abort"); -/******/ return callback(new Error("Aborted because " + moduleId + " is not accepted")); -/******/ } -/******/ if(result instanceof Error) { -/******/ hotSetStatus("abort"); -/******/ return callback(result); -/******/ } -/******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; -/******/ addAllToSet(outdatedModules, result[0]); -/******/ for(var moduleId in result[1]) { -/******/ if(Object.prototype.hasOwnProperty.call(result[1], moduleId)) { -/******/ if(!outdatedDependencies[moduleId]) -/******/ outdatedDependencies[moduleId] = []; -/******/ addAllToSet(outdatedDependencies[moduleId], result[1][moduleId]); -/******/ } -/******/ } -/******/ } -/******/ } - -/******/ // Store self accepted outdated modules to require them later by the module system -/******/ var outdatedSelfAcceptedModules = []; -/******/ for(var i = 0; i < outdatedModules.length; i++) { -/******/ var moduleId = outdatedModules[i]; -/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted) -/******/ outdatedSelfAcceptedModules.push({ -/******/ module: moduleId, -/******/ errorHandler: installedModules[moduleId].hot._selfAccepted -/******/ }); -/******/ } - -/******/ // Now in "dispose" phase -/******/ hotSetStatus("dispose"); -/******/ var queue = outdatedModules.slice(); -/******/ while(queue.length > 0) { -/******/ var moduleId = queue.pop(); -/******/ var module = installedModules[moduleId]; -/******/ if(!module) continue; - -/******/ var data = {}; - -/******/ // Call dispose handlers -/******/ var disposeHandlers = module.hot._disposeHandlers; -/******/ for(var j = 0; j < disposeHandlers.length; j++) { -/******/ var cb = disposeHandlers[j]; -/******/ cb(data); -/******/ } -/******/ hotCurrentModuleData[moduleId] = data; - -/******/ // disable module (this disables requires from this module) -/******/ module.hot.active = false; - -/******/ // remove module from cache -/******/ delete installedModules[moduleId]; - -/******/ // remove "parents" references from all children -/******/ for(var j = 0; j < module.children.length; j++) { -/******/ var child = installedModules[module.children[j]]; -/******/ if(!child) continue; -/******/ var idx = child.parents.indexOf(moduleId); -/******/ if(idx >= 0) { -/******/ child.parents.splice(idx, 1); -/******/ } -/******/ } -/******/ } - -/******/ // remove outdated dependency from module children -/******/ for(var moduleId in outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { -/******/ var module = installedModules[moduleId]; -/******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ for(var j = 0; j < moduleOutdatedDependencies.length; j++) { -/******/ var dependency = moduleOutdatedDependencies[j]; -/******/ var idx = module.children.indexOf(dependency); -/******/ if(idx >= 0) module.children.splice(idx, 1); -/******/ } -/******/ } -/******/ } - -/******/ // Not in "apply" phase -/******/ hotSetStatus("apply"); - -/******/ hotCurrentHash = hotUpdateNewHash; - -/******/ // insert new code -/******/ for(var moduleId in appliedUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { -/******/ modules[moduleId] = appliedUpdate[moduleId]; -/******/ } -/******/ } - -/******/ // call accept handlers -/******/ var error = null; -/******/ for(var moduleId in outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { -/******/ var module = installedModules[moduleId]; -/******/ var moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ var callbacks = []; -/******/ for(var i = 0; i < moduleOutdatedDependencies.length; i++) { -/******/ var dependency = moduleOutdatedDependencies[i]; -/******/ var cb = module.hot._acceptedDependencies[dependency]; -/******/ if(callbacks.indexOf(cb) >= 0) continue; -/******/ callbacks.push(cb); -/******/ } -/******/ for(var i = 0; i < callbacks.length; i++) { -/******/ var cb = callbacks[i]; -/******/ try { -/******/ cb(outdatedDependencies); -/******/ } catch(err) { -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } -/******/ } -/******/ } - -/******/ // Load self accepted modules -/******/ for(var i = 0; i < outdatedSelfAcceptedModules.length; i++) { -/******/ var item = outdatedSelfAcceptedModules[i]; -/******/ var moduleId = item.module; -/******/ hotCurrentParents = [moduleId]; -/******/ try { -/******/ __webpack_require__(moduleId); -/******/ } catch(err) { -/******/ if(typeof item.errorHandler === "function") { -/******/ try { -/******/ item.errorHandler(err); -/******/ } catch(err) { -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } else if(!error) -/******/ error = err; -/******/ } -/******/ } - -/******/ // handle errors in accept handlers and self accepted module load -/******/ if(error) { -/******/ hotSetStatus("fail"); -/******/ return callback(error); -/******/ } - -/******/ hotSetStatus("idle"); -/******/ callback(null, outdatedModules); -/******/ } - -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false, -/******/ hot: hotCreateModule(moduleId), -/******/ parents: hotCurrentParents, -/******/ children: [] -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // __webpack_hash__ -/******/ __webpack_require__.h = function() { return hotCurrentHash; }; - -/******/ // Load entry module and return exports -/******/ return hotCreateRequire(0)(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _get = __webpack_require__(1)['default']; - - var _inherits = __webpack_require__(17)['default']; - - var _createClass = __webpack_require__(26)['default']; - - var _classCallCheck = __webpack_require__(29)['default']; - - var _Math$hypot = __webpack_require__(30)['default']; - - var _Math$fround = __webpack_require__(33)['default']; - - var _interopRequireDefault = __webpack_require__(37)['default']; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - - var _react = __webpack_require__(38); - - var _react2 = _interopRequireDefault(_react); - - __webpack_require__(39); - - var Chartify = (function (_Component) { - _inherits(Chartify, _Component); - - _createClass(Chartify, null, [{ - key: 'propTypes', - value: { - boxSize: _react.PropTypes.number, - data: _react.PropTypes.array, - height: _react.PropTypes.number, - line: _react.PropTypes.bool, - theme: _react.PropTypes.string - }, - enumerable: true - }]); - - function Chartify(props) { - _classCallCheck(this, Chartify); - - _get(Object.getPrototypeOf(Chartify.prototype), 'constructor', this).call(this, props); - this.SCALE_WIDTH = props.width || 50; - } - - _createClass(Chartify, [{ - key: 'calculateLineOptions', - value: function calculateLineOptions(currentMark, nextMark) { - var _props$boxSize = this.props.boxSize; - var boxSize = _props$boxSize === undefined ? 20 : _props$boxSize; - - var AC = boxSize; - var BC = Math.abs(nextMark - currentMark) * boxSize; - var AB = _Math$hypot(AC, BC); - var angleA = _Math$fround(Math.asin(BC / AB) * 180 / Math.PI); - - if (nextMark > currentMark) angleA = -angleA; - - return { - width: AB + 'px', - transform: 'rotate(' + angleA + 'deg)', - top: parseInt(boxSize / 2) + 'px', - left: parseInt(boxSize / 2) + 'px' - }; - } - }, { - key: 'renderLine', - value: function renderLine(mark, markNum) { - var marks = this.props.data; - - return _react2['default'].createElement( - 'div', - null, - _react2['default'].createElement('div', { className: 'line', style: this.calculateLineOptions(mark.value, marks[markNum + 1].value) }), - _react2['default'].createElement( - 'div', - { className: 'tooltiptext' }, - _react2['default'].createElement( - 'div', - null, - mark.value - ), - _react2['default'].createElement( - 'div', - null, - mark.title - ) - ) - ); - } - }, { - key: 'renderRow', - value: function renderRow(mark, markNum) { - var _this = this; - - var _props = this.props; - var _props$data = _props.data; - var marks = _props$data === undefined ? [] : _props$data; - var _props$height = _props.height; - var height = _props$height === undefined ? 50 : _props$height; - var _props$boxSize2 = _props.boxSize; - var boxSize = _props$boxSize2 === undefined ? 20 : _props$boxSize2; - var _props$line = _props.line; - var line = _props$line === undefined ? false : _props$line; - - var rowStyle = { - width: boxSize + 'px', - height: boxSize + 'px' - }; - var row = Array(height).fill().map(function (item, i) { - return { value: i }; - }); - - return _react2['default'].createElement( - 'div', - null, - row.map(function (i) { - var markClass = null; - - if (height - mark.value > i.value) markClass = "mark empty"; - if (height - mark.value == i.value) markClass = "mark"; - if (height - mark.value < i.value) markClass = "mark painted"; - - return _react2['default'].createElement( - 'div', - { key: i.value, style: rowStyle, className: markClass }, - height - mark.value == i.value && markNum < marks.length - 1 && line ? _this.renderLine(mark, markNum) : null - ); - }) - ); - } - }, { - key: 'render', - value: function render() { - var _this2 = this; - - var _props2 = this.props; - var marks = _props2.data; - var _props2$theme = _props2.theme; - var theme = _props2$theme === undefined ? 'default' : _props2$theme; - - var rulerClass = 'ruler-container ' + theme; - - return _react2['default'].createElement( - 'div', - { className: rulerClass }, - marks.map(function (mark, markNum) { - return _react2['default'].createElement( - 'div', - { className: 'ruler-row', key: markNum }, - _this2.renderRow(mark, markNum) - ); - }) - ); - } - }]); - - return Chartify; - })(_react.Component); - - exports['default'] = Chartify; - module.exports = exports['default']; - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - var _Object$getOwnPropertyDescriptor = __webpack_require__(2)["default"]; - - exports["default"] = function get(_x, _x2, _x3) { - var _again = true; - - _function: while (_again) { - var object = _x, - property = _x2, - receiver = _x3; - _again = false; - if (object === null) object = Function.prototype; - - var desc = _Object$getOwnPropertyDescriptor(object, property); - - if (desc === undefined) { - var parent = Object.getPrototypeOf(object); - - if (parent === null) { - return undefined; - } else { - _x = parent; - _x2 = property; - _x3 = receiver; - _again = true; - desc = parent = undefined; - continue _function; - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - - if (getter === undefined) { - return undefined; - } - - return getter.call(receiver); - } - } - }; - - exports.__esModule = true; - -/***/ }, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(3), __esModule: true }; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(4); - __webpack_require__(5); - module.exports = function getOwnPropertyDescriptor(it, key){ - return $.getDesc(it, key); - }; - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - - var $Object = Object; - module.exports = { - create: $Object.create, - getProto: $Object.getPrototypeOf, - isEnum: {}.propertyIsEnumerable, - getDesc: $Object.getOwnPropertyDescriptor, - setDesc: $Object.defineProperty, - setDescs: $Object.defineProperties, - getKeys: $Object.keys, - getNames: $Object.getOwnPropertyNames, - getSymbols: $Object.getOwnPropertySymbols, - each: [].forEach - }; - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) - var toIObject = __webpack_require__(6); - - __webpack_require__(10)('getOwnPropertyDescriptor', function($getOwnPropertyDescriptor){ - return function getOwnPropertyDescriptor(it, key){ - return $getOwnPropertyDescriptor(toIObject(it), key); - }; - }); - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - - // to indexed object, toObject with fallback for non-array-like ES3 strings - var IObject = __webpack_require__(7) - , defined = __webpack_require__(9); - module.exports = function(it){ - return IObject(defined(it)); - }; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - // fallback for non-array-like ES3 and non-enumerable old V8 strings - var cof = __webpack_require__(8); - module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); - }; - -/***/ }, -/* 8 */ -/***/ function(module, exports) { - - var toString = {}.toString; - - module.exports = function(it){ - return toString.call(it).slice(8, -1); - }; - -/***/ }, -/* 9 */ -/***/ function(module, exports) { - - // 7.2.1 RequireObjectCoercible(argument) - module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; - }; - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - - // most Object methods by ES6 should accept primitives - var $export = __webpack_require__(11) - , core = __webpack_require__(13) - , fails = __webpack_require__(16); - module.exports = function(KEY, exec){ - var fn = (core.Object || {})[KEY] || Object[KEY] - , exp = {}; - exp[KEY] = exec(fn); - $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); - }; - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - var global = __webpack_require__(12) - , core = __webpack_require__(13) - , ctx = __webpack_require__(14) - , PROTOTYPE = 'prototype'; - - var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , IS_WRAP = type & $export.W - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] - , key, own, out; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && key in target; - if(own && key in exports)continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function(C){ - var F = function(param){ - return this instanceof C ? new C(param) : C(param); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; - } - }; - // type bitmap - $export.F = 1; // forced - $export.G = 2; // global - $export.S = 4; // static - $export.P = 8; // proto - $export.B = 16; // bind - $export.W = 32; // wrap - module.exports = $export; - -/***/ }, -/* 12 */ -/***/ function(module, exports) { - - // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 - var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); - if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }, -/* 13 */ -/***/ function(module, exports) { - - var core = module.exports = {version: '1.2.6'}; - if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - // optional / simple context binding - var aFunction = __webpack_require__(15); - module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; - }; - -/***/ }, -/* 15 */ -/***/ function(module, exports) { - - module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; - }; - -/***/ }, -/* 16 */ -/***/ function(module, exports) { - - module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } - }; - -/***/ }, -/* 17 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - var _Object$create = __webpack_require__(18)["default"]; - - var _Object$setPrototypeOf = __webpack_require__(20)["default"]; - - exports["default"] = function (subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = _Object$create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) _Object$setPrototypeOf ? _Object$setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - }; - - exports.__esModule = true; - -/***/ }, -/* 18 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(19), __esModule: true }; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(4); - module.exports = function create(P, D){ - return $.create(P, D); - }; - -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(21), __esModule: true }; - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { - - __webpack_require__(22); - module.exports = __webpack_require__(13).Object.setPrototypeOf; - -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { - - // 19.1.3.19 Object.setPrototypeOf(O, proto) - var $export = __webpack_require__(11); - $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(23).set}); - -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { - - // Works with __proto__ only. Old v8 can't work with null proto objects. - /* eslint-disable no-proto */ - var getDesc = __webpack_require__(4).getDesc - , isObject = __webpack_require__(24) - , anObject = __webpack_require__(25); - var check = function(O, proto){ - anObject(O); - if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); - }; - module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line - function(test, buggy, set){ - try { - set = __webpack_require__(14)(Function.call, getDesc(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch(e){ buggy = true; } - return function setPrototypeOf(O, proto){ - check(O, proto); - if(buggy)O.__proto__ = proto; - else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check - }; - -/***/ }, -/* 24 */ -/***/ function(module, exports) { - - module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; - }; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - - var isObject = __webpack_require__(24); - module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; - }; - -/***/ }, -/* 26 */ -/***/ function(module, exports, __webpack_require__) { - - "use strict"; - - var _Object$defineProperty = __webpack_require__(27)["default"]; - - exports["default"] = (function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - - _Object$defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - })(); - - exports.__esModule = true; - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(28), __esModule: true }; - -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { - - var $ = __webpack_require__(4); - module.exports = function defineProperty(it, key, desc){ - return $.setDesc(it, key, desc); - }; - -/***/ }, -/* 29 */ -/***/ function(module, exports) { - - "use strict"; - - exports["default"] = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - }; - - exports.__esModule = true; - -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(31), __esModule: true }; - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - - __webpack_require__(32); - module.exports = __webpack_require__(13).Math.hypot; - -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - - // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) - var $export = __webpack_require__(11) - , abs = Math.abs; - - $export($export.S, 'Math', { - hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars - var sum = 0 - , i = 0 - , $$ = arguments - , $$len = $$.length - , larg = 0 - , arg, div; - while(i < $$len){ - arg = abs($$[i++]); - if(larg < arg){ - div = larg / arg; - sum = sum * div * div + 1; - larg = arg; - } else if(arg > 0){ - div = arg / larg; - sum += div * div; - } else sum += arg; - } - return larg === Infinity ? Infinity : larg * Math.sqrt(sum); - } - }); - -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = { "default": __webpack_require__(34), __esModule: true }; - -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { - - __webpack_require__(35); - module.exports = __webpack_require__(13).Math.fround; - -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - - // 20.2.2.16 Math.fround(x) - var $export = __webpack_require__(11) - , sign = __webpack_require__(36) - , pow = Math.pow - , EPSILON = pow(2, -52) - , EPSILON32 = pow(2, -23) - , MAX32 = pow(2, 127) * (2 - EPSILON32) - , MIN32 = pow(2, -126); - - var roundTiesToEven = function(n){ - return n + 1 / EPSILON - 1 / EPSILON; - }; - - - $export($export.S, 'Math', { - fround: function fround(x){ - var $abs = Math.abs(x) - , $sign = sign(x) - , a, result; - if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; - a = (1 + EPSILON32 / EPSILON) * $abs; - result = a - (a - $abs); - if(result > MAX32 || result != result)return $sign * Infinity; - return $sign * result; - } - }); - -/***/ }, -/* 36 */ -/***/ function(module, exports) { - - // 20.2.2.28 Math.sign(x) - module.exports = Math.sign || function sign(x){ - return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; - }; - -/***/ }, -/* 37 */ -/***/ function(module, exports) { - - "use strict"; - - exports["default"] = function (obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; - }; - - exports.__esModule = true; - -/***/ }, -/* 38 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_38__; - -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a