├── .DS_Store ├── .babelrc ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── assets └── record.gif ├── build ├── rrpm.js ├── rrpm.js.map ├── rrpm.module.js └── rrpm.module.js.map ├── examples ├── .babelrc ├── bundle │ ├── index.bundle.js │ ├── popup_table.bundle.js │ └── popup_text.bundle.js ├── css │ └── style.css ├── index.html ├── package-lock.json ├── package.json ├── popup_table.html ├── popup_text.html ├── src │ ├── .babelrc │ ├── index.js │ ├── popup_table.js │ └── popup_text.js └── webpack.config.babel.js ├── package-lock.json ├── package.json ├── rollup.config.babel.js ├── src ├── .babelrc ├── PopupMenu.js ├── PopupMenu.scss ├── PopupTable.js ├── PopupTable.scss ├── PopupText.js └── index.js └── test ├── .babelrc ├── PopupMenu.test.js ├── PopupTable.test.js ├── PopupText.test.js └── __snapshots__ ├── PopupMenu.test.js.snap ├── PopupTable.test.js.snap └── PopupText.test.js.snap /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sasha240100/react-rectangle-popup-menu/3e2a14cf3790bbbebe414262ac523cd495f7974e/.DS_Store -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", {"modules": false}] 4 | ], 5 | "env": { 6 | "test": { 7 | "presets": ["es2015", "react"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "7" 4 | 5 | install: 6 | - npm install 7 | 8 | script: 9 | - npm run build 10 | 11 | deploy: 12 | provider: pages 13 | skip-cleanup: true 14 | github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure 15 | keep-history: true 16 | on: 17 | branch: master 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Alexander Buzin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-rectangle-popup-menu 2 | [![](https://img.shields.io/travis/sasha240100/react-rectangle-popup-menu.svg)](https://travis-ci.org/sasha240100/react-rectangle-popup-menu) 3 | [![](https://badge.fury.io/js/react-rectangle-popup-menu.svg)](https://www.npmjs.com/package/react-rectangle-popup-menu) 4 | 5 | [![](https://nodei.co/npm/react-rectangle-popup-menu.png)](https://www.npmjs.com/package/react-rectangle-popup-menu) 6 | 7 | React rectangle popup menu library. [Demo](https://sasha240100.github.io/react-rectangle-popup-menu/examples/) 8 | 9 | ![](./assets/record.gif) 10 | 11 | ### `` 12 | 13 | ```js 14 | class Popup { 15 | render() { 16 | 17 | // Content 18 | 19 | } 20 | } 21 | ``` 22 | 23 | #### Parameters for `` 24 | 25 | ```js 26 | { 27 | width: ?number = 200, 28 | height: ?(number | 'auto') = 'auto', // If auto it's minimized to rows size 29 | direction: ?('top' | 'bottom' | 'left' | 'right') = 'top', 30 | button: ReactNode 31 | } 32 | ``` 33 | 34 | ### `` 35 | 36 | ```js 37 | import FontAwesome from 'react-fontawesome'; 38 | 39 | const button = (); 40 | 41 | class Popup { 42 | render() { 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | } 61 | } 62 | ``` 63 | 64 | #### Parameters for `` 65 | 66 | ```js 67 | { 68 | // Items per row (used to generate normal width of placeholder) 69 | rowItems: ?number = 1 70 | } 71 | ``` 72 | 73 | ### `` 74 | ```js 75 | class Popup { 76 | render() { 77 | 78 | Some text 79 | 80 | } 81 | } 82 | ``` 83 | -------------------------------------------------------------------------------- /assets/record.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sasha240100/react-rectangle-popup-menu/3e2a14cf3790bbbebe414262ac523cd495f7974e/assets/record.gif -------------------------------------------------------------------------------- /build/rrpm.js: -------------------------------------------------------------------------------- 1 | (function (global, factory) { 2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) : 3 | typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) : 4 | (factory((global.ReactRectanglePopupMenu = {}),global.React,global.ReactDOM)); 5 | }(this, (function (exports,React,reactDom) { 'use strict'; 6 | 7 | function __$$styleInject(css, ref) { 8 | if ( ref === void 0 ) ref = {}; 9 | var insertAt = ref.insertAt; 10 | 11 | if (!css || typeof document === 'undefined') { return; } 12 | 13 | var head = document.head || document.getElementsByTagName('head')[0]; 14 | var style = document.createElement('style'); 15 | style.type = 'text/css'; 16 | 17 | if (insertAt === 'top') { 18 | if (head.firstChild) { 19 | head.insertBefore(style, head.firstChild); 20 | } else { 21 | head.appendChild(style); 22 | } 23 | } else { 24 | head.appendChild(style); 25 | } 26 | 27 | if (style.styleSheet) { 28 | style.styleSheet.cssText = css; 29 | } else { 30 | style.appendChild(document.createTextNode(css)); 31 | } 32 | } 33 | 34 | var React__default = 'default' in React ? React['default'] : React; 35 | 36 | function createCommonjsModule(fn, module) { 37 | return module = { exports: {} }, fn(module, module.exports), module.exports; 38 | } 39 | 40 | /** 41 | * Copyright (c) 2013-present, Facebook, Inc. 42 | * 43 | * This source code is licensed under the MIT license found in the 44 | * LICENSE file in the root directory of this source tree. 45 | * 46 | * 47 | */ 48 | 49 | function makeEmptyFunction(arg) { 50 | return function () { 51 | return arg; 52 | }; 53 | } 54 | 55 | /** 56 | * This function accepts and discards inputs; it has no side effects. This is 57 | * primarily useful idiomatically for overridable function endpoints which 58 | * always need to be callable, since JS lacks a null-call idiom ala Cocoa. 59 | */ 60 | var emptyFunction = function emptyFunction() {}; 61 | 62 | emptyFunction.thatReturns = makeEmptyFunction; 63 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false); 64 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true); 65 | emptyFunction.thatReturnsNull = makeEmptyFunction(null); 66 | emptyFunction.thatReturnsThis = function () { 67 | return this; 68 | }; 69 | emptyFunction.thatReturnsArgument = function (arg) { 70 | return arg; 71 | }; 72 | 73 | var emptyFunction_1 = emptyFunction; 74 | 75 | /** 76 | * Copyright (c) 2013-present, Facebook, Inc. 77 | * 78 | * This source code is licensed under the MIT license found in the 79 | * LICENSE file in the root directory of this source tree. 80 | * 81 | */ 82 | 83 | /** 84 | * Use invariant() to assert state which your program assumes to be true. 85 | * 86 | * Provide sprintf-style format (only %s is supported) and arguments 87 | * to provide information about what broke and what you were 88 | * expecting. 89 | * 90 | * The invariant message will be stripped in production, but the invariant 91 | * will remain to ensure logic does not differ in production. 92 | */ 93 | 94 | var validateFormat = function validateFormat(format) {}; 95 | 96 | { 97 | validateFormat = function validateFormat(format) { 98 | if (format === undefined) { 99 | throw new Error('invariant requires an error message argument'); 100 | } 101 | }; 102 | } 103 | 104 | function invariant(condition, format, a, b, c, d, e, f) { 105 | validateFormat(format); 106 | 107 | if (!condition) { 108 | var error; 109 | if (format === undefined) { 110 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); 111 | } else { 112 | var args = [a, b, c, d, e, f]; 113 | var argIndex = 0; 114 | error = new Error(format.replace(/%s/g, function () { 115 | return args[argIndex++]; 116 | })); 117 | error.name = 'Invariant Violation'; 118 | } 119 | 120 | error.framesToPop = 1; // we don't care about invariant's own frame 121 | throw error; 122 | } 123 | } 124 | 125 | var invariant_1 = invariant; 126 | 127 | /** 128 | * Similar to invariant but only logs a warning if the condition is not met. 129 | * This can be used to log issues in development environments in critical 130 | * paths. Removing the logging code for production environments will keep the 131 | * same logic and follow the same code paths. 132 | */ 133 | 134 | var warning = emptyFunction_1; 135 | 136 | { 137 | var printWarning = function printWarning(format) { 138 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 139 | args[_key - 1] = arguments[_key]; 140 | } 141 | 142 | var argIndex = 0; 143 | var message = 'Warning: ' + format.replace(/%s/g, function () { 144 | return args[argIndex++]; 145 | }); 146 | if (typeof console !== 'undefined') { 147 | console.error(message); 148 | } 149 | try { 150 | // --- Welcome to debugging React --- 151 | // This error was thrown as a convenience so that you can use this stack 152 | // to find the callsite that caused this warning to fire. 153 | throw new Error(message); 154 | } catch (x) {} 155 | }; 156 | 157 | warning = function warning(condition, format) { 158 | if (format === undefined) { 159 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); 160 | } 161 | 162 | if (format.indexOf('Failed Composite propType: ') === 0) { 163 | return; // Ignore CompositeComponent proptype check. 164 | } 165 | 166 | if (!condition) { 167 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { 168 | args[_key2 - 2] = arguments[_key2]; 169 | } 170 | 171 | printWarning.apply(undefined, [format].concat(args)); 172 | } 173 | }; 174 | } 175 | 176 | var warning_1 = warning; 177 | 178 | /* 179 | object-assign 180 | (c) Sindre Sorhus 181 | @license MIT 182 | */ 183 | /* eslint-disable no-unused-vars */ 184 | var getOwnPropertySymbols = Object.getOwnPropertySymbols; 185 | var hasOwnProperty = Object.prototype.hasOwnProperty; 186 | var propIsEnumerable = Object.prototype.propertyIsEnumerable; 187 | 188 | function toObject(val) { 189 | if (val === null || val === undefined) { 190 | throw new TypeError('Object.assign cannot be called with null or undefined'); 191 | } 192 | 193 | return Object(val); 194 | } 195 | 196 | function shouldUseNative() { 197 | try { 198 | if (!Object.assign) { 199 | return false; 200 | } 201 | 202 | // Detect buggy property enumeration order in older V8 versions. 203 | 204 | // https://bugs.chromium.org/p/v8/issues/detail?id=4118 205 | var test1 = new String('abc'); // eslint-disable-line no-new-wrappers 206 | test1[5] = 'de'; 207 | if (Object.getOwnPropertyNames(test1)[0] === '5') { 208 | return false; 209 | } 210 | 211 | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 212 | var test2 = {}; 213 | for (var i = 0; i < 10; i++) { 214 | test2['_' + String.fromCharCode(i)] = i; 215 | } 216 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) { 217 | return test2[n]; 218 | }); 219 | if (order2.join('') !== '0123456789') { 220 | return false; 221 | } 222 | 223 | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 224 | var test3 = {}; 225 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { 226 | test3[letter] = letter; 227 | }); 228 | if (Object.keys(Object.assign({}, test3)).join('') !== 229 | 'abcdefghijklmnopqrst') { 230 | return false; 231 | } 232 | 233 | return true; 234 | } catch (err) { 235 | // We don't expect any of the above to throw, but better to be safe. 236 | return false; 237 | } 238 | } 239 | 240 | var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { 241 | var from; 242 | var to = toObject(target); 243 | var symbols; 244 | 245 | for (var s = 1; s < arguments.length; s++) { 246 | from = Object(arguments[s]); 247 | 248 | for (var key in from) { 249 | if (hasOwnProperty.call(from, key)) { 250 | to[key] = from[key]; 251 | } 252 | } 253 | 254 | if (getOwnPropertySymbols) { 255 | symbols = getOwnPropertySymbols(from); 256 | for (var i = 0; i < symbols.length; i++) { 257 | if (propIsEnumerable.call(from, symbols[i])) { 258 | to[symbols[i]] = from[symbols[i]]; 259 | } 260 | } 261 | } 262 | } 263 | 264 | return to; 265 | }; 266 | 267 | /** 268 | * Copyright (c) 2013-present, Facebook, Inc. 269 | * 270 | * This source code is licensed under the MIT license found in the 271 | * LICENSE file in the root directory of this source tree. 272 | */ 273 | 274 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 275 | 276 | var ReactPropTypesSecret_1 = ReactPropTypesSecret; 277 | 278 | { 279 | var invariant$1 = invariant_1; 280 | var warning$1 = warning_1; 281 | var ReactPropTypesSecret$1 = ReactPropTypesSecret_1; 282 | var loggedTypeFailures = {}; 283 | } 284 | 285 | /** 286 | * Assert that the values match with the type specs. 287 | * Error messages are memorized and will only be shown once. 288 | * 289 | * @param {object} typeSpecs Map of name to a ReactPropType 290 | * @param {object} values Runtime values that need to be type-checked 291 | * @param {string} location e.g. "prop", "context", "child context" 292 | * @param {string} componentName Name of the component for error messages. 293 | * @param {?Function} getStack Returns the component stack. 294 | * @private 295 | */ 296 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) { 297 | { 298 | for (var typeSpecName in typeSpecs) { 299 | if (typeSpecs.hasOwnProperty(typeSpecName)) { 300 | var error; 301 | // Prop type validation may throw. In case they do, we don't want to 302 | // fail the render phase where it didn't fail before. So we log it. 303 | // After these have been cleaned up, we'll let them throw. 304 | try { 305 | // This is intentionally an invariant that gets caught. It's the same 306 | // behavior as without this statement except with a better message. 307 | invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]); 308 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1); 309 | } catch (ex) { 310 | error = ex; 311 | } 312 | warning$1(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); 313 | if (error instanceof Error && !(error.message in loggedTypeFailures)) { 314 | // Only monitor this failure once because there tends to be a lot of the 315 | // same error. 316 | loggedTypeFailures[error.message] = true; 317 | 318 | var stack = getStack ? getStack() : ''; 319 | 320 | warning$1(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); 321 | } 322 | } 323 | } 324 | } 325 | } 326 | 327 | var checkPropTypes_1 = checkPropTypes; 328 | 329 | var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) { 330 | /* global Symbol */ 331 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 332 | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 333 | 334 | /** 335 | * Returns the iterator method function contained on the iterable object. 336 | * 337 | * Be sure to invoke the function with the iterable as context: 338 | * 339 | * var iteratorFn = getIteratorFn(myIterable); 340 | * if (iteratorFn) { 341 | * var iterator = iteratorFn.call(myIterable); 342 | * ... 343 | * } 344 | * 345 | * @param {?object} maybeIterable 346 | * @return {?function} 347 | */ 348 | function getIteratorFn(maybeIterable) { 349 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); 350 | if (typeof iteratorFn === 'function') { 351 | return iteratorFn; 352 | } 353 | } 354 | 355 | /** 356 | * Collection of methods that allow declaration and validation of props that are 357 | * supplied to React components. Example usage: 358 | * 359 | * var Props = require('ReactPropTypes'); 360 | * var MyArticle = React.createClass({ 361 | * propTypes: { 362 | * // An optional string prop named "description". 363 | * description: Props.string, 364 | * 365 | * // A required enum prop named "category". 366 | * category: Props.oneOf(['News','Photos']).isRequired, 367 | * 368 | * // A prop named "dialog" that requires an instance of Dialog. 369 | * dialog: Props.instanceOf(Dialog).isRequired 370 | * }, 371 | * render: function() { ... } 372 | * }); 373 | * 374 | * A more formal specification of how these methods are used: 375 | * 376 | * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) 377 | * decl := ReactPropTypes.{type}(.isRequired)? 378 | * 379 | * Each and every declaration produces a function with the same signature. This 380 | * allows the creation of custom validation functions. For example: 381 | * 382 | * var MyLink = React.createClass({ 383 | * propTypes: { 384 | * // An optional string or URI prop named "href". 385 | * href: function(props, propName, componentName) { 386 | * var propValue = props[propName]; 387 | * if (propValue != null && typeof propValue !== 'string' && 388 | * !(propValue instanceof URI)) { 389 | * return new Error( 390 | * 'Expected a string or an URI for ' + propName + ' in ' + 391 | * componentName 392 | * ); 393 | * } 394 | * } 395 | * }, 396 | * render: function() {...} 397 | * }); 398 | * 399 | * @internal 400 | */ 401 | 402 | var ANONYMOUS = '<>'; 403 | 404 | // Important! 405 | // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. 406 | var ReactPropTypes = { 407 | array: createPrimitiveTypeChecker('array'), 408 | bool: createPrimitiveTypeChecker('boolean'), 409 | func: createPrimitiveTypeChecker('function'), 410 | number: createPrimitiveTypeChecker('number'), 411 | object: createPrimitiveTypeChecker('object'), 412 | string: createPrimitiveTypeChecker('string'), 413 | symbol: createPrimitiveTypeChecker('symbol'), 414 | 415 | any: createAnyTypeChecker(), 416 | arrayOf: createArrayOfTypeChecker, 417 | element: createElementTypeChecker(), 418 | instanceOf: createInstanceTypeChecker, 419 | node: createNodeChecker(), 420 | objectOf: createObjectOfTypeChecker, 421 | oneOf: createEnumTypeChecker, 422 | oneOfType: createUnionTypeChecker, 423 | shape: createShapeTypeChecker, 424 | exact: createStrictShapeTypeChecker, 425 | }; 426 | 427 | /** 428 | * inlined Object.is polyfill to avoid requiring consumers ship their own 429 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 430 | */ 431 | /*eslint-disable no-self-compare*/ 432 | function is(x, y) { 433 | // SameValue algorithm 434 | if (x === y) { 435 | // Steps 1-5, 7-10 436 | // Steps 6.b-6.e: +0 != -0 437 | return x !== 0 || 1 / x === 1 / y; 438 | } else { 439 | // Step 6.a: NaN == NaN 440 | return x !== x && y !== y; 441 | } 442 | } 443 | /*eslint-enable no-self-compare*/ 444 | 445 | /** 446 | * We use an Error-like object for backward compatibility as people may call 447 | * PropTypes directly and inspect their output. However, we don't use real 448 | * Errors anymore. We don't inspect their stack anyway, and creating them 449 | * is prohibitively expensive if they are created too often, such as what 450 | * happens in oneOfType() for any type before the one that matched. 451 | */ 452 | function PropTypeError(message) { 453 | this.message = message; 454 | this.stack = ''; 455 | } 456 | // Make `instanceof Error` still work for returned errors. 457 | PropTypeError.prototype = Error.prototype; 458 | 459 | function createChainableTypeChecker(validate) { 460 | { 461 | var manualPropTypeCallCache = {}; 462 | var manualPropTypeWarningCount = 0; 463 | } 464 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { 465 | componentName = componentName || ANONYMOUS; 466 | propFullName = propFullName || propName; 467 | 468 | if (secret !== ReactPropTypesSecret_1) { 469 | if (throwOnDirectAccess) { 470 | // New behavior only for users of `prop-types` package 471 | invariant_1( 472 | false, 473 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 474 | 'Use `PropTypes.checkPropTypes()` to call them. ' + 475 | 'Read more at http://fb.me/use-check-prop-types' 476 | ); 477 | } else if ("development" !== 'production' && typeof console !== 'undefined') { 478 | // Old behavior for people using React.PropTypes 479 | var cacheKey = componentName + ':' + propName; 480 | if ( 481 | !manualPropTypeCallCache[cacheKey] && 482 | // Avoid spamming the console because they are often not actionable except for lib authors 483 | manualPropTypeWarningCount < 3 484 | ) { 485 | warning_1( 486 | false, 487 | 'You are manually calling a React.PropTypes validation ' + 488 | 'function for the `%s` prop on `%s`. This is deprecated ' + 489 | 'and will throw in the standalone `prop-types` package. ' + 490 | 'You may be seeing this warning due to a third-party PropTypes ' + 491 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', 492 | propFullName, 493 | componentName 494 | ); 495 | manualPropTypeCallCache[cacheKey] = true; 496 | manualPropTypeWarningCount++; 497 | } 498 | } 499 | } 500 | if (props[propName] == null) { 501 | if (isRequired) { 502 | if (props[propName] === null) { 503 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); 504 | } 505 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); 506 | } 507 | return null; 508 | } else { 509 | return validate(props, propName, componentName, location, propFullName); 510 | } 511 | } 512 | 513 | var chainedCheckType = checkType.bind(null, false); 514 | chainedCheckType.isRequired = checkType.bind(null, true); 515 | 516 | return chainedCheckType; 517 | } 518 | 519 | function createPrimitiveTypeChecker(expectedType) { 520 | function validate(props, propName, componentName, location, propFullName, secret) { 521 | var propValue = props[propName]; 522 | var propType = getPropType(propValue); 523 | if (propType !== expectedType) { 524 | // `propValue` being instance of, say, date/regexp, pass the 'object' 525 | // check, but we can offer a more precise error message here rather than 526 | // 'of type `object`'. 527 | var preciseType = getPreciseType(propValue); 528 | 529 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); 530 | } 531 | return null; 532 | } 533 | return createChainableTypeChecker(validate); 534 | } 535 | 536 | function createAnyTypeChecker() { 537 | return createChainableTypeChecker(emptyFunction_1.thatReturnsNull); 538 | } 539 | 540 | function createArrayOfTypeChecker(typeChecker) { 541 | function validate(props, propName, componentName, location, propFullName) { 542 | if (typeof typeChecker !== 'function') { 543 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); 544 | } 545 | var propValue = props[propName]; 546 | if (!Array.isArray(propValue)) { 547 | var propType = getPropType(propValue); 548 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); 549 | } 550 | for (var i = 0; i < propValue.length; i++) { 551 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1); 552 | if (error instanceof Error) { 553 | return error; 554 | } 555 | } 556 | return null; 557 | } 558 | return createChainableTypeChecker(validate); 559 | } 560 | 561 | function createElementTypeChecker() { 562 | function validate(props, propName, componentName, location, propFullName) { 563 | var propValue = props[propName]; 564 | if (!isValidElement(propValue)) { 565 | var propType = getPropType(propValue); 566 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); 567 | } 568 | return null; 569 | } 570 | return createChainableTypeChecker(validate); 571 | } 572 | 573 | function createInstanceTypeChecker(expectedClass) { 574 | function validate(props, propName, componentName, location, propFullName) { 575 | if (!(props[propName] instanceof expectedClass)) { 576 | var expectedClassName = expectedClass.name || ANONYMOUS; 577 | var actualClassName = getClassName(props[propName]); 578 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); 579 | } 580 | return null; 581 | } 582 | return createChainableTypeChecker(validate); 583 | } 584 | 585 | function createEnumTypeChecker(expectedValues) { 586 | if (!Array.isArray(expectedValues)) { 587 | warning_1(false, 'Invalid argument supplied to oneOf, expected an instance of array.'); 588 | return emptyFunction_1.thatReturnsNull; 589 | } 590 | 591 | function validate(props, propName, componentName, location, propFullName) { 592 | var propValue = props[propName]; 593 | for (var i = 0; i < expectedValues.length; i++) { 594 | if (is(propValue, expectedValues[i])) { 595 | return null; 596 | } 597 | } 598 | 599 | var valuesString = JSON.stringify(expectedValues); 600 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); 601 | } 602 | return createChainableTypeChecker(validate); 603 | } 604 | 605 | function createObjectOfTypeChecker(typeChecker) { 606 | function validate(props, propName, componentName, location, propFullName) { 607 | if (typeof typeChecker !== 'function') { 608 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); 609 | } 610 | var propValue = props[propName]; 611 | var propType = getPropType(propValue); 612 | if (propType !== 'object') { 613 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); 614 | } 615 | for (var key in propValue) { 616 | if (propValue.hasOwnProperty(key)) { 617 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); 618 | if (error instanceof Error) { 619 | return error; 620 | } 621 | } 622 | } 623 | return null; 624 | } 625 | return createChainableTypeChecker(validate); 626 | } 627 | 628 | function createUnionTypeChecker(arrayOfTypeCheckers) { 629 | if (!Array.isArray(arrayOfTypeCheckers)) { 630 | warning_1(false, 'Invalid argument supplied to oneOfType, expected an instance of array.'); 631 | return emptyFunction_1.thatReturnsNull; 632 | } 633 | 634 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 635 | var checker = arrayOfTypeCheckers[i]; 636 | if (typeof checker !== 'function') { 637 | warning_1( 638 | false, 639 | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 640 | 'received %s at index %s.', 641 | getPostfixForTypeWarning(checker), 642 | i 643 | ); 644 | return emptyFunction_1.thatReturnsNull; 645 | } 646 | } 647 | 648 | function validate(props, propName, componentName, location, propFullName) { 649 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 650 | var checker = arrayOfTypeCheckers[i]; 651 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) { 652 | return null; 653 | } 654 | } 655 | 656 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); 657 | } 658 | return createChainableTypeChecker(validate); 659 | } 660 | 661 | function createNodeChecker() { 662 | function validate(props, propName, componentName, location, propFullName) { 663 | if (!isNode(props[propName])) { 664 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); 665 | } 666 | return null; 667 | } 668 | return createChainableTypeChecker(validate); 669 | } 670 | 671 | function createShapeTypeChecker(shapeTypes) { 672 | function validate(props, propName, componentName, location, propFullName) { 673 | var propValue = props[propName]; 674 | var propType = getPropType(propValue); 675 | if (propType !== 'object') { 676 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 677 | } 678 | for (var key in shapeTypes) { 679 | var checker = shapeTypes[key]; 680 | if (!checker) { 681 | continue; 682 | } 683 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); 684 | if (error) { 685 | return error; 686 | } 687 | } 688 | return null; 689 | } 690 | return createChainableTypeChecker(validate); 691 | } 692 | 693 | function createStrictShapeTypeChecker(shapeTypes) { 694 | function validate(props, propName, componentName, location, propFullName) { 695 | var propValue = props[propName]; 696 | var propType = getPropType(propValue); 697 | if (propType !== 'object') { 698 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 699 | } 700 | // We need to check all keys in case some are required but missing from 701 | // props. 702 | var allKeys = objectAssign({}, props[propName], shapeTypes); 703 | for (var key in allKeys) { 704 | var checker = shapeTypes[key]; 705 | if (!checker) { 706 | return new PropTypeError( 707 | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + 708 | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + 709 | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') 710 | ); 711 | } 712 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); 713 | if (error) { 714 | return error; 715 | } 716 | } 717 | return null; 718 | } 719 | 720 | return createChainableTypeChecker(validate); 721 | } 722 | 723 | function isNode(propValue) { 724 | switch (typeof propValue) { 725 | case 'number': 726 | case 'string': 727 | case 'undefined': 728 | return true; 729 | case 'boolean': 730 | return !propValue; 731 | case 'object': 732 | if (Array.isArray(propValue)) { 733 | return propValue.every(isNode); 734 | } 735 | if (propValue === null || isValidElement(propValue)) { 736 | return true; 737 | } 738 | 739 | var iteratorFn = getIteratorFn(propValue); 740 | if (iteratorFn) { 741 | var iterator = iteratorFn.call(propValue); 742 | var step; 743 | if (iteratorFn !== propValue.entries) { 744 | while (!(step = iterator.next()).done) { 745 | if (!isNode(step.value)) { 746 | return false; 747 | } 748 | } 749 | } else { 750 | // Iterator will provide entry [k,v] tuples rather than values. 751 | while (!(step = iterator.next()).done) { 752 | var entry = step.value; 753 | if (entry) { 754 | if (!isNode(entry[1])) { 755 | return false; 756 | } 757 | } 758 | } 759 | } 760 | } else { 761 | return false; 762 | } 763 | 764 | return true; 765 | default: 766 | return false; 767 | } 768 | } 769 | 770 | function isSymbol(propType, propValue) { 771 | // Native Symbol. 772 | if (propType === 'symbol') { 773 | return true; 774 | } 775 | 776 | // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' 777 | if (propValue['@@toStringTag'] === 'Symbol') { 778 | return true; 779 | } 780 | 781 | // Fallback for non-spec compliant Symbols which are polyfilled. 782 | if (typeof Symbol === 'function' && propValue instanceof Symbol) { 783 | return true; 784 | } 785 | 786 | return false; 787 | } 788 | 789 | // Equivalent of `typeof` but with special handling for array and regexp. 790 | function getPropType(propValue) { 791 | var propType = typeof propValue; 792 | if (Array.isArray(propValue)) { 793 | return 'array'; 794 | } 795 | if (propValue instanceof RegExp) { 796 | // Old webkits (at least until Android 4.0) return 'function' rather than 797 | // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ 798 | // passes PropTypes.object. 799 | return 'object'; 800 | } 801 | if (isSymbol(propType, propValue)) { 802 | return 'symbol'; 803 | } 804 | return propType; 805 | } 806 | 807 | // This handles more types than `getPropType`. Only used for error messages. 808 | // See `createPrimitiveTypeChecker`. 809 | function getPreciseType(propValue) { 810 | if (typeof propValue === 'undefined' || propValue === null) { 811 | return '' + propValue; 812 | } 813 | var propType = getPropType(propValue); 814 | if (propType === 'object') { 815 | if (propValue instanceof Date) { 816 | return 'date'; 817 | } else if (propValue instanceof RegExp) { 818 | return 'regexp'; 819 | } 820 | } 821 | return propType; 822 | } 823 | 824 | // Returns a string that is postfixed to a warning about an invalid type. 825 | // For example, "undefined" or "of type array" 826 | function getPostfixForTypeWarning(value) { 827 | var type = getPreciseType(value); 828 | switch (type) { 829 | case 'array': 830 | case 'object': 831 | return 'an ' + type; 832 | case 'boolean': 833 | case 'date': 834 | case 'regexp': 835 | return 'a ' + type; 836 | default: 837 | return type; 838 | } 839 | } 840 | 841 | // Returns class name of the object, if any. 842 | function getClassName(propValue) { 843 | if (!propValue.constructor || !propValue.constructor.name) { 844 | return ANONYMOUS; 845 | } 846 | return propValue.constructor.name; 847 | } 848 | 849 | ReactPropTypes.checkPropTypes = checkPropTypes_1; 850 | ReactPropTypes.PropTypes = ReactPropTypes; 851 | 852 | return ReactPropTypes; 853 | }; 854 | 855 | var propTypes = createCommonjsModule(function (module) { 856 | /** 857 | * Copyright (c) 2013-present, Facebook, Inc. 858 | * 859 | * This source code is licensed under the MIT license found in the 860 | * LICENSE file in the root directory of this source tree. 861 | */ 862 | 863 | { 864 | var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && 865 | Symbol.for && 866 | Symbol.for('react.element')) || 867 | 0xeac7; 868 | 869 | var isValidElement = function(object) { 870 | return typeof object === 'object' && 871 | object !== null && 872 | object.$$typeof === REACT_ELEMENT_TYPE; 873 | }; 874 | 875 | // By explicitly using `prop-types` you are opting into new development behavior. 876 | // http://fb.me/prop-types-in-prod 877 | var throwOnDirectAccess = true; 878 | module.exports = factoryWithTypeCheckers(isValidElement, throwOnDirectAccess); 879 | } 880 | }); 881 | 882 | var classnames = createCommonjsModule(function (module) { 883 | /*! 884 | Copyright (c) 2016 Jed Watson. 885 | Licensed under the MIT License (MIT), see 886 | http://jedwatson.github.io/classnames 887 | */ 888 | /* global define */ 889 | 890 | (function () { 891 | 892 | var hasOwn = {}.hasOwnProperty; 893 | 894 | function classNames () { 895 | var classes = []; 896 | 897 | for (var i = 0; i < arguments.length; i++) { 898 | var arg = arguments[i]; 899 | if (!arg) continue; 900 | 901 | var argType = typeof arg; 902 | 903 | if (argType === 'string' || argType === 'number') { 904 | classes.push(arg); 905 | } else if (Array.isArray(arg)) { 906 | classes.push(classNames.apply(null, arg)); 907 | } else if (argType === 'object') { 908 | for (var key in arg) { 909 | if (hasOwn.call(arg, key) && arg[key]) { 910 | classes.push(key); 911 | } 912 | } 913 | } 914 | } 915 | 916 | return classes.join(' '); 917 | } 918 | 919 | if ('object' !== 'undefined' && module.exports) { 920 | module.exports = classNames; 921 | } else if (typeof undefined === 'function' && typeof undefined.amd === 'object' && undefined.amd) { 922 | // register as 'classnames', consistent with npm package name 923 | undefined('classnames', [], function () { 924 | return classNames; 925 | }); 926 | } else { 927 | window.classNames = classNames; 928 | } 929 | }()); 930 | }); 931 | 932 | var clone_1 = createCommonjsModule(function (module) { 933 | var clone = (function() { 934 | 935 | function _instanceof(obj, type) { 936 | return type != null && obj instanceof type; 937 | } 938 | 939 | var nativeMap; 940 | try { 941 | nativeMap = Map; 942 | } catch(_) { 943 | // maybe a reference error because no `Map`. Give it a dummy value that no 944 | // value will ever be an instanceof. 945 | nativeMap = function() {}; 946 | } 947 | 948 | var nativeSet; 949 | try { 950 | nativeSet = Set; 951 | } catch(_) { 952 | nativeSet = function() {}; 953 | } 954 | 955 | var nativePromise; 956 | try { 957 | nativePromise = Promise; 958 | } catch(_) { 959 | nativePromise = function() {}; 960 | } 961 | 962 | /** 963 | * Clones (copies) an Object using deep copying. 964 | * 965 | * This function supports circular references by default, but if you are certain 966 | * there are no circular references in your object, you can save some CPU time 967 | * by calling clone(obj, false). 968 | * 969 | * Caution: if `circular` is false and `parent` contains circular references, 970 | * your program may enter an infinite loop and crash. 971 | * 972 | * @param `parent` - the object to be cloned 973 | * @param `circular` - set to true if the object to be cloned may contain 974 | * circular references. (optional - true by default) 975 | * @param `depth` - set to a number if the object is only to be cloned to 976 | * a particular depth. (optional - defaults to Infinity) 977 | * @param `prototype` - sets the prototype to be used when cloning an object. 978 | * (optional - defaults to parent prototype). 979 | * @param `includeNonEnumerable` - set to true if the non-enumerable properties 980 | * should be cloned as well. Non-enumerable properties on the prototype 981 | * chain will be ignored. (optional - false by default) 982 | */ 983 | function clone(parent, circular, depth, prototype, includeNonEnumerable) { 984 | if (typeof circular === 'object') { 985 | depth = circular.depth; 986 | prototype = circular.prototype; 987 | includeNonEnumerable = circular.includeNonEnumerable; 988 | circular = circular.circular; 989 | } 990 | // maintain two arrays for circular references, where corresponding parents 991 | // and children have the same index 992 | var allParents = []; 993 | var allChildren = []; 994 | 995 | var useBuffer = typeof Buffer != 'undefined'; 996 | 997 | if (typeof circular == 'undefined') 998 | circular = true; 999 | 1000 | if (typeof depth == 'undefined') 1001 | depth = Infinity; 1002 | 1003 | // recurse this function so we don't reset allParents and allChildren 1004 | function _clone(parent, depth) { 1005 | // cloning null always returns null 1006 | if (parent === null) 1007 | return null; 1008 | 1009 | if (depth === 0) 1010 | return parent; 1011 | 1012 | var child; 1013 | var proto; 1014 | if (typeof parent != 'object') { 1015 | return parent; 1016 | } 1017 | 1018 | if (_instanceof(parent, nativeMap)) { 1019 | child = new nativeMap(); 1020 | } else if (_instanceof(parent, nativeSet)) { 1021 | child = new nativeSet(); 1022 | } else if (_instanceof(parent, nativePromise)) { 1023 | child = new nativePromise(function (resolve, reject) { 1024 | parent.then(function(value) { 1025 | resolve(_clone(value, depth - 1)); 1026 | }, function(err) { 1027 | reject(_clone(err, depth - 1)); 1028 | }); 1029 | }); 1030 | } else if (clone.__isArray(parent)) { 1031 | child = []; 1032 | } else if (clone.__isRegExp(parent)) { 1033 | child = new RegExp(parent.source, __getRegExpFlags(parent)); 1034 | if (parent.lastIndex) child.lastIndex = parent.lastIndex; 1035 | } else if (clone.__isDate(parent)) { 1036 | child = new Date(parent.getTime()); 1037 | } else if (useBuffer && Buffer.isBuffer(parent)) { 1038 | child = new Buffer(parent.length); 1039 | parent.copy(child); 1040 | return child; 1041 | } else if (_instanceof(parent, Error)) { 1042 | child = Object.create(parent); 1043 | } else { 1044 | if (typeof prototype == 'undefined') { 1045 | proto = Object.getPrototypeOf(parent); 1046 | child = Object.create(proto); 1047 | } 1048 | else { 1049 | child = Object.create(prototype); 1050 | proto = prototype; 1051 | } 1052 | } 1053 | 1054 | if (circular) { 1055 | var index = allParents.indexOf(parent); 1056 | 1057 | if (index != -1) { 1058 | return allChildren[index]; 1059 | } 1060 | allParents.push(parent); 1061 | allChildren.push(child); 1062 | } 1063 | 1064 | if (_instanceof(parent, nativeMap)) { 1065 | parent.forEach(function(value, key) { 1066 | var keyChild = _clone(key, depth - 1); 1067 | var valueChild = _clone(value, depth - 1); 1068 | child.set(keyChild, valueChild); 1069 | }); 1070 | } 1071 | if (_instanceof(parent, nativeSet)) { 1072 | parent.forEach(function(value) { 1073 | var entryChild = _clone(value, depth - 1); 1074 | child.add(entryChild); 1075 | }); 1076 | } 1077 | 1078 | for (var i in parent) { 1079 | var attrs; 1080 | if (proto) { 1081 | attrs = Object.getOwnPropertyDescriptor(proto, i); 1082 | } 1083 | 1084 | if (attrs && attrs.set == null) { 1085 | continue; 1086 | } 1087 | child[i] = _clone(parent[i], depth - 1); 1088 | } 1089 | 1090 | if (Object.getOwnPropertySymbols) { 1091 | var symbols = Object.getOwnPropertySymbols(parent); 1092 | for (var i = 0; i < symbols.length; i++) { 1093 | // Don't need to worry about cloning a symbol because it is a primitive, 1094 | // like a number or string. 1095 | var symbol = symbols[i]; 1096 | var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); 1097 | if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { 1098 | continue; 1099 | } 1100 | child[symbol] = _clone(parent[symbol], depth - 1); 1101 | if (!descriptor.enumerable) { 1102 | Object.defineProperty(child, symbol, { 1103 | enumerable: false 1104 | }); 1105 | } 1106 | } 1107 | } 1108 | 1109 | if (includeNonEnumerable) { 1110 | var allPropertyNames = Object.getOwnPropertyNames(parent); 1111 | for (var i = 0; i < allPropertyNames.length; i++) { 1112 | var propertyName = allPropertyNames[i]; 1113 | var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); 1114 | if (descriptor && descriptor.enumerable) { 1115 | continue; 1116 | } 1117 | child[propertyName] = _clone(parent[propertyName], depth - 1); 1118 | Object.defineProperty(child, propertyName, { 1119 | enumerable: false 1120 | }); 1121 | } 1122 | } 1123 | 1124 | return child; 1125 | } 1126 | 1127 | return _clone(parent, depth); 1128 | } 1129 | 1130 | /** 1131 | * Simple flat clone using prototype, accepts only objects, usefull for property 1132 | * override on FLAT configuration object (no nested props). 1133 | * 1134 | * USE WITH CAUTION! This may not behave as you wish if you do not know how this 1135 | * works. 1136 | */ 1137 | clone.clonePrototype = function clonePrototype(parent) { 1138 | if (parent === null) 1139 | return null; 1140 | 1141 | var c = function () {}; 1142 | c.prototype = parent; 1143 | return new c(); 1144 | }; 1145 | 1146 | // private utility functions 1147 | 1148 | function __objToStr(o) { 1149 | return Object.prototype.toString.call(o); 1150 | } 1151 | clone.__objToStr = __objToStr; 1152 | 1153 | function __isDate(o) { 1154 | return typeof o === 'object' && __objToStr(o) === '[object Date]'; 1155 | } 1156 | clone.__isDate = __isDate; 1157 | 1158 | function __isArray(o) { 1159 | return typeof o === 'object' && __objToStr(o) === '[object Array]'; 1160 | } 1161 | clone.__isArray = __isArray; 1162 | 1163 | function __isRegExp(o) { 1164 | return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; 1165 | } 1166 | clone.__isRegExp = __isRegExp; 1167 | 1168 | function __getRegExpFlags(re) { 1169 | var flags = ''; 1170 | if (re.global) flags += 'g'; 1171 | if (re.ignoreCase) flags += 'i'; 1172 | if (re.multiline) flags += 'm'; 1173 | return flags; 1174 | } 1175 | clone.__getRegExpFlags = __getRegExpFlags; 1176 | 1177 | return clone; 1178 | })(); 1179 | 1180 | if ('object' === 'object' && module.exports) { 1181 | module.exports = clone; 1182 | } 1183 | }); 1184 | 1185 | var css = ".PopupMenu_PopupMenu__8TfA4 {\n position: relative; }\n\n.PopupMenu_button__20m_Y {\n padding: 5px;\n border-radius: 2px;\n width: 30px;\n height: 30px;\n transition: background 0.25s ease-in-out; }\n .PopupMenu_button__20m_Y:hover, .PopupMenu_button__20m_Y.active {\n background: rgba(0, 0, 0, 0.1); }\n\n.PopupMenu_popover__3hd_Z {\n background: white;\n position: absolute;\n width: calc(200px - 10px);\n height: calc(200px - 10px);\n left: calc(-100px + 50%);\n top: 60px;\n border-radius: 5px;\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);\n transition: opacity 0.5s ease-in-out;\n opacity: 0;\n padding: 5px;\n z-index: 1; }\n .PopupMenu_popover__3hd_Z.active {\n opacity: 1; }\n .PopupMenu_popover__3hd_Z:hover + .PopupMenu_button__20m_Y {\n background: rgba(0, 0, 0, 0.1); }\n .PopupMenu_popover__3hd_Z:before {\n content: \"\";\n position: absolute;\n display: block;\n top: -20px;\n left: calc(50% - 10px);\n border: 10px solid white;\n border-color: transparent transparent white transparent; }\n\n.PopupMenu_direction-top__1oqgB .PopupMenu_popover__3hd_Z {\n top: auto;\n bottom: 60px; }\n .PopupMenu_direction-top__1oqgB .PopupMenu_popover__3hd_Z:before {\n top: auto;\n bottom: -20px;\n border-color: white transparent transparent transparent; }\n\n.PopupMenu_direction-left__mSrJK .PopupMenu_popover__3hd_Z {\n top: -100px;\n left: auto !important;\n right: 60px; }\n .PopupMenu_direction-left__mSrJK .PopupMenu_popover__3hd_Z:before {\n left: auto;\n right: -20px;\n top: calc(50% - 10px);\n border-color: transparent transparent transparent white; }\n\n.PopupMenu_direction-right__yrXfz .PopupMenu_popover__3hd_Z {\n top: -100px;\n right: auto !important;\n left: 60px !important; }\n .PopupMenu_direction-right__yrXfz .PopupMenu_popover__3hd_Z:before {\n right: auto;\n left: -20px;\n top: calc(50% - 10px);\n border-color: transparent white transparent transparent; }\n"; 1186 | var style = { "PopupMenu": "PopupMenu_PopupMenu__8TfA4", "button": "PopupMenu_button__20m_Y", "popover": "PopupMenu_popover__3hd_Z", "direction-top": "PopupMenu_direction-top__1oqgB", "direction-left": "PopupMenu_direction-left__mSrJK", "direction-right": "PopupMenu_direction-right__yrXfz" }; 1187 | __$$styleInject(css); 1188 | 1189 | var classCallCheck = function (instance, Constructor) { 1190 | if (!(instance instanceof Constructor)) { 1191 | throw new TypeError("Cannot call a class as a function"); 1192 | } 1193 | }; 1194 | 1195 | var createClass = function () { 1196 | function defineProperties(target, props) { 1197 | for (var i = 0; i < props.length; i++) { 1198 | var descriptor = props[i]; 1199 | descriptor.enumerable = descriptor.enumerable || false; 1200 | descriptor.configurable = true; 1201 | if ("value" in descriptor) descriptor.writable = true; 1202 | Object.defineProperty(target, descriptor.key, descriptor); 1203 | } 1204 | } 1205 | 1206 | return function (Constructor, protoProps, staticProps) { 1207 | if (protoProps) defineProperties(Constructor.prototype, protoProps); 1208 | if (staticProps) defineProperties(Constructor, staticProps); 1209 | return Constructor; 1210 | }; 1211 | }(); 1212 | 1213 | var _extends = Object.assign || function (target) { 1214 | for (var i = 1; i < arguments.length; i++) { 1215 | var source = arguments[i]; 1216 | 1217 | for (var key in source) { 1218 | if (Object.prototype.hasOwnProperty.call(source, key)) { 1219 | target[key] = source[key]; 1220 | } 1221 | } 1222 | } 1223 | 1224 | return target; 1225 | }; 1226 | 1227 | var inherits = function (subClass, superClass) { 1228 | if (typeof superClass !== "function" && superClass !== null) { 1229 | throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); 1230 | } 1231 | 1232 | subClass.prototype = Object.create(superClass && superClass.prototype, { 1233 | constructor: { 1234 | value: subClass, 1235 | enumerable: false, 1236 | writable: true, 1237 | configurable: true 1238 | } 1239 | }); 1240 | if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; 1241 | }; 1242 | 1243 | var possibleConstructorReturn = function (self, call) { 1244 | if (!self) { 1245 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 1246 | } 1247 | 1248 | return call && (typeof call === "object" || typeof call === "function") ? call : self; 1249 | }; 1250 | 1251 | var PopupMenu = function (_Component) { 1252 | inherits(PopupMenu, _Component); 1253 | createClass(PopupMenu, [{ 1254 | key: 'getChildContext', 1255 | value: function getChildContext() { 1256 | return { 1257 | popupWidth: this.props.width 1258 | }; 1259 | } 1260 | }]); 1261 | 1262 | function PopupMenu(props) { 1263 | classCallCheck(this, PopupMenu); 1264 | 1265 | var _this = possibleConstructorReturn(this, (PopupMenu.__proto__ || Object.getPrototypeOf(PopupMenu)).call(this, props)); 1266 | 1267 | _this.state = { 1268 | hovered: false, 1269 | displayable: false 1270 | }; 1271 | 1272 | _this.hover = function () { 1273 | clearTimeout(_this._diplayTimeout); 1274 | _this.setState({ hovered: true, displayable: true }); 1275 | }; 1276 | 1277 | _this.unhover = function () { 1278 | _this.setState({ hovered: false }); 1279 | _this._diplayTimeout = setTimeout(function () { 1280 | return _this.setState({ displayable: false }); 1281 | }, 500); 1282 | }; 1283 | 1284 | return _this; 1285 | } 1286 | 1287 | createClass(PopupMenu, [{ 1288 | key: 'configureStyles', 1289 | value: function configureStyles(props) { 1290 | return { 1291 | popover: _extends({ 1292 | width: 'calc(' + props.width + 'px - 10px)', 1293 | height: props.height === 'auto' ? 'auto' : 'calc(' + props.height + 'px - 10px)', 1294 | left: 'calc(' + -props.width / 2 + 'px + 50%)' 1295 | }, props.direction === 'left' || props.direction === 'right' ? { 1296 | top: 'calc(' + -props.height / 2 + 'px + 50%)' 1297 | } : {}) 1298 | }; 1299 | } 1300 | }, { 1301 | key: 'render', 1302 | value: function render() { 1303 | var _state = this.state, 1304 | hovered = _state.hovered, 1305 | displayable = _state.displayable; 1306 | var direction = this.props.direction; 1307 | 1308 | 1309 | var styles = this.configureStyles(this.props); 1310 | 1311 | return React__default.createElement( 1312 | 'div', 1313 | { 1314 | className: classnames(style.PopupMenu, style['direction-' + direction]) 1315 | }, 1316 | React__default.createElement( 1317 | 'div', 1318 | { 1319 | onMouseOver: this.hover, 1320 | onMouseOut: this.unhover, 1321 | className: classnames(style.button, { 1322 | active: hovered 1323 | }) 1324 | }, 1325 | this.props.button 1326 | ), 1327 | React__default.createElement( 1328 | 'div', 1329 | { 1330 | onMouseOver: this.hover, 1331 | onMouseOut: this.unhover, 1332 | className: classnames(style.popover, { 1333 | active: hovered 1334 | }), 1335 | 1336 | style: _extends({}, styles.popover, { 1337 | visibility: displayable ? '' : 'hidden' 1338 | }) 1339 | }, 1340 | this.props.children 1341 | ) 1342 | ); 1343 | } 1344 | }]); 1345 | return PopupMenu; 1346 | }(React.Component); 1347 | PopupMenu.defaultProps = { 1348 | width: 200, 1349 | height: 'auto' 1350 | }; 1351 | PopupMenu.childContextTypes = { 1352 | popupWidth: propTypes.number 1353 | }; 1354 | 1355 | var css$1 = ".PopupTable_PopupTable__3fGcX {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n width: calc(200px - 10px);\n flex-flow: row wrap; }\n\n.PopupTable_item__1j75h {\n padding: 5px;\n border-radius: 2px;\n transition: background 0.15s ease-in-out; }\n .PopupTable_item__1j75h:hover {\n background: rgba(0, 0, 0, 0.1); }\n\n.PopupTable_placeholder__CKltF {\n padding: 0px;\n height: 10px;\n display: block;\n border-radius: 2px;\n visibility: hidden; }\n"; 1356 | var style$1 = { "PopupTable": "PopupTable_PopupTable__3fGcX", "item": "PopupTable_item__1j75h", "placeholder": "PopupTable_placeholder__CKltF" }; 1357 | __$$styleInject(css$1); 1358 | 1359 | var container = document.createElement('div'); 1360 | container.style.position = 'absolute'; 1361 | container.style.left = '-999999px'; 1362 | document.body.appendChild(container); 1363 | 1364 | var getSize = function getSize(element) { 1365 | var elementParent = document.createElement('div'); 1366 | container.appendChild(elementParent); 1367 | 1368 | return new Promise(function (resolve) { 1369 | reactDom.render(element, elementParent, function () { 1370 | resolve({ 1371 | width: elementParent.firstChild.offsetWidth, 1372 | height: elementParent.firstChild.offsetHeight 1373 | }); 1374 | }); 1375 | }); 1376 | }; 1377 | 1378 | var PopupTable = function (_Component) { 1379 | inherits(PopupTable, _Component); 1380 | 1381 | function PopupTable(props, context) { 1382 | classCallCheck(this, PopupTable); 1383 | 1384 | var _this = possibleConstructorReturn(this, (PopupTable.__proto__ || Object.getPrototypeOf(PopupTable)).call(this, props, context)); 1385 | 1386 | _this.sizes = []; 1387 | _this.wait = []; 1388 | 1389 | _this.updateLayout(); 1390 | return _this; 1391 | } 1392 | 1393 | createClass(PopupTable, [{ 1394 | key: 'updateLayout', 1395 | value: function updateLayout() { 1396 | var _this2 = this; 1397 | 1398 | this.items = this.props.children.length % this.props.rowItems; 1399 | 1400 | this.children = this.props.children.map(function (component) { 1401 | _this2.wait.push(getSize(component)); 1402 | return React__default.cloneElement(component); 1403 | }); 1404 | 1405 | Promise.all(this.wait).then(function (sizes) { 1406 | _this2.sizes = sizes; 1407 | _this2.forceUpdate(); 1408 | }); 1409 | } 1410 | }, { 1411 | key: 'render', 1412 | value: function render() { 1413 | var rowItems = this.props.rowItems; 1414 | var children = this.children, 1415 | sizes = this.sizes, 1416 | items = this.items; 1417 | 1418 | 1419 | if (sizes.length < 1) return null; 1420 | 1421 | var width = this.context.popupWidth || 200; 1422 | 1423 | if (children.length % rowItems !== 0) { 1424 | var contentSize = sizes.slice(-items).reduce(function (size, _ref) { 1425 | var width = _ref.width; 1426 | return size + width + 10; 1427 | }, 0); 1428 | 1429 | var margin = (width - rowItems * (contentSize / items)) / rowItems; 1430 | 1431 | children.push(React__default.createElement('div', { 1432 | style: { 1433 | width: width - contentSize - margin * rowItems 1434 | } 1435 | })); 1436 | } 1437 | 1438 | return React__default.createElement( 1439 | 'div', 1440 | { 1441 | className: style$1.PopupTable, 1442 | style: { width: 'calc(' + width + 'px - 10px)' } 1443 | }, 1444 | children.map(function (child, i) { 1445 | return React__default.createElement( 1446 | 'div', 1447 | { key: i, className: i === children.length - 1 && items > 0 ? style$1.placeholder : style$1.item }, 1448 | child 1449 | ); 1450 | }) 1451 | ); 1452 | } 1453 | }]); 1454 | return PopupTable; 1455 | }(React.Component); 1456 | PopupTable.defaultProps = { 1457 | rowItems: 1 1458 | }; 1459 | PopupTable.contextTypes = { 1460 | popupWidth: propTypes.number 1461 | }; 1462 | 1463 | var PopupText = function (_Component) { 1464 | inherits(PopupText, _Component); 1465 | 1466 | function PopupText() { 1467 | classCallCheck(this, PopupText); 1468 | return possibleConstructorReturn(this, (PopupText.__proto__ || Object.getPrototypeOf(PopupText)).apply(this, arguments)); 1469 | } 1470 | 1471 | createClass(PopupText, [{ 1472 | key: 'render', 1473 | value: function render() { 1474 | return React__default.createElement( 1475 | 'div', 1476 | { style: { padding: '3px 7px' } }, 1477 | React__default.createElement( 1478 | 'span', 1479 | null, 1480 | this.props.children 1481 | ) 1482 | ); 1483 | } 1484 | }]); 1485 | return PopupText; 1486 | }(React.Component); 1487 | 1488 | exports.PopupMenu = PopupMenu; 1489 | exports.PopupTable = PopupTable; 1490 | exports.PopupText = PopupText; 1491 | 1492 | Object.defineProperty(exports, '__esModule', { value: true }); 1493 | 1494 | }))); 1495 | //# sourceMappingURL=rrpm.js.map 1496 | -------------------------------------------------------------------------------- /build/rrpm.module.js: -------------------------------------------------------------------------------- 1 | function __$$styleInject(css, ref) { 2 | if ( ref === void 0 ) ref = {}; 3 | var insertAt = ref.insertAt; 4 | 5 | if (!css || typeof document === 'undefined') { return; } 6 | 7 | var head = document.head || document.getElementsByTagName('head')[0]; 8 | var style = document.createElement('style'); 9 | style.type = 'text/css'; 10 | 11 | if (insertAt === 'top') { 12 | if (head.firstChild) { 13 | head.insertBefore(style, head.firstChild); 14 | } else { 15 | head.appendChild(style); 16 | } 17 | } else { 18 | head.appendChild(style); 19 | } 20 | 21 | if (style.styleSheet) { 22 | style.styleSheet.cssText = css; 23 | } else { 24 | style.appendChild(document.createTextNode(css)); 25 | } 26 | } 27 | 28 | import React, { Component } from 'react'; 29 | import { render } from 'react-dom'; 30 | 31 | function createCommonjsModule(fn, module) { 32 | return module = { exports: {} }, fn(module, module.exports), module.exports; 33 | } 34 | 35 | /** 36 | * Copyright (c) 2013-present, Facebook, Inc. 37 | * 38 | * This source code is licensed under the MIT license found in the 39 | * LICENSE file in the root directory of this source tree. 40 | * 41 | * 42 | */ 43 | 44 | function makeEmptyFunction(arg) { 45 | return function () { 46 | return arg; 47 | }; 48 | } 49 | 50 | /** 51 | * This function accepts and discards inputs; it has no side effects. This is 52 | * primarily useful idiomatically for overridable function endpoints which 53 | * always need to be callable, since JS lacks a null-call idiom ala Cocoa. 54 | */ 55 | var emptyFunction = function emptyFunction() {}; 56 | 57 | emptyFunction.thatReturns = makeEmptyFunction; 58 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false); 59 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true); 60 | emptyFunction.thatReturnsNull = makeEmptyFunction(null); 61 | emptyFunction.thatReturnsThis = function () { 62 | return this; 63 | }; 64 | emptyFunction.thatReturnsArgument = function (arg) { 65 | return arg; 66 | }; 67 | 68 | var emptyFunction_1 = emptyFunction; 69 | 70 | /** 71 | * Copyright (c) 2013-present, Facebook, Inc. 72 | * 73 | * This source code is licensed under the MIT license found in the 74 | * LICENSE file in the root directory of this source tree. 75 | * 76 | */ 77 | 78 | /** 79 | * Use invariant() to assert state which your program assumes to be true. 80 | * 81 | * Provide sprintf-style format (only %s is supported) and arguments 82 | * to provide information about what broke and what you were 83 | * expecting. 84 | * 85 | * The invariant message will be stripped in production, but the invariant 86 | * will remain to ensure logic does not differ in production. 87 | */ 88 | 89 | var validateFormat = function validateFormat(format) {}; 90 | 91 | { 92 | validateFormat = function validateFormat(format) { 93 | if (format === undefined) { 94 | throw new Error('invariant requires an error message argument'); 95 | } 96 | }; 97 | } 98 | 99 | function invariant(condition, format, a, b, c, d, e, f) { 100 | validateFormat(format); 101 | 102 | if (!condition) { 103 | var error; 104 | if (format === undefined) { 105 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); 106 | } else { 107 | var args = [a, b, c, d, e, f]; 108 | var argIndex = 0; 109 | error = new Error(format.replace(/%s/g, function () { 110 | return args[argIndex++]; 111 | })); 112 | error.name = 'Invariant Violation'; 113 | } 114 | 115 | error.framesToPop = 1; // we don't care about invariant's own frame 116 | throw error; 117 | } 118 | } 119 | 120 | var invariant_1 = invariant; 121 | 122 | /** 123 | * Similar to invariant but only logs a warning if the condition is not met. 124 | * This can be used to log issues in development environments in critical 125 | * paths. Removing the logging code for production environments will keep the 126 | * same logic and follow the same code paths. 127 | */ 128 | 129 | var warning = emptyFunction_1; 130 | 131 | { 132 | var printWarning = function printWarning(format) { 133 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 134 | args[_key - 1] = arguments[_key]; 135 | } 136 | 137 | var argIndex = 0; 138 | var message = 'Warning: ' + format.replace(/%s/g, function () { 139 | return args[argIndex++]; 140 | }); 141 | if (typeof console !== 'undefined') { 142 | console.error(message); 143 | } 144 | try { 145 | // --- Welcome to debugging React --- 146 | // This error was thrown as a convenience so that you can use this stack 147 | // to find the callsite that caused this warning to fire. 148 | throw new Error(message); 149 | } catch (x) {} 150 | }; 151 | 152 | warning = function warning(condition, format) { 153 | if (format === undefined) { 154 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); 155 | } 156 | 157 | if (format.indexOf('Failed Composite propType: ') === 0) { 158 | return; // Ignore CompositeComponent proptype check. 159 | } 160 | 161 | if (!condition) { 162 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { 163 | args[_key2 - 2] = arguments[_key2]; 164 | } 165 | 166 | printWarning.apply(undefined, [format].concat(args)); 167 | } 168 | }; 169 | } 170 | 171 | var warning_1 = warning; 172 | 173 | /* 174 | object-assign 175 | (c) Sindre Sorhus 176 | @license MIT 177 | */ 178 | /* eslint-disable no-unused-vars */ 179 | var getOwnPropertySymbols = Object.getOwnPropertySymbols; 180 | var hasOwnProperty = Object.prototype.hasOwnProperty; 181 | var propIsEnumerable = Object.prototype.propertyIsEnumerable; 182 | 183 | function toObject(val) { 184 | if (val === null || val === undefined) { 185 | throw new TypeError('Object.assign cannot be called with null or undefined'); 186 | } 187 | 188 | return Object(val); 189 | } 190 | 191 | function shouldUseNative() { 192 | try { 193 | if (!Object.assign) { 194 | return false; 195 | } 196 | 197 | // Detect buggy property enumeration order in older V8 versions. 198 | 199 | // https://bugs.chromium.org/p/v8/issues/detail?id=4118 200 | var test1 = new String('abc'); // eslint-disable-line no-new-wrappers 201 | test1[5] = 'de'; 202 | if (Object.getOwnPropertyNames(test1)[0] === '5') { 203 | return false; 204 | } 205 | 206 | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 207 | var test2 = {}; 208 | for (var i = 0; i < 10; i++) { 209 | test2['_' + String.fromCharCode(i)] = i; 210 | } 211 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) { 212 | return test2[n]; 213 | }); 214 | if (order2.join('') !== '0123456789') { 215 | return false; 216 | } 217 | 218 | // https://bugs.chromium.org/p/v8/issues/detail?id=3056 219 | var test3 = {}; 220 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { 221 | test3[letter] = letter; 222 | }); 223 | if (Object.keys(Object.assign({}, test3)).join('') !== 224 | 'abcdefghijklmnopqrst') { 225 | return false; 226 | } 227 | 228 | return true; 229 | } catch (err) { 230 | // We don't expect any of the above to throw, but better to be safe. 231 | return false; 232 | } 233 | } 234 | 235 | var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { 236 | var from; 237 | var to = toObject(target); 238 | var symbols; 239 | 240 | for (var s = 1; s < arguments.length; s++) { 241 | from = Object(arguments[s]); 242 | 243 | for (var key in from) { 244 | if (hasOwnProperty.call(from, key)) { 245 | to[key] = from[key]; 246 | } 247 | } 248 | 249 | if (getOwnPropertySymbols) { 250 | symbols = getOwnPropertySymbols(from); 251 | for (var i = 0; i < symbols.length; i++) { 252 | if (propIsEnumerable.call(from, symbols[i])) { 253 | to[symbols[i]] = from[symbols[i]]; 254 | } 255 | } 256 | } 257 | } 258 | 259 | return to; 260 | }; 261 | 262 | /** 263 | * Copyright (c) 2013-present, Facebook, Inc. 264 | * 265 | * This source code is licensed under the MIT license found in the 266 | * LICENSE file in the root directory of this source tree. 267 | */ 268 | 269 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; 270 | 271 | var ReactPropTypesSecret_1 = ReactPropTypesSecret; 272 | 273 | { 274 | var invariant$1 = invariant_1; 275 | var warning$1 = warning_1; 276 | var ReactPropTypesSecret$1 = ReactPropTypesSecret_1; 277 | var loggedTypeFailures = {}; 278 | } 279 | 280 | /** 281 | * Assert that the values match with the type specs. 282 | * Error messages are memorized and will only be shown once. 283 | * 284 | * @param {object} typeSpecs Map of name to a ReactPropType 285 | * @param {object} values Runtime values that need to be type-checked 286 | * @param {string} location e.g. "prop", "context", "child context" 287 | * @param {string} componentName Name of the component for error messages. 288 | * @param {?Function} getStack Returns the component stack. 289 | * @private 290 | */ 291 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) { 292 | { 293 | for (var typeSpecName in typeSpecs) { 294 | if (typeSpecs.hasOwnProperty(typeSpecName)) { 295 | var error; 296 | // Prop type validation may throw. In case they do, we don't want to 297 | // fail the render phase where it didn't fail before. So we log it. 298 | // After these have been cleaned up, we'll let them throw. 299 | try { 300 | // This is intentionally an invariant that gets caught. It's the same 301 | // behavior as without this statement except with a better message. 302 | invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]); 303 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1); 304 | } catch (ex) { 305 | error = ex; 306 | } 307 | warning$1(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error); 308 | if (error instanceof Error && !(error.message in loggedTypeFailures)) { 309 | // Only monitor this failure once because there tends to be a lot of the 310 | // same error. 311 | loggedTypeFailures[error.message] = true; 312 | 313 | var stack = getStack ? getStack() : ''; 314 | 315 | warning$1(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : ''); 316 | } 317 | } 318 | } 319 | } 320 | } 321 | 322 | var checkPropTypes_1 = checkPropTypes; 323 | 324 | var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) { 325 | /* global Symbol */ 326 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; 327 | var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. 328 | 329 | /** 330 | * Returns the iterator method function contained on the iterable object. 331 | * 332 | * Be sure to invoke the function with the iterable as context: 333 | * 334 | * var iteratorFn = getIteratorFn(myIterable); 335 | * if (iteratorFn) { 336 | * var iterator = iteratorFn.call(myIterable); 337 | * ... 338 | * } 339 | * 340 | * @param {?object} maybeIterable 341 | * @return {?function} 342 | */ 343 | function getIteratorFn(maybeIterable) { 344 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); 345 | if (typeof iteratorFn === 'function') { 346 | return iteratorFn; 347 | } 348 | } 349 | 350 | /** 351 | * Collection of methods that allow declaration and validation of props that are 352 | * supplied to React components. Example usage: 353 | * 354 | * var Props = require('ReactPropTypes'); 355 | * var MyArticle = React.createClass({ 356 | * propTypes: { 357 | * // An optional string prop named "description". 358 | * description: Props.string, 359 | * 360 | * // A required enum prop named "category". 361 | * category: Props.oneOf(['News','Photos']).isRequired, 362 | * 363 | * // A prop named "dialog" that requires an instance of Dialog. 364 | * dialog: Props.instanceOf(Dialog).isRequired 365 | * }, 366 | * render: function() { ... } 367 | * }); 368 | * 369 | * A more formal specification of how these methods are used: 370 | * 371 | * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) 372 | * decl := ReactPropTypes.{type}(.isRequired)? 373 | * 374 | * Each and every declaration produces a function with the same signature. This 375 | * allows the creation of custom validation functions. For example: 376 | * 377 | * var MyLink = React.createClass({ 378 | * propTypes: { 379 | * // An optional string or URI prop named "href". 380 | * href: function(props, propName, componentName) { 381 | * var propValue = props[propName]; 382 | * if (propValue != null && typeof propValue !== 'string' && 383 | * !(propValue instanceof URI)) { 384 | * return new Error( 385 | * 'Expected a string or an URI for ' + propName + ' in ' + 386 | * componentName 387 | * ); 388 | * } 389 | * } 390 | * }, 391 | * render: function() {...} 392 | * }); 393 | * 394 | * @internal 395 | */ 396 | 397 | var ANONYMOUS = '<>'; 398 | 399 | // Important! 400 | // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. 401 | var ReactPropTypes = { 402 | array: createPrimitiveTypeChecker('array'), 403 | bool: createPrimitiveTypeChecker('boolean'), 404 | func: createPrimitiveTypeChecker('function'), 405 | number: createPrimitiveTypeChecker('number'), 406 | object: createPrimitiveTypeChecker('object'), 407 | string: createPrimitiveTypeChecker('string'), 408 | symbol: createPrimitiveTypeChecker('symbol'), 409 | 410 | any: createAnyTypeChecker(), 411 | arrayOf: createArrayOfTypeChecker, 412 | element: createElementTypeChecker(), 413 | instanceOf: createInstanceTypeChecker, 414 | node: createNodeChecker(), 415 | objectOf: createObjectOfTypeChecker, 416 | oneOf: createEnumTypeChecker, 417 | oneOfType: createUnionTypeChecker, 418 | shape: createShapeTypeChecker, 419 | exact: createStrictShapeTypeChecker, 420 | }; 421 | 422 | /** 423 | * inlined Object.is polyfill to avoid requiring consumers ship their own 424 | * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 425 | */ 426 | /*eslint-disable no-self-compare*/ 427 | function is(x, y) { 428 | // SameValue algorithm 429 | if (x === y) { 430 | // Steps 1-5, 7-10 431 | // Steps 6.b-6.e: +0 != -0 432 | return x !== 0 || 1 / x === 1 / y; 433 | } else { 434 | // Step 6.a: NaN == NaN 435 | return x !== x && y !== y; 436 | } 437 | } 438 | /*eslint-enable no-self-compare*/ 439 | 440 | /** 441 | * We use an Error-like object for backward compatibility as people may call 442 | * PropTypes directly and inspect their output. However, we don't use real 443 | * Errors anymore. We don't inspect their stack anyway, and creating them 444 | * is prohibitively expensive if they are created too often, such as what 445 | * happens in oneOfType() for any type before the one that matched. 446 | */ 447 | function PropTypeError(message) { 448 | this.message = message; 449 | this.stack = ''; 450 | } 451 | // Make `instanceof Error` still work for returned errors. 452 | PropTypeError.prototype = Error.prototype; 453 | 454 | function createChainableTypeChecker(validate) { 455 | { 456 | var manualPropTypeCallCache = {}; 457 | var manualPropTypeWarningCount = 0; 458 | } 459 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { 460 | componentName = componentName || ANONYMOUS; 461 | propFullName = propFullName || propName; 462 | 463 | if (secret !== ReactPropTypesSecret_1) { 464 | if (throwOnDirectAccess) { 465 | // New behavior only for users of `prop-types` package 466 | invariant_1( 467 | false, 468 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 469 | 'Use `PropTypes.checkPropTypes()` to call them. ' + 470 | 'Read more at http://fb.me/use-check-prop-types' 471 | ); 472 | } else if ("development" !== 'production' && typeof console !== 'undefined') { 473 | // Old behavior for people using React.PropTypes 474 | var cacheKey = componentName + ':' + propName; 475 | if ( 476 | !manualPropTypeCallCache[cacheKey] && 477 | // Avoid spamming the console because they are often not actionable except for lib authors 478 | manualPropTypeWarningCount < 3 479 | ) { 480 | warning_1( 481 | false, 482 | 'You are manually calling a React.PropTypes validation ' + 483 | 'function for the `%s` prop on `%s`. This is deprecated ' + 484 | 'and will throw in the standalone `prop-types` package. ' + 485 | 'You may be seeing this warning due to a third-party PropTypes ' + 486 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', 487 | propFullName, 488 | componentName 489 | ); 490 | manualPropTypeCallCache[cacheKey] = true; 491 | manualPropTypeWarningCount++; 492 | } 493 | } 494 | } 495 | if (props[propName] == null) { 496 | if (isRequired) { 497 | if (props[propName] === null) { 498 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); 499 | } 500 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); 501 | } 502 | return null; 503 | } else { 504 | return validate(props, propName, componentName, location, propFullName); 505 | } 506 | } 507 | 508 | var chainedCheckType = checkType.bind(null, false); 509 | chainedCheckType.isRequired = checkType.bind(null, true); 510 | 511 | return chainedCheckType; 512 | } 513 | 514 | function createPrimitiveTypeChecker(expectedType) { 515 | function validate(props, propName, componentName, location, propFullName, secret) { 516 | var propValue = props[propName]; 517 | var propType = getPropType(propValue); 518 | if (propType !== expectedType) { 519 | // `propValue` being instance of, say, date/regexp, pass the 'object' 520 | // check, but we can offer a more precise error message here rather than 521 | // 'of type `object`'. 522 | var preciseType = getPreciseType(propValue); 523 | 524 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); 525 | } 526 | return null; 527 | } 528 | return createChainableTypeChecker(validate); 529 | } 530 | 531 | function createAnyTypeChecker() { 532 | return createChainableTypeChecker(emptyFunction_1.thatReturnsNull); 533 | } 534 | 535 | function createArrayOfTypeChecker(typeChecker) { 536 | function validate(props, propName, componentName, location, propFullName) { 537 | if (typeof typeChecker !== 'function') { 538 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); 539 | } 540 | var propValue = props[propName]; 541 | if (!Array.isArray(propValue)) { 542 | var propType = getPropType(propValue); 543 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); 544 | } 545 | for (var i = 0; i < propValue.length; i++) { 546 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1); 547 | if (error instanceof Error) { 548 | return error; 549 | } 550 | } 551 | return null; 552 | } 553 | return createChainableTypeChecker(validate); 554 | } 555 | 556 | function createElementTypeChecker() { 557 | function validate(props, propName, componentName, location, propFullName) { 558 | var propValue = props[propName]; 559 | if (!isValidElement(propValue)) { 560 | var propType = getPropType(propValue); 561 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); 562 | } 563 | return null; 564 | } 565 | return createChainableTypeChecker(validate); 566 | } 567 | 568 | function createInstanceTypeChecker(expectedClass) { 569 | function validate(props, propName, componentName, location, propFullName) { 570 | if (!(props[propName] instanceof expectedClass)) { 571 | var expectedClassName = expectedClass.name || ANONYMOUS; 572 | var actualClassName = getClassName(props[propName]); 573 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); 574 | } 575 | return null; 576 | } 577 | return createChainableTypeChecker(validate); 578 | } 579 | 580 | function createEnumTypeChecker(expectedValues) { 581 | if (!Array.isArray(expectedValues)) { 582 | warning_1(false, 'Invalid argument supplied to oneOf, expected an instance of array.'); 583 | return emptyFunction_1.thatReturnsNull; 584 | } 585 | 586 | function validate(props, propName, componentName, location, propFullName) { 587 | var propValue = props[propName]; 588 | for (var i = 0; i < expectedValues.length; i++) { 589 | if (is(propValue, expectedValues[i])) { 590 | return null; 591 | } 592 | } 593 | 594 | var valuesString = JSON.stringify(expectedValues); 595 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); 596 | } 597 | return createChainableTypeChecker(validate); 598 | } 599 | 600 | function createObjectOfTypeChecker(typeChecker) { 601 | function validate(props, propName, componentName, location, propFullName) { 602 | if (typeof typeChecker !== 'function') { 603 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); 604 | } 605 | var propValue = props[propName]; 606 | var propType = getPropType(propValue); 607 | if (propType !== 'object') { 608 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); 609 | } 610 | for (var key in propValue) { 611 | if (propValue.hasOwnProperty(key)) { 612 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); 613 | if (error instanceof Error) { 614 | return error; 615 | } 616 | } 617 | } 618 | return null; 619 | } 620 | return createChainableTypeChecker(validate); 621 | } 622 | 623 | function createUnionTypeChecker(arrayOfTypeCheckers) { 624 | if (!Array.isArray(arrayOfTypeCheckers)) { 625 | warning_1(false, 'Invalid argument supplied to oneOfType, expected an instance of array.'); 626 | return emptyFunction_1.thatReturnsNull; 627 | } 628 | 629 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 630 | var checker = arrayOfTypeCheckers[i]; 631 | if (typeof checker !== 'function') { 632 | warning_1( 633 | false, 634 | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 635 | 'received %s at index %s.', 636 | getPostfixForTypeWarning(checker), 637 | i 638 | ); 639 | return emptyFunction_1.thatReturnsNull; 640 | } 641 | } 642 | 643 | function validate(props, propName, componentName, location, propFullName) { 644 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) { 645 | var checker = arrayOfTypeCheckers[i]; 646 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) { 647 | return null; 648 | } 649 | } 650 | 651 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); 652 | } 653 | return createChainableTypeChecker(validate); 654 | } 655 | 656 | function createNodeChecker() { 657 | function validate(props, propName, componentName, location, propFullName) { 658 | if (!isNode(props[propName])) { 659 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); 660 | } 661 | return null; 662 | } 663 | return createChainableTypeChecker(validate); 664 | } 665 | 666 | function createShapeTypeChecker(shapeTypes) { 667 | function validate(props, propName, componentName, location, propFullName) { 668 | var propValue = props[propName]; 669 | var propType = getPropType(propValue); 670 | if (propType !== 'object') { 671 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 672 | } 673 | for (var key in shapeTypes) { 674 | var checker = shapeTypes[key]; 675 | if (!checker) { 676 | continue; 677 | } 678 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); 679 | if (error) { 680 | return error; 681 | } 682 | } 683 | return null; 684 | } 685 | return createChainableTypeChecker(validate); 686 | } 687 | 688 | function createStrictShapeTypeChecker(shapeTypes) { 689 | function validate(props, propName, componentName, location, propFullName) { 690 | var propValue = props[propName]; 691 | var propType = getPropType(propValue); 692 | if (propType !== 'object') { 693 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); 694 | } 695 | // We need to check all keys in case some are required but missing from 696 | // props. 697 | var allKeys = objectAssign({}, props[propName], shapeTypes); 698 | for (var key in allKeys) { 699 | var checker = shapeTypes[key]; 700 | if (!checker) { 701 | return new PropTypeError( 702 | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + 703 | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + 704 | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') 705 | ); 706 | } 707 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); 708 | if (error) { 709 | return error; 710 | } 711 | } 712 | return null; 713 | } 714 | 715 | return createChainableTypeChecker(validate); 716 | } 717 | 718 | function isNode(propValue) { 719 | switch (typeof propValue) { 720 | case 'number': 721 | case 'string': 722 | case 'undefined': 723 | return true; 724 | case 'boolean': 725 | return !propValue; 726 | case 'object': 727 | if (Array.isArray(propValue)) { 728 | return propValue.every(isNode); 729 | } 730 | if (propValue === null || isValidElement(propValue)) { 731 | return true; 732 | } 733 | 734 | var iteratorFn = getIteratorFn(propValue); 735 | if (iteratorFn) { 736 | var iterator = iteratorFn.call(propValue); 737 | var step; 738 | if (iteratorFn !== propValue.entries) { 739 | while (!(step = iterator.next()).done) { 740 | if (!isNode(step.value)) { 741 | return false; 742 | } 743 | } 744 | } else { 745 | // Iterator will provide entry [k,v] tuples rather than values. 746 | while (!(step = iterator.next()).done) { 747 | var entry = step.value; 748 | if (entry) { 749 | if (!isNode(entry[1])) { 750 | return false; 751 | } 752 | } 753 | } 754 | } 755 | } else { 756 | return false; 757 | } 758 | 759 | return true; 760 | default: 761 | return false; 762 | } 763 | } 764 | 765 | function isSymbol(propType, propValue) { 766 | // Native Symbol. 767 | if (propType === 'symbol') { 768 | return true; 769 | } 770 | 771 | // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' 772 | if (propValue['@@toStringTag'] === 'Symbol') { 773 | return true; 774 | } 775 | 776 | // Fallback for non-spec compliant Symbols which are polyfilled. 777 | if (typeof Symbol === 'function' && propValue instanceof Symbol) { 778 | return true; 779 | } 780 | 781 | return false; 782 | } 783 | 784 | // Equivalent of `typeof` but with special handling for array and regexp. 785 | function getPropType(propValue) { 786 | var propType = typeof propValue; 787 | if (Array.isArray(propValue)) { 788 | return 'array'; 789 | } 790 | if (propValue instanceof RegExp) { 791 | // Old webkits (at least until Android 4.0) return 'function' rather than 792 | // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ 793 | // passes PropTypes.object. 794 | return 'object'; 795 | } 796 | if (isSymbol(propType, propValue)) { 797 | return 'symbol'; 798 | } 799 | return propType; 800 | } 801 | 802 | // This handles more types than `getPropType`. Only used for error messages. 803 | // See `createPrimitiveTypeChecker`. 804 | function getPreciseType(propValue) { 805 | if (typeof propValue === 'undefined' || propValue === null) { 806 | return '' + propValue; 807 | } 808 | var propType = getPropType(propValue); 809 | if (propType === 'object') { 810 | if (propValue instanceof Date) { 811 | return 'date'; 812 | } else if (propValue instanceof RegExp) { 813 | return 'regexp'; 814 | } 815 | } 816 | return propType; 817 | } 818 | 819 | // Returns a string that is postfixed to a warning about an invalid type. 820 | // For example, "undefined" or "of type array" 821 | function getPostfixForTypeWarning(value) { 822 | var type = getPreciseType(value); 823 | switch (type) { 824 | case 'array': 825 | case 'object': 826 | return 'an ' + type; 827 | case 'boolean': 828 | case 'date': 829 | case 'regexp': 830 | return 'a ' + type; 831 | default: 832 | return type; 833 | } 834 | } 835 | 836 | // Returns class name of the object, if any. 837 | function getClassName(propValue) { 838 | if (!propValue.constructor || !propValue.constructor.name) { 839 | return ANONYMOUS; 840 | } 841 | return propValue.constructor.name; 842 | } 843 | 844 | ReactPropTypes.checkPropTypes = checkPropTypes_1; 845 | ReactPropTypes.PropTypes = ReactPropTypes; 846 | 847 | return ReactPropTypes; 848 | }; 849 | 850 | var propTypes = createCommonjsModule(function (module) { 851 | /** 852 | * Copyright (c) 2013-present, Facebook, Inc. 853 | * 854 | * This source code is licensed under the MIT license found in the 855 | * LICENSE file in the root directory of this source tree. 856 | */ 857 | 858 | { 859 | var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && 860 | Symbol.for && 861 | Symbol.for('react.element')) || 862 | 0xeac7; 863 | 864 | var isValidElement = function(object) { 865 | return typeof object === 'object' && 866 | object !== null && 867 | object.$$typeof === REACT_ELEMENT_TYPE; 868 | }; 869 | 870 | // By explicitly using `prop-types` you are opting into new development behavior. 871 | // http://fb.me/prop-types-in-prod 872 | var throwOnDirectAccess = true; 873 | module.exports = factoryWithTypeCheckers(isValidElement, throwOnDirectAccess); 874 | } 875 | }); 876 | 877 | var classnames = createCommonjsModule(function (module) { 878 | /*! 879 | Copyright (c) 2016 Jed Watson. 880 | Licensed under the MIT License (MIT), see 881 | http://jedwatson.github.io/classnames 882 | */ 883 | /* global define */ 884 | 885 | (function () { 886 | 887 | var hasOwn = {}.hasOwnProperty; 888 | 889 | function classNames () { 890 | var classes = []; 891 | 892 | for (var i = 0; i < arguments.length; i++) { 893 | var arg = arguments[i]; 894 | if (!arg) continue; 895 | 896 | var argType = typeof arg; 897 | 898 | if (argType === 'string' || argType === 'number') { 899 | classes.push(arg); 900 | } else if (Array.isArray(arg)) { 901 | classes.push(classNames.apply(null, arg)); 902 | } else if (argType === 'object') { 903 | for (var key in arg) { 904 | if (hasOwn.call(arg, key) && arg[key]) { 905 | classes.push(key); 906 | } 907 | } 908 | } 909 | } 910 | 911 | return classes.join(' '); 912 | } 913 | 914 | if ('object' !== 'undefined' && module.exports) { 915 | module.exports = classNames; 916 | } else if (typeof undefined === 'function' && typeof undefined.amd === 'object' && undefined.amd) { 917 | // register as 'classnames', consistent with npm package name 918 | undefined('classnames', [], function () { 919 | return classNames; 920 | }); 921 | } else { 922 | window.classNames = classNames; 923 | } 924 | }()); 925 | }); 926 | 927 | var clone_1 = createCommonjsModule(function (module) { 928 | var clone = (function() { 929 | 930 | function _instanceof(obj, type) { 931 | return type != null && obj instanceof type; 932 | } 933 | 934 | var nativeMap; 935 | try { 936 | nativeMap = Map; 937 | } catch(_) { 938 | // maybe a reference error because no `Map`. Give it a dummy value that no 939 | // value will ever be an instanceof. 940 | nativeMap = function() {}; 941 | } 942 | 943 | var nativeSet; 944 | try { 945 | nativeSet = Set; 946 | } catch(_) { 947 | nativeSet = function() {}; 948 | } 949 | 950 | var nativePromise; 951 | try { 952 | nativePromise = Promise; 953 | } catch(_) { 954 | nativePromise = function() {}; 955 | } 956 | 957 | /** 958 | * Clones (copies) an Object using deep copying. 959 | * 960 | * This function supports circular references by default, but if you are certain 961 | * there are no circular references in your object, you can save some CPU time 962 | * by calling clone(obj, false). 963 | * 964 | * Caution: if `circular` is false and `parent` contains circular references, 965 | * your program may enter an infinite loop and crash. 966 | * 967 | * @param `parent` - the object to be cloned 968 | * @param `circular` - set to true if the object to be cloned may contain 969 | * circular references. (optional - true by default) 970 | * @param `depth` - set to a number if the object is only to be cloned to 971 | * a particular depth. (optional - defaults to Infinity) 972 | * @param `prototype` - sets the prototype to be used when cloning an object. 973 | * (optional - defaults to parent prototype). 974 | * @param `includeNonEnumerable` - set to true if the non-enumerable properties 975 | * should be cloned as well. Non-enumerable properties on the prototype 976 | * chain will be ignored. (optional - false by default) 977 | */ 978 | function clone(parent, circular, depth, prototype, includeNonEnumerable) { 979 | if (typeof circular === 'object') { 980 | depth = circular.depth; 981 | prototype = circular.prototype; 982 | includeNonEnumerable = circular.includeNonEnumerable; 983 | circular = circular.circular; 984 | } 985 | // maintain two arrays for circular references, where corresponding parents 986 | // and children have the same index 987 | var allParents = []; 988 | var allChildren = []; 989 | 990 | var useBuffer = typeof Buffer != 'undefined'; 991 | 992 | if (typeof circular == 'undefined') 993 | circular = true; 994 | 995 | if (typeof depth == 'undefined') 996 | depth = Infinity; 997 | 998 | // recurse this function so we don't reset allParents and allChildren 999 | function _clone(parent, depth) { 1000 | // cloning null always returns null 1001 | if (parent === null) 1002 | return null; 1003 | 1004 | if (depth === 0) 1005 | return parent; 1006 | 1007 | var child; 1008 | var proto; 1009 | if (typeof parent != 'object') { 1010 | return parent; 1011 | } 1012 | 1013 | if (_instanceof(parent, nativeMap)) { 1014 | child = new nativeMap(); 1015 | } else if (_instanceof(parent, nativeSet)) { 1016 | child = new nativeSet(); 1017 | } else if (_instanceof(parent, nativePromise)) { 1018 | child = new nativePromise(function (resolve, reject) { 1019 | parent.then(function(value) { 1020 | resolve(_clone(value, depth - 1)); 1021 | }, function(err) { 1022 | reject(_clone(err, depth - 1)); 1023 | }); 1024 | }); 1025 | } else if (clone.__isArray(parent)) { 1026 | child = []; 1027 | } else if (clone.__isRegExp(parent)) { 1028 | child = new RegExp(parent.source, __getRegExpFlags(parent)); 1029 | if (parent.lastIndex) child.lastIndex = parent.lastIndex; 1030 | } else if (clone.__isDate(parent)) { 1031 | child = new Date(parent.getTime()); 1032 | } else if (useBuffer && Buffer.isBuffer(parent)) { 1033 | child = new Buffer(parent.length); 1034 | parent.copy(child); 1035 | return child; 1036 | } else if (_instanceof(parent, Error)) { 1037 | child = Object.create(parent); 1038 | } else { 1039 | if (typeof prototype == 'undefined') { 1040 | proto = Object.getPrototypeOf(parent); 1041 | child = Object.create(proto); 1042 | } 1043 | else { 1044 | child = Object.create(prototype); 1045 | proto = prototype; 1046 | } 1047 | } 1048 | 1049 | if (circular) { 1050 | var index = allParents.indexOf(parent); 1051 | 1052 | if (index != -1) { 1053 | return allChildren[index]; 1054 | } 1055 | allParents.push(parent); 1056 | allChildren.push(child); 1057 | } 1058 | 1059 | if (_instanceof(parent, nativeMap)) { 1060 | parent.forEach(function(value, key) { 1061 | var keyChild = _clone(key, depth - 1); 1062 | var valueChild = _clone(value, depth - 1); 1063 | child.set(keyChild, valueChild); 1064 | }); 1065 | } 1066 | if (_instanceof(parent, nativeSet)) { 1067 | parent.forEach(function(value) { 1068 | var entryChild = _clone(value, depth - 1); 1069 | child.add(entryChild); 1070 | }); 1071 | } 1072 | 1073 | for (var i in parent) { 1074 | var attrs; 1075 | if (proto) { 1076 | attrs = Object.getOwnPropertyDescriptor(proto, i); 1077 | } 1078 | 1079 | if (attrs && attrs.set == null) { 1080 | continue; 1081 | } 1082 | child[i] = _clone(parent[i], depth - 1); 1083 | } 1084 | 1085 | if (Object.getOwnPropertySymbols) { 1086 | var symbols = Object.getOwnPropertySymbols(parent); 1087 | for (var i = 0; i < symbols.length; i++) { 1088 | // Don't need to worry about cloning a symbol because it is a primitive, 1089 | // like a number or string. 1090 | var symbol = symbols[i]; 1091 | var descriptor = Object.getOwnPropertyDescriptor(parent, symbol); 1092 | if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { 1093 | continue; 1094 | } 1095 | child[symbol] = _clone(parent[symbol], depth - 1); 1096 | if (!descriptor.enumerable) { 1097 | Object.defineProperty(child, symbol, { 1098 | enumerable: false 1099 | }); 1100 | } 1101 | } 1102 | } 1103 | 1104 | if (includeNonEnumerable) { 1105 | var allPropertyNames = Object.getOwnPropertyNames(parent); 1106 | for (var i = 0; i < allPropertyNames.length; i++) { 1107 | var propertyName = allPropertyNames[i]; 1108 | var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName); 1109 | if (descriptor && descriptor.enumerable) { 1110 | continue; 1111 | } 1112 | child[propertyName] = _clone(parent[propertyName], depth - 1); 1113 | Object.defineProperty(child, propertyName, { 1114 | enumerable: false 1115 | }); 1116 | } 1117 | } 1118 | 1119 | return child; 1120 | } 1121 | 1122 | return _clone(parent, depth); 1123 | } 1124 | 1125 | /** 1126 | * Simple flat clone using prototype, accepts only objects, usefull for property 1127 | * override on FLAT configuration object (no nested props). 1128 | * 1129 | * USE WITH CAUTION! This may not behave as you wish if you do not know how this 1130 | * works. 1131 | */ 1132 | clone.clonePrototype = function clonePrototype(parent) { 1133 | if (parent === null) 1134 | return null; 1135 | 1136 | var c = function () {}; 1137 | c.prototype = parent; 1138 | return new c(); 1139 | }; 1140 | 1141 | // private utility functions 1142 | 1143 | function __objToStr(o) { 1144 | return Object.prototype.toString.call(o); 1145 | } 1146 | clone.__objToStr = __objToStr; 1147 | 1148 | function __isDate(o) { 1149 | return typeof o === 'object' && __objToStr(o) === '[object Date]'; 1150 | } 1151 | clone.__isDate = __isDate; 1152 | 1153 | function __isArray(o) { 1154 | return typeof o === 'object' && __objToStr(o) === '[object Array]'; 1155 | } 1156 | clone.__isArray = __isArray; 1157 | 1158 | function __isRegExp(o) { 1159 | return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; 1160 | } 1161 | clone.__isRegExp = __isRegExp; 1162 | 1163 | function __getRegExpFlags(re) { 1164 | var flags = ''; 1165 | if (re.global) flags += 'g'; 1166 | if (re.ignoreCase) flags += 'i'; 1167 | if (re.multiline) flags += 'm'; 1168 | return flags; 1169 | } 1170 | clone.__getRegExpFlags = __getRegExpFlags; 1171 | 1172 | return clone; 1173 | })(); 1174 | 1175 | if ('object' === 'object' && module.exports) { 1176 | module.exports = clone; 1177 | } 1178 | }); 1179 | 1180 | var css = ".PopupMenu_PopupMenu__8TfA4 {\n position: relative; }\n\n.PopupMenu_button__20m_Y {\n padding: 5px;\n border-radius: 2px;\n width: 30px;\n height: 30px;\n transition: background 0.25s ease-in-out; }\n .PopupMenu_button__20m_Y:hover, .PopupMenu_button__20m_Y.active {\n background: rgba(0, 0, 0, 0.1); }\n\n.PopupMenu_popover__3hd_Z {\n background: white;\n position: absolute;\n width: calc(200px - 10px);\n height: calc(200px - 10px);\n left: calc(-100px + 50%);\n top: 60px;\n border-radius: 5px;\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);\n transition: opacity 0.5s ease-in-out;\n opacity: 0;\n padding: 5px;\n z-index: 1; }\n .PopupMenu_popover__3hd_Z.active {\n opacity: 1; }\n .PopupMenu_popover__3hd_Z:hover + .PopupMenu_button__20m_Y {\n background: rgba(0, 0, 0, 0.1); }\n .PopupMenu_popover__3hd_Z:before {\n content: \"\";\n position: absolute;\n display: block;\n top: -20px;\n left: calc(50% - 10px);\n border: 10px solid white;\n border-color: transparent transparent white transparent; }\n\n.PopupMenu_direction-top__1oqgB .PopupMenu_popover__3hd_Z {\n top: auto;\n bottom: 60px; }\n .PopupMenu_direction-top__1oqgB .PopupMenu_popover__3hd_Z:before {\n top: auto;\n bottom: -20px;\n border-color: white transparent transparent transparent; }\n\n.PopupMenu_direction-left__mSrJK .PopupMenu_popover__3hd_Z {\n top: -100px;\n left: auto !important;\n right: 60px; }\n .PopupMenu_direction-left__mSrJK .PopupMenu_popover__3hd_Z:before {\n left: auto;\n right: -20px;\n top: calc(50% - 10px);\n border-color: transparent transparent transparent white; }\n\n.PopupMenu_direction-right__yrXfz .PopupMenu_popover__3hd_Z {\n top: -100px;\n right: auto !important;\n left: 60px !important; }\n .PopupMenu_direction-right__yrXfz .PopupMenu_popover__3hd_Z:before {\n right: auto;\n left: -20px;\n top: calc(50% - 10px);\n border-color: transparent white transparent transparent; }\n"; 1181 | var style = { "PopupMenu": "PopupMenu_PopupMenu__8TfA4", "button": "PopupMenu_button__20m_Y", "popover": "PopupMenu_popover__3hd_Z", "direction-top": "PopupMenu_direction-top__1oqgB", "direction-left": "PopupMenu_direction-left__mSrJK", "direction-right": "PopupMenu_direction-right__yrXfz" }; 1182 | __$$styleInject(css); 1183 | 1184 | var classCallCheck = function (instance, Constructor) { 1185 | if (!(instance instanceof Constructor)) { 1186 | throw new TypeError("Cannot call a class as a function"); 1187 | } 1188 | }; 1189 | 1190 | var createClass = function () { 1191 | function defineProperties(target, props) { 1192 | for (var i = 0; i < props.length; i++) { 1193 | var descriptor = props[i]; 1194 | descriptor.enumerable = descriptor.enumerable || false; 1195 | descriptor.configurable = true; 1196 | if ("value" in descriptor) descriptor.writable = true; 1197 | Object.defineProperty(target, descriptor.key, descriptor); 1198 | } 1199 | } 1200 | 1201 | return function (Constructor, protoProps, staticProps) { 1202 | if (protoProps) defineProperties(Constructor.prototype, protoProps); 1203 | if (staticProps) defineProperties(Constructor, staticProps); 1204 | return Constructor; 1205 | }; 1206 | }(); 1207 | 1208 | var _extends = Object.assign || function (target) { 1209 | for (var i = 1; i < arguments.length; i++) { 1210 | var source = arguments[i]; 1211 | 1212 | for (var key in source) { 1213 | if (Object.prototype.hasOwnProperty.call(source, key)) { 1214 | target[key] = source[key]; 1215 | } 1216 | } 1217 | } 1218 | 1219 | return target; 1220 | }; 1221 | 1222 | var inherits = function (subClass, superClass) { 1223 | if (typeof superClass !== "function" && superClass !== null) { 1224 | throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); 1225 | } 1226 | 1227 | subClass.prototype = Object.create(superClass && superClass.prototype, { 1228 | constructor: { 1229 | value: subClass, 1230 | enumerable: false, 1231 | writable: true, 1232 | configurable: true 1233 | } 1234 | }); 1235 | if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; 1236 | }; 1237 | 1238 | var possibleConstructorReturn = function (self, call) { 1239 | if (!self) { 1240 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 1241 | } 1242 | 1243 | return call && (typeof call === "object" || typeof call === "function") ? call : self; 1244 | }; 1245 | 1246 | var PopupMenu = function (_Component) { 1247 | inherits(PopupMenu, _Component); 1248 | createClass(PopupMenu, [{ 1249 | key: 'getChildContext', 1250 | value: function getChildContext() { 1251 | return { 1252 | popupWidth: this.props.width 1253 | }; 1254 | } 1255 | }]); 1256 | 1257 | function PopupMenu(props) { 1258 | classCallCheck(this, PopupMenu); 1259 | 1260 | var _this = possibleConstructorReturn(this, (PopupMenu.__proto__ || Object.getPrototypeOf(PopupMenu)).call(this, props)); 1261 | 1262 | _this.state = { 1263 | hovered: false, 1264 | displayable: false 1265 | }; 1266 | 1267 | _this.hover = function () { 1268 | clearTimeout(_this._diplayTimeout); 1269 | _this.setState({ hovered: true, displayable: true }); 1270 | }; 1271 | 1272 | _this.unhover = function () { 1273 | _this.setState({ hovered: false }); 1274 | _this._diplayTimeout = setTimeout(function () { 1275 | return _this.setState({ displayable: false }); 1276 | }, 500); 1277 | }; 1278 | 1279 | return _this; 1280 | } 1281 | 1282 | createClass(PopupMenu, [{ 1283 | key: 'configureStyles', 1284 | value: function configureStyles(props) { 1285 | return { 1286 | popover: _extends({ 1287 | width: 'calc(' + props.width + 'px - 10px)', 1288 | height: props.height === 'auto' ? 'auto' : 'calc(' + props.height + 'px - 10px)', 1289 | left: 'calc(' + -props.width / 2 + 'px + 50%)' 1290 | }, props.direction === 'left' || props.direction === 'right' ? { 1291 | top: 'calc(' + -props.height / 2 + 'px + 50%)' 1292 | } : {}) 1293 | }; 1294 | } 1295 | }, { 1296 | key: 'render', 1297 | value: function render$$1() { 1298 | var _state = this.state, 1299 | hovered = _state.hovered, 1300 | displayable = _state.displayable; 1301 | var direction = this.props.direction; 1302 | 1303 | 1304 | var styles = this.configureStyles(this.props); 1305 | 1306 | return React.createElement( 1307 | 'div', 1308 | { 1309 | className: classnames(style.PopupMenu, style['direction-' + direction]) 1310 | }, 1311 | React.createElement( 1312 | 'div', 1313 | { 1314 | onMouseOver: this.hover, 1315 | onMouseOut: this.unhover, 1316 | className: classnames(style.button, { 1317 | active: hovered 1318 | }) 1319 | }, 1320 | this.props.button 1321 | ), 1322 | React.createElement( 1323 | 'div', 1324 | { 1325 | onMouseOver: this.hover, 1326 | onMouseOut: this.unhover, 1327 | className: classnames(style.popover, { 1328 | active: hovered 1329 | }), 1330 | 1331 | style: _extends({}, styles.popover, { 1332 | visibility: displayable ? '' : 'hidden' 1333 | }) 1334 | }, 1335 | this.props.children 1336 | ) 1337 | ); 1338 | } 1339 | }]); 1340 | return PopupMenu; 1341 | }(Component); 1342 | PopupMenu.defaultProps = { 1343 | width: 200, 1344 | height: 'auto' 1345 | }; 1346 | PopupMenu.childContextTypes = { 1347 | popupWidth: propTypes.number 1348 | }; 1349 | 1350 | var css$1 = ".PopupTable_PopupTable__3fGcX {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n width: calc(200px - 10px);\n flex-flow: row wrap; }\n\n.PopupTable_item__1j75h {\n padding: 5px;\n border-radius: 2px;\n transition: background 0.15s ease-in-out; }\n .PopupTable_item__1j75h:hover {\n background: rgba(0, 0, 0, 0.1); }\n\n.PopupTable_placeholder__CKltF {\n padding: 0px;\n height: 10px;\n display: block;\n border-radius: 2px;\n visibility: hidden; }\n"; 1351 | var style$1 = { "PopupTable": "PopupTable_PopupTable__3fGcX", "item": "PopupTable_item__1j75h", "placeholder": "PopupTable_placeholder__CKltF" }; 1352 | __$$styleInject(css$1); 1353 | 1354 | var container = document.createElement('div'); 1355 | container.style.position = 'absolute'; 1356 | container.style.left = '-999999px'; 1357 | document.body.appendChild(container); 1358 | 1359 | var getSize = function getSize(element) { 1360 | var elementParent = document.createElement('div'); 1361 | container.appendChild(elementParent); 1362 | 1363 | return new Promise(function (resolve) { 1364 | render(element, elementParent, function () { 1365 | resolve({ 1366 | width: elementParent.firstChild.offsetWidth, 1367 | height: elementParent.firstChild.offsetHeight 1368 | }); 1369 | }); 1370 | }); 1371 | }; 1372 | 1373 | var PopupTable = function (_Component) { 1374 | inherits(PopupTable, _Component); 1375 | 1376 | function PopupTable(props, context) { 1377 | classCallCheck(this, PopupTable); 1378 | 1379 | var _this = possibleConstructorReturn(this, (PopupTable.__proto__ || Object.getPrototypeOf(PopupTable)).call(this, props, context)); 1380 | 1381 | _this.sizes = []; 1382 | _this.wait = []; 1383 | 1384 | _this.updateLayout(); 1385 | return _this; 1386 | } 1387 | 1388 | createClass(PopupTable, [{ 1389 | key: 'updateLayout', 1390 | value: function updateLayout() { 1391 | var _this2 = this; 1392 | 1393 | this.items = this.props.children.length % this.props.rowItems; 1394 | 1395 | this.children = this.props.children.map(function (component) { 1396 | _this2.wait.push(getSize(component)); 1397 | return React.cloneElement(component); 1398 | }); 1399 | 1400 | Promise.all(this.wait).then(function (sizes) { 1401 | _this2.sizes = sizes; 1402 | _this2.forceUpdate(); 1403 | }); 1404 | } 1405 | }, { 1406 | key: 'render', 1407 | value: function render$$1() { 1408 | var rowItems = this.props.rowItems; 1409 | var children = this.children, 1410 | sizes = this.sizes, 1411 | items = this.items; 1412 | 1413 | 1414 | if (sizes.length < 1) return null; 1415 | 1416 | var width = this.context.popupWidth || 200; 1417 | 1418 | if (children.length % rowItems !== 0) { 1419 | var contentSize = sizes.slice(-items).reduce(function (size, _ref) { 1420 | var width = _ref.width; 1421 | return size + width + 10; 1422 | }, 0); 1423 | 1424 | var margin = (width - rowItems * (contentSize / items)) / rowItems; 1425 | 1426 | children.push(React.createElement('div', { 1427 | style: { 1428 | width: width - contentSize - margin * rowItems 1429 | } 1430 | })); 1431 | } 1432 | 1433 | return React.createElement( 1434 | 'div', 1435 | { 1436 | className: style$1.PopupTable, 1437 | style: { width: 'calc(' + width + 'px - 10px)' } 1438 | }, 1439 | children.map(function (child, i) { 1440 | return React.createElement( 1441 | 'div', 1442 | { key: i, className: i === children.length - 1 && items > 0 ? style$1.placeholder : style$1.item }, 1443 | child 1444 | ); 1445 | }) 1446 | ); 1447 | } 1448 | }]); 1449 | return PopupTable; 1450 | }(Component); 1451 | PopupTable.defaultProps = { 1452 | rowItems: 1 1453 | }; 1454 | PopupTable.contextTypes = { 1455 | popupWidth: propTypes.number 1456 | }; 1457 | 1458 | var PopupText = function (_Component) { 1459 | inherits(PopupText, _Component); 1460 | 1461 | function PopupText() { 1462 | classCallCheck(this, PopupText); 1463 | return possibleConstructorReturn(this, (PopupText.__proto__ || Object.getPrototypeOf(PopupText)).apply(this, arguments)); 1464 | } 1465 | 1466 | createClass(PopupText, [{ 1467 | key: 'render', 1468 | value: function render$$1() { 1469 | return React.createElement( 1470 | 'div', 1471 | { style: { padding: '3px 7px' } }, 1472 | React.createElement( 1473 | 'span', 1474 | null, 1475 | this.props.children 1476 | ) 1477 | ); 1478 | } 1479 | }]); 1480 | return PopupText; 1481 | }(Component); 1482 | 1483 | export { PopupMenu, PopupTable, PopupText }; 1484 | //# sourceMappingURL=rrpm.module.js.map 1485 | -------------------------------------------------------------------------------- /build/rrpm.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"rrpm.module.js","sources":["../node_modules/fbjs/lib/emptyFunction.js","../node_modules/fbjs/lib/invariant.js","../node_modules/fbjs/lib/warning.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/checkPropTypes.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/index.js","../node_modules/classnames/index.js","../node_modules/clone/clone.js","../src/PopupMenu.js","../src/PopupTable.js","../src/PopupText.js"],"sourcesContent":["\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","var clone = (function() {\n'use strict';\n\nfunction _instanceof(obj, type) {\n return type != null && obj instanceof type;\n}\n\nvar nativeMap;\ntry {\n nativeMap = Map;\n} catch(_) {\n // maybe a reference error because no `Map`. Give it a dummy value that no\n // value will ever be an instanceof.\n nativeMap = function() {};\n}\n\nvar nativeSet;\ntry {\n nativeSet = Set;\n} catch(_) {\n nativeSet = function() {};\n}\n\nvar nativePromise;\ntry {\n nativePromise = Promise;\n} catch(_) {\n nativePromise = function() {};\n}\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n * @param `includeNonEnumerable` - set to true if the non-enumerable properties\n * should be cloned as well. Non-enumerable properties on the prototype\n * chain will be ignored. (optional - false by default)\n*/\nfunction clone(parent, circular, depth, prototype, includeNonEnumerable) {\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n includeNonEnumerable = circular.includeNonEnumerable;\n circular = circular.circular;\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth === 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (_instanceof(parent, nativeMap)) {\n child = new nativeMap();\n } else if (_instanceof(parent, nativeSet)) {\n child = new nativeSet();\n } else if (_instanceof(parent, nativePromise)) {\n child = new nativePromise(function (resolve, reject) {\n parent.then(function(value) {\n resolve(_clone(value, depth - 1));\n }, function(err) {\n reject(_clone(err, depth - 1));\n });\n });\n } else if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n child = new Buffer(parent.length);\n parent.copy(child);\n return child;\n } else if (_instanceof(parent, Error)) {\n child = Object.create(parent);\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n if (_instanceof(parent, nativeMap)) {\n parent.forEach(function(value, key) {\n var keyChild = _clone(key, depth - 1);\n var valueChild = _clone(value, depth - 1);\n child.set(keyChild, valueChild);\n });\n }\n if (_instanceof(parent, nativeSet)) {\n parent.forEach(function(value) {\n var entryChild = _clone(value, depth - 1);\n child.add(entryChild);\n });\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(parent);\n for (var i = 0; i < symbols.length; i++) {\n // Don't need to worry about cloning a symbol because it is a primitive,\n // like a number or string.\n var symbol = symbols[i];\n var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);\n if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {\n continue;\n }\n child[symbol] = _clone(parent[symbol], depth - 1);\n if (!descriptor.enumerable) {\n Object.defineProperty(child, symbol, {\n enumerable: false\n });\n }\n }\n }\n\n if (includeNonEnumerable) {\n var allPropertyNames = Object.getOwnPropertyNames(parent);\n for (var i = 0; i < allPropertyNames.length; i++) {\n var propertyName = allPropertyNames[i];\n var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);\n if (descriptor && descriptor.enumerable) {\n continue;\n }\n child[propertyName] = _clone(parent[propertyName], depth - 1);\n Object.defineProperty(child, propertyName, {\n enumerable: false\n });\n }\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n}\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n}\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n}\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n}\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n}\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport clone from 'clone';\n\nimport style from './PopupMenu.scss';\n\nexport class PopupMenu extends Component {\n static defaultProps = {\n width: 200,\n height: 'auto'\n };\n\n state = {\n hovered: false,\n displayable: false\n };\n\n static childContextTypes = {\n popupWidth: PropTypes.number\n };\n\n getChildContext() {\n return {\n popupWidth: this.props.width\n };\n }\n\n constructor(props) {\n super(props);\n }\n\n hover = () => {\n clearTimeout(this._diplayTimeout);\n this.setState({hovered: true, displayable: true});\n };\n\n unhover = () => {\n this.setState({hovered: false});\n this._diplayTimeout = setTimeout(() => this.setState({displayable: false}), 500);\n };\n\n configureStyles(props) {\n return {\n popover: {\n width: `calc(${props.width}px - 10px)`,\n height: props.height === 'auto' ? 'auto' : `calc(${props.height}px - 10px)`,\n left: `calc(${-props.width / 2}px + 50%)`,\n ...(props.direction === 'left' || props.direction === 'right' ? {\n top: `calc(${-props.height / 2}px + 50%)`\n } : {})\n }\n };\n }\n\n render() {\n const {hovered, displayable} = this.state;\n const {direction} = this.props;\n\n const styles = this.configureStyles(this.props);\n\n return (\n \n \n {this.props.button}\n \n \n {this.props.children}\n \n \n )\n }\n}\n","import React, {Component} from 'react';\nimport {render} from 'react-dom';\nimport PropTypes from 'prop-types';\n\nimport style from './PopupTable.scss';\n\nconst container = document.createElement('div');\ncontainer.style.position = 'absolute';\ncontainer.style.left = '-999999px';\ndocument.body.appendChild(container);\n\nconst getSize = (element) => {\n const elementParent = document.createElement('div');\n container.appendChild(elementParent);\n\n return new Promise(resolve => {\n render(element, elementParent, () => {\n resolve({\n width: elementParent.firstChild.offsetWidth,\n height: elementParent.firstChild.offsetHeight\n });\n })\n });\n}\n\nexport class PopupTable extends Component {\n constructor(props, context) {\n super(props, context);\n\n this.sizes = [];\n this.wait = [];\n\n this.updateLayout();\n }\n\n updateLayout() {\n this.items = this.props.children.length % this.props.rowItems;\n\n this.children = this.props.children.map((component) => {\n this.wait.push(getSize(component));\n return React.cloneElement(component);\n });\n\n Promise.all(this.wait).then((sizes) => {\n this.sizes = sizes;\n this.forceUpdate();\n });\n }\n\n static defaultProps = {\n rowItems: 1\n };\n\n static contextTypes = {\n popupWidth: PropTypes.number\n };\n\n render() {\n const {rowItems} = this.props;\n const {children, sizes, items} = this;\n\n if (sizes.length < 1) return null;\n\n const width = this.context.popupWidth || 200;\n\n if (children.length % rowItems !== 0) {\n const contentSize = sizes\n .slice(-items)\n .reduce((size, {width}) => size + width + 10, 0);\n\n const margin = (width - rowItems * (contentSize / items)) / (rowItems);\n\n children.push(\n \n );\n }\n\n return (\n \n {children.map((child, i) => (\n
0 ? style.placeholder : style.item}>\n {child}\n
\n ))}\n \n );\n }\n}\n","import React, {Component} from 'react';\n\nexport class PopupText extends Component {\n render() {\n return (\n
\n {this.props.children}\n
\n )\n }\n}\n"],"names":["emptyFunction","invariant","require$$0","warning","require$$1","ReactPropTypesSecret","require$$2","assign","checkPropTypes","define","PopupMenu","props","width","state","hover","_diplayTimeout","setState","hovered","displayable","unhover","setTimeout","height","direction","styles","configureStyles","cx","style","button","popover","children","Component","defaultProps","childContextTypes","PropTypes","number","container","document","createElement","position","left","body","appendChild","getSize","element","elementParent","Promise","firstChild","offsetWidth","offsetHeight","PopupTable","context","sizes","wait","updateLayout","items","length","rowItems","map","component","push","React","cloneElement","all","then","forceUpdate","popupWidth","contentSize","slice","reduce","size","margin","child","i","placeholder","item","contextTypes","PopupText","padding"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,iBAAiB,CAAC,GAAG,EAAE;EAC9B,OAAO,YAAY;IACjB,OAAO,GAAG,CAAC;GACZ,CAAC;CACH;;;;;;;AAOD,IAAI,aAAa,GAAG,SAAS,aAAa,GAAG,EAAE,CAAC;;AAEhD,aAAa,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAC9C,aAAa,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,KAAK,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C,QAAMgD,IAA3F;;WADY;SAAb;OALL;;;;EAxD4B5C,SAAhC;AAAamB,WAwBJlB,eAAe;YACV;;AAzBDkB,WA4BJ0B,eAAe;cACR1C,UAAUC;;;ICpDb0C,SAAb;;;;;;;;;;gCACW;aAEL;;UAAK,OAAO,EAACC,SAAS,SAAV,EAAZ;;;;eACclE,KAAL,CAAWkB;;OAFtB;;;;EAF2BC,SAA/B;;;;"} -------------------------------------------------------------------------------- /examples/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015"] 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /examples/css/style.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Oxygen'); 2 | 3 | body { 4 | background: #F0CA4D; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | .centered { 10 | position: absolute; 11 | left: calc(50% - 15px); 12 | top: 30%; 13 | } 14 | 15 | #sidebar { 16 | background: transparent; 17 | position: fixed; 18 | width: 100%; 19 | height: 120px; 20 | left: 0; 21 | padding: 50px 60px; 22 | /* border-top: 6px solid #3e3e3e0d; */ 23 | z-index: 1; 24 | bottom: 0; 25 | } 26 | 27 | #sidebar ul { 28 | padding: 0; 29 | list-style: none; 30 | width: 230px; 31 | } 32 | 33 | #sidebar li { 34 | background: #F0CA4D; 35 | padding: 5px 10px; 36 | border-radius: 5px; 37 | transition: all 0.3s linear; 38 | } 39 | 40 | #sidebar li:hover { 41 | background: #f0b64d; 42 | } 43 | 44 | #sidebar a { 45 | color: white; 46 | text-decoration: none; 47 | font-family: 'Oxygen', sans-serif; 48 | font-size: 16pt; 49 | line-height: 2; 50 | letter-spacing: 0.3px; 51 | } 52 | 53 | #sidebar a:before { 54 | content: "[/]"; 55 | text-shadow: 1px 1px rgba(0,0,0,0.2); 56 | vertical-align: text-bottom; 57 | display: inline; 58 | color: #eee; 59 | font-size: 10pt; 60 | padding-right: 10px; 61 | } 62 | 63 | #sidebar a:after { 64 | content: " (class)"; 65 | text-shadow: 0.5px 0.5px #aaa; 66 | color: #333333; 67 | font-size: 12pt; 68 | padding-left: 10px; 69 | } 70 | 71 | iframe { 72 | border: none; 73 | position: fixed; 74 | top: 0; 75 | right: 0; 76 | left: 0; 77 | height: calc(100% - 220px); 78 | width: 100%; 79 | } 80 | -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "examples", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "babel-loader": "^7.1.2", 13 | "babel-preset-react": "^6.24.1", 14 | "babel-register": "^6.26.0", 15 | "express": "^4.16.2", 16 | "webpack": "^3.11.0", 17 | "webpack-dev-server": "^2.11.1" 18 | }, 19 | "dependencies": { 20 | "font-awesome": "^4.7.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/popup_table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/popup_text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/src/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", {"modules": false}], 4 | "react" 5 | ], 6 | "plugins": [ 7 | "transform-class-properties", 8 | "transform-object-rest-spread" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /examples/src/index.js: -------------------------------------------------------------------------------- 1 | import React, {Fragment} from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import FontAwesome from 'react-fontawesome'; 4 | import {PopupMenu, PopupTable} from 'react-rectangle-popup-menu'; 5 | 6 | import 'font-awesome/css/font-awesome.css'; 7 | 8 | const button = (); 9 | 10 | const Application = () => ( 11 | 12 | 18 |