From 67076f6e1dfe64573b529c1b0b08177dd92b0885 Mon Sep 17 00:00:00 2001 From: Yury Dymov Date: Thu, 15 Sep 2016 10:11:30 +0000 Subject: [PATCH] initial release --- .eslintrc | 263 +--------- .gitignore | 2 +- .npmignore | 8 + .travis.yml | 14 + README.md | 85 ++++ demo/.babelrc | 3 + demo/dist/bootstrap.css | 520 ++++++++++++++++++++ demo/dist/index.html | 59 +++ demo/dist/main.js | 24 + demo/package.json | 25 + demo/src/index.js | 107 ++++ demo/webpack.config.js | 29 ++ docs/rbtp.png | Bin 0 -> 7082 bytes package.json | 53 +- src/ReactBootstrapTimePicker.jsx | 103 ++++ src/index.js | 90 +--- test/ReactBootstrapTimePicker.spec.js | 184 +++++++ webpack.config.prod.js => webpack.config.js | 7 +- 18 files changed, 1211 insertions(+), 365 deletions(-) create mode 100644 .travis.yml create mode 100644 README.md create mode 100644 demo/.babelrc create mode 100644 demo/dist/bootstrap.css create mode 100644 demo/dist/index.html create mode 100644 demo/dist/main.js create mode 100644 demo/package.json create mode 100644 demo/src/index.js create mode 100644 demo/webpack.config.js create mode 100644 docs/rbtp.png create mode 100644 src/ReactBootstrapTimePicker.jsx create mode 100644 test/ReactBootstrapTimePicker.spec.js rename webpack.config.prod.js => webpack.config.js (85%) diff --git a/.eslintrc b/.eslintrc index bba235b..71e250c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,257 +1,10 @@ { - "parser": "babel-eslint", - - "plugins": [ - "react" - ], - - "env": { - "browser": true, - "node": true, - "mocha": true, - "es6": true - }, - - "ecmaFeatures": { - "arrowFunctions": true, - "blockBindings": true, - "classes": true, - "defaultParams": true, - "destructuring": true, - "forOf": true, - "generators": false, - "modules": true, - "objectLiteralComputedProperties": true, - "objectLiteralDuplicateProperties": false, - "objectLiteralShorthandMethods": true, - "objectLiteralShorthandProperties": true, - "restParams": true, - "spread": true, - "superInFunctions": true, - "templateStrings": true, - "jsx": true - }, - - "rules":{ - // Possible errors - "no-cond-assign": [2, "always"], - "no-constant-condition": 2, - "no-control-regex": 2, - "no-dupe-args": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty": 2, - "no-ex-assign": 2, - "no-extra-boolean-cast": 0, - "no-extra-parens": [2, "functions"], - "no-extra-semi": 2, - "no-func-assign": 2, - "no-inner-declarations": 2, - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-negated-in-lhs": 2, - "no-obj-calls": 2, - "no-regex-spaces": 2, - "no-sparse-arrays": 2, - "no-unreachable": 2, - "use-isnan": 2, - "valid-typeof": 2, - "no-unexpected-multiline": 0, - - // Best Practices - "block-scoped-var": 2, - "complexity": [2, 40], - "curly": [2, "multi-line"], - "default-case": 2, - "dot-notation": [2, { "allowKeywords": true }], - "eqeqeq": 2, - "guard-for-in": 2, - "no-alert": 1, - "no-caller": 2, - "no-case-declarations": 2, - "no-div-regex": 0, - "no-else-return": 2, - "no-eq-null": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-implied-eval": 2, - "no-iterator": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-loop-func": 2, -// "no-multi-spaces": [2, { exceptions: { "VariableDeclarator": true, "ImportDeclaration": true } }], - "no-multi-str": 2, - "no-native-reassign": 2, - "no-new": 2, - "no-new-func": 2, - "no-new-wrappers": 2, - "no-octal": 2, - "no-octal-escape": 2, - "no-param-reassign": [2, { "props": true }], - "no-proto": 2, - "no-redeclare": 2, - "no-script-url": 2, - "no-self-compare": 2, - "no-sequences": 2, -// "no-throw-literal": 2, - "no-unused-expressions": 2, - "no-useless-call": 2, - "no-with": 2, - "radix": 2, - "wrap-iife": [2, "outside"], - "yoda": 2, - - // ES2015 - "arrow-parens": 0, - "arrow-spacing": [2, { "before": true, "after": true }], - "constructor-super": 2, - "no-class-assign": 2, - "no-const-assign": 2, - "no-this-before-super": 0, - "no-var": 2, - "object-shorthand": [2, "always"], - "prefer-arrow-callback": 2, - "prefer-const": 2, - "prefer-spread": 2, - "prefer-template": 2, - - // Strict Mode - "strict": [2, "never"], - - // Variables - "no-catch-shadow": 2, - "no-delete-var": 2, - "no-label-var": 2, - "no-shadow-restricted-names": 2, - "no-shadow": 2, - "no-undef-init": 2, - "no-undef": 2, - "no-unused-vars": 2, - - // Node.js - "callback-return": 2, - "no-mixed-requires": 2, - "no-path-concat": 2, - "no-sync": 2, - "handle-callback-err": 1, - "no-new-require": 2, - - // Stylistic - "array-bracket-spacing": [2, "never", { - "singleValue": true, - "objectsInArrays": true, - "arraysInArrays": true - }], - "newline-after-var": [1, "always"], - "camelcase": [2, { "properties": "always" }], - "comma-spacing": [2, { "before": false, "after": true }], - "comma-style": [2, "last"], - "computed-property-spacing": [2, "never"], - "eol-last": 2, - "func-names": 1, - "func-style": [2, "declaration"], - "indent": [2, 2, { "SwitchCase": 1 }], - "jsx-quotes": [2, "prefer-single"], - // "key-spacing": [2, { - // "singleLine": { - // "beforeColon": false, - // "afterColon": true - // }, - // "multiLine": { - // "beforeColon": true, - // "afterColon": true, - // "align": "colon" - // } - // }], - "linebreak-style": [2, "unix"], - "max-len": [2, 128, 4, { - "ignoreUrls": true, - "ignoreComments": false - }], - "max-nested-callbacks": [2, 4], - "new-parens": 2, - "no-array-constructor": 2, - "no-lonely-if": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multiple-empty-lines": [2, { "max": 2, "maxEOF": 1 }], - "no-nested-ternary": 2, - "no-new-object": 2, - "no-spaced-func": 2, - "no-trailing-spaces": 2, - "no-unneeded-ternary": 2, - "object-curly-spacing": [2, "always"], - "one-var": [2, "never"], - "padded-blocks": [2, "never"], - "quotes": [1, "single", "avoid-escape"], - "semi-spacing": [2, { "before": false, "after": true }], - "semi": [2, "always"], - "keyword-spacing": 2, - "space-before-blocks": 2, - "space-before-function-paren": [2, { "anonymous": "always", "named": "never" }], - "space-in-parens": [2, "never"], - "space-infix-ops": 2, - "space-unary-ops": [2, { "words": true, "nonwords": false }], - "spaced-comment": [2, "always", { - "exceptions": ["-", "+"], - "markers": ["=", "!"] - }], - - // React - "react/jsx-boolean-value": 2, - "react/jsx-closing-bracket-location": 2, - "react/jsx-curly-spacing": [2, "never"], - "react/jsx-handler-names": 2, - "react/jsx-indent-props": [2, 2], - "react/jsx-indent": [2, 2], - "react/jsx-key": 2, - "react/jsx-max-props-per-line": [2, {maximum: 3}], - "react/jsx-no-bind": [2, { - "ignoreRefs": true, - "allowBind": true, - "allowArrowFunctions": true - }], - "react/jsx-no-duplicate-props": 2, - "react/jsx-no-undef": 2, - "react/jsx-pascal-case": 2, - "react/jsx-uses-react": 2, - "react/jsx-uses-vars": 2, -// "react/no-danger": 2, - "react/no-deprecated": 2, - "react/no-did-mount-set-state": 0, - "react/no-did-update-set-state": 2, - "react/no-direct-mutation-state": 2, - "react/no-is-mounted": 2, - "react/no-multi-comp": 2, - "react/no-string-refs": 2, - "react/no-unknown-property": 2, - "react/prefer-es6-class": 2, - "react/prop-types": 2, - "react/react-in-jsx-scope": 2, - "react/self-closing-comp": 2, - "react/sort-comp": [2, { - "order": [ - "lifecycle", - "/^handle.+$/", - "/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/", - "everything-else", - "/^render.+$/", - "render" - ] - }], - "react/wrap-multilines": 2, - - // Legacy - "max-depth": [0, 4], - "max-params": [2, 4], - "no-bitwise": 2 - }, - - "globals":{ - "$": true, - "ga": true - } + "extends": "airbnb", + "parser": "babel-eslint", + "rules": { + "key-spacing": [0], + "no-empty": [0], + "no-multi-spaces": [0], + "react/jsx-equals-spacing": [0] + } } diff --git a/.gitignore b/.gitignore index a113566..bb0b80f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,4 @@ jspm_packages # Optional REPL history .node_repl_history .idea -dist +/dist diff --git a/.npmignore b/.npmignore index bfa9926..e31e203 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,10 @@ .idea +coverage +demo +docs src +test +.babelrc +.eslintrc +.travis.yml +webpack.config.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..57670fe --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: node_js +node_js: + - "6" + - "5" + - "4" + - "node" +env: + - CXX=g++-4.8 +before_install: + - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + - sudo apt-get -qq update + - sudo apt-get -qq install g++-4.8 +install: "npm install && npm run build" +after_success: "npm install -g coveralls && npm run coverage && cat ./coverage/lcov.info | coveralls" diff --git a/README.md b/README.md new file mode 100644 index 0000000..8976243 --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# react-bootstrap-time-picker +Time Picker with bootstrap flavor + +[![react-bootstrap-time-picker](https://github.com/yury-dymov/react-bootstrap-time-picker/raw/master/docs/rbtp.png)](https://github.com/yury-dymov/react-bootstrap-time-picker) + +[![npm version](https://img.shields.io/npm/v/react-bootstrap-time-picker.svg?style=flat)](https://www.npmjs.com/package/react-bootstrap-time-picker) +[![Downloads](http://img.shields.io/npm/dm/react-bootstrap-time-picker.svg?style=flat-square)](https://npmjs.org/package/react-bootstrap-time-picker) +[![Build Status](https://img.shields.io/travis/yury-dymov/react-bootstrap-time-picker/master.svg?style=flat)](https://travis-ci.org/yury-dymov/react-bootstrap-time-picker) +[![Coverage Status](https://coveralls.io/repos/github/yury-dymov/react-bootstrap-time-picker/badge.svg?branch=master)](https://coveralls.io/github/yury-dymov/react-bootstrap-time-picker?branch=master) + +# Demo +Demo and playground are available [here](https://yury-dymov.github.io/react-bootstrap-time-picker/) + +# Usage Example +``` +import TimePicker from 'react-bootstrap-time-picker'; + + +``` + +# Configurable Props +*Note*: All props are optional. + +### end: string, default "23:59" +Time Picker renders options with range between `start` and `end` time values with `step` (inclusive). + +Should be provided in the following format: "HH?(:mm?(:ss?))". + +#### Valid examples +"4", "04", "4:0", "04:00", "4:0:0", "04:00:00". All these are equal to "4 hours". + +#### Invalid example +"11:00 PM". Should be provided in 24-hour format only + +### format: number, default "23:59" +Time Format of rendered options. Supported values: `12` or `24`. + +### initialValue: any, default: "00:00" +Initial selected option. Used if `value` prop is either `undefined` or `null`. Can be provided either in "HH?(:mm?(:ss?))" format or as int `(hours * 3600 + minutes * 60 + seconds)`. If `initialValue` is less than `start` property value, then `start` value is used instead. + +#### Valid examples +"1:00", "01:00", "3600", 3600 + +#### Invalid examples +"11:00 PM" + +### onChange: func, default: () => {} +Function, which is triggered after one of options is selected. Return selected time in int format: `(hours * 3600 + minutes * 60 + seconds)`. + +#### Example +``` +class Parent extends React.Component { + constructor() { + super(); + + this.handleTimeChange = this.handleTimeChange.bind(this); + + this.state = { time: 0 }; + } + + handleTimeChange(time) { + console.log(time); // <- prints "3600" if "01:00" is picked + this.setState({ time }); + } + + render() { + return .dropdown-toggle.btn-default { + color: #ffffff; + background-color: #798d8f; + border-color: #74898a; +} + +.btn-default:active:hover, +.btn-default.active:hover, +.open > .dropdown-toggle.btn-default:hover, +.btn-default:active:focus, +.btn-default.active:focus, +.open > .dropdown-toggle.btn-default:focus, +.btn-default:active.focus, +.btn-default.active.focus, +.open > .dropdown-toggle.btn-default.focus { + color: #ffffff; + background-color: #687b7c; + border-color: #566566; +} +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; +} +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +fieldset[disabled] .btn-default:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +fieldset[disabled] .btn-default:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus, +fieldset[disabled] .btn-default.focus { + background-color: #95a5a6; + border-color: #95a5a6; +} +.btn-default .badge { + color: #95a5a6; + background-color: #ffffff; +} +.btn-primary { + color: #ffffff; + background-color: #2c3e50; + border-color: #2c3e50; +} +.btn-primary:focus, +.btn-primary.focus { + color: #ffffff; + background-color: #1a242f; + border-color: #000000; +} +.btn-primary:hover { + color: #ffffff; + background-color: #1a242f; + border-color: #161f29; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + color: #ffffff; + background-color: #1a242f; + border-color: #161f29; +} +.btn-primary:active:hover, +.btn-primary.active:hover, +.open > .dropdown-toggle.btn-primary:hover, +.btn-primary:active:focus, +.btn-primary.active:focus, +.open > .dropdown-toggle.btn-primary:focus, +.btn-primary:active.focus, +.btn-primary.active.focus, +.open > .dropdown-toggle.btn-primary.focus { + color: #ffffff; + background-color: #0d1318; + border-color: #000000; +} +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; +} +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +fieldset[disabled] .btn-primary:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +fieldset[disabled] .btn-primary:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus, +fieldset[disabled] .btn-primary.focus { + background-color: #2c3e50; + border-color: #2c3e50; +} +.btn-primary .badge { + color: #2c3e50; + background-color: #ffffff; +} +.btn-success { + color: #ffffff; + background-color: #18bc9c; + border-color: #18bc9c; +} +.btn-success:focus, +.btn-success.focus { + color: #ffffff; + background-color: #128f76; + border-color: #0a4b3e; +} +.btn-success:hover { + color: #ffffff; + background-color: #128f76; + border-color: #11866f; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #ffffff; + background-color: #128f76; + border-color: #11866f; +} +.btn-success:active:hover, +.btn-success.active:hover, +.open > .dropdown-toggle.btn-success:hover, +.btn-success:active:focus, +.btn-success.active:focus, +.open > .dropdown-toggle.btn-success:focus, +.btn-success:active.focus, +.btn-success.active.focus, +.open > .dropdown-toggle.btn-success.focus { + color: #ffffff; + background-color: #0e6f5c; + border-color: #0a4b3e; +} +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; +} +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +fieldset[disabled] .btn-success:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +fieldset[disabled] .btn-success:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus, +fieldset[disabled] .btn-success.focus { + background-color: #18bc9c; + border-color: #18bc9c; +} +.btn-success .badge { + color: #18bc9c; + background-color: #ffffff; +} +.btn-info { + color: #ffffff; + background-color: #3498db; + border-color: #3498db; +} +.btn-info:focus, +.btn-info.focus { + color: #ffffff; + background-color: #217dbb; + border-color: #16527a; +} +.btn-info:hover { + color: #ffffff; + background-color: #217dbb; + border-color: #2077b2; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #ffffff; + background-color: #217dbb; + border-color: #2077b2; +} +.btn-info:active:hover, +.btn-info.active:hover, +.open > .dropdown-toggle.btn-info:hover, +.btn-info:active:focus, +.btn-info.active:focus, +.open > .dropdown-toggle.btn-info:focus, +.btn-info:active.focus, +.btn-info.active.focus, +.open > .dropdown-toggle.btn-info.focus { + color: #ffffff; + background-color: #1c699d; + border-color: #16527a; +} +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; +} +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +fieldset[disabled] .btn-info:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +fieldset[disabled] .btn-info:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus, +fieldset[disabled] .btn-info.focus { + background-color: #3498db; + border-color: #3498db; +} +.btn-info .badge { + color: #3498db; + background-color: #ffffff; +} +.btn-warning { + color: #ffffff; + background-color: #f39c12; + border-color: #f39c12; +} +.btn-warning:focus, +.btn-warning.focus { + color: #ffffff; + background-color: #c87f0a; + border-color: #7f5006; +} +.btn-warning:hover { + color: #ffffff; + background-color: #c87f0a; + border-color: #be780a; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #ffffff; + background-color: #c87f0a; + border-color: #be780a; +} +.btn-warning:active:hover, +.btn-warning.active:hover, +.open > .dropdown-toggle.btn-warning:hover, +.btn-warning:active:focus, +.btn-warning.active:focus, +.open > .dropdown-toggle.btn-warning:focus, +.btn-warning:active.focus, +.btn-warning.active.focus, +.open > .dropdown-toggle.btn-warning.focus { + color: #ffffff; + background-color: #a66908; + border-color: #7f5006; +} +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; +} +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +fieldset[disabled] .btn-warning:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +fieldset[disabled] .btn-warning:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus, +fieldset[disabled] .btn-warning.focus { + background-color: #f39c12; + border-color: #f39c12; +} +.btn-warning .badge { + color: #f39c12; + background-color: #ffffff; +} +.btn-danger { + color: #ffffff; + background-color: #e74c3c; + border-color: #e74c3c; +} +.btn-danger:focus, +.btn-danger.focus { + color: #ffffff; + background-color: #d62c1a; + border-color: #921e12; +} +.btn-danger:hover { + color: #ffffff; + background-color: #d62c1a; + border-color: #cd2a19; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + color: #ffffff; + background-color: #d62c1a; + border-color: #cd2a19; +} +.btn-danger:active:hover, +.btn-danger.active:hover, +.open > .dropdown-toggle.btn-danger:hover, +.btn-danger:active:focus, +.btn-danger.active:focus, +.open > .dropdown-toggle.btn-danger:focus, +.btn-danger:active.focus, +.btn-danger.active.focus, +.open > .dropdown-toggle.btn-danger.focus { + color: #ffffff; + background-color: #b62516; + border-color: #921e12; +} +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; +} +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +fieldset[disabled] .btn-danger:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +fieldset[disabled] .btn-danger:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus, +fieldset[disabled] .btn-danger.focus { + background-color: #e74c3c; + border-color: #e74c3c; +} +.btn-danger .badge { + color: #e74c3c; + background-color: #ffffff; +} +.btn-link { + color: #18bc9c; + font-weight: normal; + border-radius: 0; +} +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled], +fieldset[disabled] .btn-link { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; +} +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; +} +.btn-link:hover, +.btn-link:focus { + color: #18bc9c; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +fieldset[disabled] .btn-link:hover, +.btn-link[disabled]:focus, +fieldset[disabled] .btn-link:focus { + color: #b4bcc2; + text-decoration: none; +} +.btn-lg, +.btn-group-lg > .btn { + padding: 18px 27px; + font-size: 19px; + line-height: 1.3333333; + border-radius: 6px; +} +.btn-sm, +.btn-group-sm > .btn { + padding: 6px 9px; + font-size: 13px; + line-height: 1.5; + border-radius: 3px; +} +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 13px; + line-height: 1.5; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.form-control { + display: block; + width: 100%; + height: 45px; + padding: 10px 15px; + font-size: 15px; + line-height: 1.42857143; + color: #2c3e50; + background: #ffffff none; + border: 1px solid #dce4ec; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; + -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; +} +.form-control:focus { + border-color: #2c3e50; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(44, 62, 80, 0.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(44, 62, 80, 0.6); +} +.form-control::-moz-placeholder { + color: #acb6c0; + opacity: 1; +} +.form-control:-ms-input-placeholder { + color: #acb6c0; +} +.form-control::-webkit-input-placeholder { + color: #acb6c0; +} +.form-control::-ms-expand { + border: 0; + background-color: transparent; +} +.form-control[disabled], +.form-control[readonly], +fieldset[disabled] .form-control { + background-color: #ecf0f1; + opacity: 1; +} +.form-control[disabled], +fieldset[disabled] .form-control { + cursor: not-allowed; +} +textarea.form-control { + height: auto; +} +input[type="search"] { + -webkit-appearance: none; +} diff --git a/demo/dist/index.html b/demo/dist/index.html new file mode 100644 index 0000000..b265333 --- /dev/null +++ b/demo/dist/index.html @@ -0,0 +1,59 @@ + + + + + + react-bootstrap-time-picker demo + + + + +
+

react-bootstrap-time-picker demo

+

Github

+
+ +
+ + + + diff --git a/demo/dist/main.js b/demo/dist/main.js new file mode 100644 index 0000000..b13bce7 --- /dev/null +++ b/demo/dist/main.js @@ -0,0 +1,24 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,o){r.apply(this,[e,t,o].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},[411,141],[422,51],[426,36,67,34],[437,50,145,95,34],[444,150,86],[459,93,68,15],function(e,t,n){"use strict";function r(e){if(m){var t=e.node,n=e.children;if(n.length)for(var r=0;r]/;e.exports=r},function(e,t,n){"use strict";var r,o=n(6),a=n(99),i=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(113),l=s(function(e,t){if(e.namespaceURI!==a.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild.childNodes,o=0;o0?r:n)(e)}},[456,52],[457,15,14,88,97,36],[458,38],function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){c.insertTreeBefore(e,t,n)}function a(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):m(e,t,n)}function i(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var a=o.nextSibling;if(m(e,o,r),o===n)break;o=a}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function l(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(v(o,n),s(r,o,t)):s(r,e,t)}var c=n(39),p=n(260),d=n(166),f=(n(5),n(7),n(113)),h=n(74),v=n(179),m=f(function(e,t,n){e.insertBefore(t,n)}),g=p.dangerouslyReplaceNodeWithMarkup,y={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:l,processUpdates:function(e,t){for(var n=0;n-1?void 0:i("96",e),!l.plugins[n]){t.extractEvents?void 0:i("97",e),l.plugins[n]=t;var r=t.eventTypes;for(var a in r)o(r[a],t,a)?void 0:i("98",a,e)}}}function o(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?i("99",n):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];a(u,t,n)}return!0}return!!e.registrationName&&(a(e.registrationName,t,n),!0)}function a(e,t,n){l.registrationNameModules[e]?i("100",e):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=n(2),u=(n(1),null),s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?i("101"):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?i("102",n):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l},function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function o(e){return e===y.topMouseMove||e===y.topTouchMove}function a(e){return e===y.topMouseDown||e===y.topTouchStart}function i(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function a(e,t){var n=u.get(e);if(!n){return null}return n}var i=n(2),u=(n(18),n(57)),s=(n(7),n(10)),l=(n(1),n(3),{isMounted:function(e){var t=u.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){l.validateCallback(t,n);var o=a(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=a(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=a(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=a(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?i("122",t,o(e)):void 0}});e.exports=l},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function r(e,t){if(!a.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r="function"==typeof i[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,a=n(6);a.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,a=typeof t;return"string"===o||"number"===o?"string"===a||"number"===a:"object"===a&&e.type===t.type&&e.key===t.key}e.exports=n},[483,2,18,9,175,1,102,3],function(e,t,n){"use strict";var r=(n(4),n(8)),o=(n(3),r);e.exports=o},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var i=0;i1)for(var n=1;n.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,u=C(F,null,null,null,null,null,t);if(e){var s=E.get(e);i=s._processChildContext(s._context)}else i=S;var c=d(n);if(c){var p=c._currentElement,h=p.props;if(N(h,t)){var v=c._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return j._updateRootComponent(c,u,i,n,m),v}j.unmountComponentAtNode(n)}var g=o(n),y=g&&!!a(g),b=l(n),_=y&&!c&&!b,x=j._renderNewRootComponent(u,n,_,i)._renderedComponent.getPublicInstance();return r&&r.call(x),x},render:function(e,t,n){return j._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){c(e)?void 0:f("40");var t=d(e);if(!t){l(e),1===e.nodeType&&e.hasAttribute(R);return!1}return delete L[t._instance.rootID],P.batchedUpdates(s,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,a,i){if(c(t)?void 0:f("41"),a){var u=o(t);if(x.canReuseMarkup(e,u))return void g.precacheNode(n,u);var s=u.getAttribute(x.CHECKSUM_ATTR_NAME);u.removeAttribute(x.CHECKSUM_ATTR_NAME);var l=u.outerHTML;u.setAttribute(x.CHECKSUM_ATTR_NAME,s);var p=e,d=r(p,l),v=" (client) "+p.substring(d-20,d+20)+"\n (server) "+l.substring(d-20,d+20);t.nodeType===A?f("42",v):void 0}if(t.nodeType===A?f("43"):void 0,i.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else M(t,e),g.precacheNode(n,t.firstChild)}};e.exports=j},function(e,t,n){"use strict";var r=n(75),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(2),o=n(9),a=(n(1),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?a.EMPTY:o.isValidElement(e)?"function"==typeof e.type?a.COMPOSITE:a.HOST:void r("26",e)}});e.exports=a},[480,9,109,111,8,175,3],function(e,t){"use strict";e.exports="15.3.1"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){return null==t?o("30"):void 0,null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=n(2);n(1);e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";function n(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(167);e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(){return!a&&o.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}var o=n(6),a=null;e.exports=r},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function a(e,t){var n;if(null===e||e===!1)n=l.create(a);else if("object"==typeof e){var u=e;!u||"function"!=typeof u.type&&"string"!=typeof u.type?i("130",null==u.type?u.type:typeof u.type,r(u._owner)):void 0,"string"==typeof u.type?n=c.createInternalComponent(u):o(u.type)?(n=new u.type(u),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(u)}else"string"==typeof e||"number"==typeof e?n=c.createInstanceForText(e):i("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var i=n(2),u=n(4),s=n(268),l=n(161),c=n(163),p=(n(1),n(3),function(e){this.construct(e)});u(p.prototype,s.Mixin,{_instantiateReactComponent:a});e.exports=a},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!r[e.type]:"textarea"===t}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";var r=n(6),o=n(73),a=n(74),i=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){a(e,o(t))})),e.exports=i},function(e,t,n){"use strict";var r=n(8),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},[412,343,342],142,[421,350],[423,64,20],[428,42,63,186],[429,184],[432,126,43,193,44,26,125,356,129,363,47],[439,65,81,21,133,26,187,42],[441,192,124],[443,26,21,352,130],[446,44],[455,123],[470,29,381],18,109,172,175,[484,48],function(e,t,n){"use strict";e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(2)},function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){function t(e){var t=(0,p.timeFromInt)(e,!1);if(24===d)return t;var n=t.match(/^(\d+):/),r=parseInt(n[1],10);if(0===r)return t.replace(/^\d+/,"12")+" AM";if(r<12)return t+" AM";if(12===r)return t+" PM";var o=r<22?"0"+(r-12):(r-12).toString();return t.replace(/^\d+/,o)+" PM"}function n(){for(var e=[],t=(0,p.timeToInt)(u,!1),n=(0,p.timeToInt)(y,!1);n<=t;n+=60*C)e.push(n);return e}function r(){return n().map(function(e){var n=t(e);return{key:e,val:n}})}var a=e.end,u=void 0===a?"23:59":a,l=e.format,d=void 0===l?12:l,f=e.initialValue,h=void 0===f?"00:00":f,v=e.onChange,m=void 0===v?function(){}:v,g=e.start,y=void 0===g?"00:00":g,b=e.step,C=void 0===b?30:b,_=e.value,E=void 0===_?null:_,x=o(e,["end","format","initialValue","onChange","start","step","value"]),w=r(),T=w.map(function(e){var t=e.key,n=e.val;return s["default"].createElement("option",{key:t,value:t},n)}),P=E||h;try{P=(0,p.timeToInt)(P)}catch(S){P=parseInt(P,10)}return w.filter(function(e){var t=e.key;return P===t}).length||(P=(0,p.timeToInt)(y)),s["default"].createElement(c["default"],i({componentClass:"select",onChange:function(e){m(parseInt(e.target.value,10))},value:P},x),T)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t>",s=i||r;if(null==n[r])return t?new Error("Required "+a+" `"+s+"` was not specified "+("in `"+u+"`.")):null;for(var l=arguments.length,c=Array(l>6?l-6:0),p=6;p8&&x<=11),P=32,S=String.fromCharCode(P),k=f.topLevelTypes,M={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[k.topCompositionEnd,k.topKeyPress,k.topTextInput,k.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[k.topBlur,k.topCompositionEnd,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[k.topBlur,k.topCompositionStart,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[k.topBlur,k.topCompositionUpdate,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]}},N=!1,O=null,R={eventTypes:M,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};e.exports=R},function(e,t,n){"use strict";var r=n(154),o=n(6),a=(n(7),n(321),n(311)),i=n(328),u=n(331),s=(n(3),u(function(e){return i(e)})),l=!1,c="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(d){l=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var f={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=s(r)+":",n+=a(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var i in t)if(t.hasOwnProperty(i)){var u=a(i,t[i],n);if("float"!==i&&"cssFloat"!==i||(i=c),u)o[i]=u;else{var s=l&&r.shorthandPropertyExpansions[i];if(s)for(var p in s)o[p]="";else o[i]=""}}}};e.exports=f},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=w.getPooled(N.change,R,e,T(e));C.accumulateTwoPhaseDispatches(t),x.batchedUpdates(a,t)}function a(e){b.enqueueEvents(e),b.processEventQueue(!1)}function i(e,t){O=e,R=t,O.attachEvent("onchange",o)}function u(){O&&(O.detachEvent("onchange",o),O=null,R=null)}function s(e,t){if(e===M.topChange)return t}function l(e,t,n){e===M.topFocus?(u(),i(t,n)):e===M.topBlur&&u()}function c(e,t){O=e,R=t,I=e.value,A=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(O,"value",U),O.attachEvent?O.attachEvent("onpropertychange",d):O.addEventListener("propertychange",d,!1)}function p(){O&&(delete O.value,O.detachEvent?O.detachEvent("onpropertychange",d):O.removeEventListener("propertychange",d,!1),O=null,R=null,I=null,A=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==I&&(I=t,o(e))}}function f(e,t){if(e===M.topInput)return t}function h(e,t,n){e===M.topFocus?(p(),c(t,n)):e===M.topBlur&&p()}function v(e,t){if((e===M.topSelectionChange||e===M.topKeyUp||e===M.topKeyDown)&&O&&O.value!==I)return I=O.value,R; +}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t){if(e===M.topClick)return t}var y=n(11),b=n(55),C=n(56),_=n(6),E=n(5),x=n(10),w=n(12),T=n(116),P=n(117),S=n(178),k=n(19),M=y.topLevelTypes,N={change:{phasedRegistrationNames:{bubbled:k({onChange:null}),captured:k({onChangeCapture:null})},dependencies:[M.topBlur,M.topChange,M.topClick,M.topFocus,M.topInput,M.topKeyDown,M.topKeyUp,M.topSelectionChange]}},O=null,R=null,I=null,A=null,D=!1;_.canUseDOM&&(D=P("change")&&(!("documentMode"in document)||document.documentMode>8));var L=!1;_.canUseDOM&&(L=P("input")&&(!("documentMode"in document)||document.documentMode>11));var U={get:function(){return A.get.call(this)},set:function(e){I=""+e,A.set.call(this,e)}},F={eventTypes:N,extractEvents:function(e,t,n,o){var a,i,u=t?E.getNodeFromInstance(t):window;if(r(u)?D?a=s:i=l:S(u)?L?a=f:(a=v,i=h):m(u)&&(a=g),a){var c=a(e,t);if(c){var p=w.getPooled(N.change,c,n,o);return p.type="change",C.accumulateTwoPhaseDispatches(p),p}}i&&i(e,u,t)}};e.exports=F},function(e,t,n){"use strict";var r=n(2),o=n(39),a=n(6),i=n(324),u=n(8),s=(n(1),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(a.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=i(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=s},function(e,t,n){"use strict";var r=n(19),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(11),o=n(56),a=n(5),i=n(72),u=n(19),s=r.topLevelTypes,l={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},c={eventTypes:l,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(r.window===r)u=r;else{var c=r.ownerDocument;u=c?c.defaultView||c.parentWindow:window}var p,d;if(e===s.topMouseOut){p=t;var f=n.relatedTarget||n.toElement;d=f?a.getClosestInstanceFromNode(f):null}else p=null,d=t;if(p===d)return null;var h=null==p?u:a.getNodeFromInstance(p),v=null==d?u:a.getNodeFromInstance(d),m=i.getPooled(l.mouseLeave,p,n,r);m.type="mouseleave",m.target=h,m.relatedTarget=v;var g=i.getPooled(l.mouseEnter,d,n,r);return g.type="mouseenter",g.target=v,g.relatedTarget=h,o.accumulateEnterLeaveDispatches(m,g,p,d),[m,g]}};e.exports=c},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(4),a=n(17),i=n(176);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),a=o.length;for(e=0;e1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(40),o=r.injection.MUST_USE_PROPERTY,a=r.injection.HAS_BOOLEAN_VALUE,i=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:a,allowTransparency:0,alt:0,async:a,autoComplete:0,autoPlay:a,capture:a,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|a,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:a,coords:0,crossOrigin:0,data:0,dateTime:0,"default":a,defer:a,dir:0,disabled:a,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:a,formTarget:0,frameBorder:0,headers:0,height:0,hidden:a,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:a,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|a,muted:o|a,name:0,nonce:0,noValidate:a,open:a,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:a,referrerPolicy:0,rel:0,required:a,reversed:a,role:0,rows:u,rowSpan:i,sandbox:0,scope:0,scoped:a,scrolling:0,seamless:a,selected:o|a,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:i,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:a,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=l},[472,4,157,104,291,158,274,9,168,169,317,3],function(e,t,n){(function(t){"use strict";function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=a(t,!0))}var o=n(41),a=n(177),i=(n(102),n(118)),u=n(119),s=(n(3),{instantiateChildren:function(e,t,n,o){if(null==e)return null;var a={};return u(e,r,a),a},updateChildren:function(e,t,n,r,u,s,l,c,p){if(t||e){var d,f;for(d in t)if(t.hasOwnProperty(d)){f=e&&e[d];var h=f&&f._currentElement,v=t[d];if(null!=f&&i(h,v))o.receiveComponent(f,v,u,c),t[d]=f;else{f&&(r[d]=o.getHostNode(f),o.unmountComponent(f,!1));var m=a(v,!0);t[d]=m;var g=o.mountComponent(m,u,s,l,c,p);n.push(g)}}for(d in e)!e.hasOwnProperty(d)||t&&t.hasOwnProperty(d)||(f=e[d],r[d]=o.getHostNode(f),o.unmountComponent(f,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=s}).call(t,n(122))},function(e,t,n){"use strict";var r=n(98),o=n(276),a={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=a},function(e,t,n){"use strict";function r(e){}function o(e,t){}function a(e){return!(!e.prototype||!e.prototype.isReactComponent)}function i(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var u=n(2),s=n(4),l=n(105),c=n(18),p=n(9),d=n(107),f=n(57),h=(n(7),n(167)),v=(n(110),n(41)),m=n(310),g=n(60),y=(n(1),n(121)),b=n(118),C=(n(3),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var _=1,E={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,s){this._context=s,this._mountOrder=_++,this._hostParent=t,this._hostContainerInfo=n;var l,c=this._currentElement.props,d=this._processContext(s),h=this._currentElement.type,v=e.getUpdateQueue(),m=a(h),y=this._constructComponent(m,c,d,v);m||null!=y&&null!=y.render?i(h)?this._compositeType=C.PureClass:this._compositeType=C.ImpureClass:(l=y,o(h,l),null===y||y===!1||p.isValidElement(y)?void 0:u("105",h.displayName||h.name||"Component"),y=new r(h),this._compositeType=C.StatelessFunctional);y.props=c,y.context=d,y.refs=g,y.updater=v,this._instance=y,f.set(y,this);var b=y.state;void 0===b&&(y.state=b=null),"object"!=typeof b||Array.isArray(b)?u("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var E;return E=y.unstable_handleError?this.performInitialMountWithErrorHandling(l,t,n,e,s):this.performInitialMount(l,t,n,e,s),y.componentDidMount&&e.getReactMountReady().enqueue(y.componentDidMount,y),E},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o,a=this._currentElement.type;return o=e?new a(t,n,r):a(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var a,i=r.checkpoint();try{a=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(i),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),i=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(i),a=this.performInitialMount(e,t,n,r,o)}return a},performInitialMount:function(e,t,n,r,o){var a=this._instance;a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),void 0===e&&(e=this._renderValidatedComponent());var i=h.getType(e);this._renderedNodeType=i;var u=this._instantiateReactComponent(e,i!==h.EMPTY);this._renderedComponent=u;var s=0,l=v.mountComponent(u,r,t,n,this._processChildContext(o),s);return l},getHostNode:function(){return v.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";d.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(v.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return g;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?u("107",this.getName()||"ReactCompositeComponent"):void 0;for(var o in r)o in t.childContextTypes?void 0:u("108",this.getName()||"ReactCompositeComponent",o);return s({},e,r)}return e},_checkContextTypes:function(e,t,n){m(e,t,n,this.getName(),null,this._debugID)},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?v.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var a=this._instance;null==a?u("136",this.getName()||"ReactCompositeComponent"):void 0;var i,s=!1;this._context===o?i=a.context:(i=this._processContext(o),s=!0);var l=t.props,c=n.props;t!==n&&(s=!0),s&&a.componentWillReceiveProps&&a.componentWillReceiveProps(c,i);var p=this._processPendingState(c,i),d=!0;this._pendingForceUpdate||(a.shouldComponentUpdate?d=a.shouldComponentUpdate(c,p,i):this._compositeType===C.PureClass&&(d=!y(l,c)||!y(a.state,p))),this._updateBatchNumber=null,d?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,p,i,e,o)):(this._currentElement=n,this._context=o,a.props=c,a.state=p,a.context=i)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var a=s({},o?r[0]:n.state),i=o?1:0;i=0||null!=t.is}function h(e){var t=e.type;d(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var v=n(2),m=n(4),g=n(256),y=n(258),b=n(39),C=n(99),_=n(40),E=n(156),x=n(11),w=n(55),T=n(100),P=n(71),S=n(270),k=n(159),M=n(5),N=n(277),O=n(278),R=n(160),I=n(281),A=(n(7),n(289)),D=n(294),L=(n(8),n(73)),U=(n(1),n(117),n(19)),F=(n(121),n(120),n(3),k),j=w.deleteListener,V=M.getNodeFromInstance,B=P.listenTo,W=T.registrationNameModules,H={string:!0,number:!0},q=U({style:null}),K=U({__html:null}),z={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},Y=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Q={listing:!0,pre:!0,textarea:!0},$=m({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,J={},ee={}.hasOwnProperty,te=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=te++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var a=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(c,this);break;case"button":a=S.getHostProps(this,a,t);break;case"input":N.mountWrapper(this,a,t),a=N.getHostProps(this,a),e.getReactMountReady().enqueue(c,this);break;case"option":O.mountWrapper(this,a,t),a=O.getHostProps(this,a);break;case"select":R.mountWrapper(this,a,t),a=R.getHostProps(this,a),e.getReactMountReady().enqueue(c,this);break;case"textarea":I.mountWrapper(this,a,t),a=I.getHostProps(this,a),e.getReactMountReady().enqueue(c,this)}o(this,a);var i,p;null!=t?(i=t._namespaceURI,p=t._tag):n._tag&&(i=n._namespaceURI,p=n._tag),(null==i||i===C.svg&&"foreignobject"===p)&&(i=C.html),i===C.html&&("svg"===this._tag?i=C.svg:"math"===this._tag&&(i=C.mathml)),this._namespaceURI=i;var d;if(e.useCreateElement){var f,h=n._ownerDocument;if(i===C.html)if("script"===this._tag){var v=h.createElement("div"),m=this._currentElement.type;v.innerHTML="<"+m+">",f=v.removeChild(v.firstChild)}else f=a.is?h.createElement(this._currentElement.type,a.is):h.createElement(this._currentElement.type);else f=h.createElementNS(i,this._currentElement.type);M.precacheNode(this,f),this._flags|=F.hasCachedChildNodes,this._hostParent||E.setAttributeForRoot(f),this._updateDOMProperties(null,a,e);var y=b(f);this._createInitialChildren(e,a,r,y),d=y}else{var _=this._createOpenTagMarkupAndPutListeners(e,a),x=this._createContentMarkup(e,a,r);d=!x&&X[this._tag]?_+"/>":_+">"+x+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(u,this),a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(s,this),a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":a.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(l,this)}return d},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&a(this,r,o,e);else{r===q&&(o&&(o=this._previousStyleCopy=m({},t.style)),o=y.createMarkupForStyles(o,this));var i=null;null!=this._tag&&f(this._tag,t)?z.hasOwnProperty(r)||(i=E.createMarkupForCustomAttribute(r,o)):i=E.createMarkupForProperty(r,o),i&&(n+=" "+i)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+E.createMarkupForRoot()),n+=" "+E.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var a=H[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)r=L(a);else if(null!=i){var u=this.mountChildren(i,e,n);r=u.join("")}}return Q[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&b.queueHTML(r,o.__html);else{var a=H[typeof t.children]?t.children:null,i=null!=a?null:t.children;if(null!=a)b.queueText(r,a);else if(null!=i)for(var u=this.mountChildren(i,e,n),s=0;s"},receiveComponent:function(){},getHostNode:function(){return a.getNodeFromInstance(this)},unmountComponent:function(){a.uncacheNode(this)}}),e.exports=i},[476,9],function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(98),o=n(5),a={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=a},function(e,t,n){"use strict";function r(){this._rootNodeID&&d.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=l.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=c.getNodeFromInstance(this),u=i;u.parentNode;)u=u.parentNode;for(var s=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),d=0;dt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),a=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>a){var i=a;a=o,o=i}var u=l(e,o),s=l(e,a);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>a?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(6),l=n(315),c=n(176),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:a,setOffsets:p?i:u};e.exports=d},function(e,t,n){"use strict";var r=n(2),o=n(4),a=n(98),i=n(39),u=n(5),s=n(73),l=(n(1),n(120),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,a=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var c=n._ownerDocument,p=c.createComment(a),d=c.createComment(l),f=i(c.createDocumentFragment());return i.queueChild(f,i(p)),this._stringText&&i.queueChild(f,i(c.createTextNode(this._stringText))),i.queueChild(f,i(d)),u.precacheNode(this,p),this._closingComment=d,f}var h=s(this._stringText);return e.renderToStaticMarkup?h:""+h+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();a.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=u.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n; +break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),e.exports=l},function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return c.asap(r,this),n}var a=n(2),i=n(4),u=n(70),s=n(103),l=n(5),c=n(10),p=(n(1),n(3),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?a("91"):void 0;var n=i({},u.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=s.getValue(t),r=n;if(null==n){var i=t.defaultValue,u=t.children;null!=u&&(null!=i?a("92"):void 0,Array.isArray(u)&&(u.length<=1?void 0:a("93"),u=u[0]),i=""+u),null==i&&(i=""),r=i}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e),r=s.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=l.getNodeFromInstance(e);t.value=t.textContent}});e.exports=p},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:s("33"),"_hostNode"in t?void 0:s("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,a=t;a;a=a._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var i=n;i--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:s("35"),"_hostNode"in t?void 0:s("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function a(e){return"_hostNode"in e?void 0:s("36"),e._hostParent}function i(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o0;)n(s[l],!1,a)}var s=n(2);n(1);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:a,traverseTwoPhase:i,traverseEnterLeave:u}},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(4),a=n(10),i=n(59),u=n(8),s={initialize:u,close:function(){d.isBatchingUpdates=!1}},l={initialize:u,close:a.flushBatchedUpdates.bind(a)},c=[l,s];o(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,a){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o,a):p.perform(e,null,t,n,r,o,a)}};e.exports=d},function(e,t,n){"use strict";function r(){E||(E=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(i),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(f),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:_,EnterLeaveEventPlugin:u,ChangeEventPlugin:a,SelectEventPlugin:C,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(c),g.HostComponent.injectTextComponentClass(h),g.DOMProperty.injectDOMPropertyConfig(s),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(e){return new d(e)}),g.Updates.injectReconcileTransaction(y),g.Updates.injectBatchingStrategy(v),g.Component.injectEnvironment(l))}var o=n(257),a=n(259),i=n(261),u=n(262),s=n(264),l=n(267),c=n(271),p=n(5),d=n(273),f=n(282),h=n(280),v=n(283),m=n(286),g=n(287),y=n(292),b=n(296),C=n(297),_=n(298),E=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(55),a={handleTopLevel:function(e,t,n,a){var i=o.extractEvents(e,t,n,a);r(i)}};e.exports=a},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function a(e){var t=f(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var a=0;a/,a=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return a.test(e)?e:e.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n){return{type:d.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:d.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getHostNode(e),toIndex:n,afterNode:t}}function a(e,t){return{type:d.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function i(e){return{type:d.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:d.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function l(e,t){p.processChildrenUpdates(e,t)}var c=n(2),p=n(105),d=(n(57),n(7),n(166)),f=(n(18),n(41)),h=n(266),v=(n(8),n(313)),m=(n(1),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,a){var i,u=0;return i=v(t,u),h.updateChildren(e,i,n,r,o,this,this._hostContainerInfo,a,u),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],a=0;for(var i in r)if(r.hasOwnProperty(i)){var u=r[i],s=0,l=f.mountComponent(u,t,this,this._hostContainerInfo,n,s);u._mountIndex=a++,o.push(l)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[u(e)];l(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&c("118");var r=[i(e)];l(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},a=[],i=this._reconcilerUpdateChildren(r,e,a,o,t,n);if(i||r){var u,c=null,p=0,d=0,h=0,v=null;for(u in i)if(i.hasOwnProperty(u)){var m=r&&r[u],g=i[u];m===g?(c=s(c,this.moveChild(m,v,p,d)),d=Math.max(m._mountIndex,d),m._mountIndex=p):(m&&(d=Math.max(m._mountIndex,d)),c=s(c,this._mountChildAtIndex(g,a[h],v,p,t,n)),h++),p++,v=f.getHostNode(g)}for(u in o)o.hasOwnProperty(u)&&(c=s(c,this._unmountChild(r[u],o[u])));c&&l(this,c),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex=t)return{node:o,offset:t-a};a=i}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(u[e])return u[e];if(!i[e])return e;var t=i[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var a=n(6),i={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};a.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete i.animationend.animation,delete i.animationiteration.animation,delete i.animationstart.animation),"TransitionEvent"in window||delete i.transitionend.transition),e.exports=o},[482,2,9,1],function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(73);e.exports=r},function(e,t,n){"use strict";var r=n(165);e.exports=r.renderSubtreeIntoContainer},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(a,"ms-"))}var o=n(320),a=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(330);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?i(!1):void 0,"number"!=typeof t?i(!1):void 0,0===t||t-1 in e?void 0:i(!1),"function"==typeof e.callee?i(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;o":i.innerHTML="<"+e+">",u[e]=!i.firstChild),u[e]?d[e]:null}var o=n(6),a=n(1),i=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},f=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];f.forEach(function(e){d[e]=p,u[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(a,"-ms-")}var o=n(327),a=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(329);e.exports=r},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t){"use strict";function n(e){return"time-number"===e.message.substring(0,11)}function r(e){for(var t=arguments.length<=1||void 0===arguments[1]?2:arguments[1],n=e.toString(),r=t-n.length,o="";o.length=86400))throw new RangeError("time-number, timeFromInt(): rangeError, value supposed to be between 0 and 86399");var o=Math.floor(n/3600),a=Math.floor((n-3600*o)/60),i=n-3600*o-60*a,u=[r(o),r(a)];return i&&u.push(r(i)),u.join(":")}function a(e){var t=arguments.length<=1||void 0===arguments[1]||arguments[1];if(!t)return o(e,t);try{if(e-parseFloat(e,10)+1>=0)return o(e,t);throw new Error}catch(r){if(n(r))throw r;throw new Error("time-number, timeFromInt(): invalud value: '"+e+"', supposed to be number")}}function i(e,t){for(var n=e.split(":"),r=n.length;n.length<3;)n.push("0");var o=n.map(function(e){return parseInt(e,10)});if(t){var a=o[0];if(a<0||a>23)throw new RangeError("time-number, timeToInt(): hours must be between 0 and 23, provided value: '"+e+"'");if(r>1){var i=o[1];if(i<0||i>59)throw new RangeError("time-number, timeToInt(): minutes must be between 0 and 59, provided value: '"+e+"'")}if(r>2){var u=o[2];if(u<0||u>59)throw new RangeError("time-number, timeToInt(): seconds must be between 0 and 59, provided value: '"+e+"'")}}return 3600*o[0]+60*o[1]+o[2]}function u(e){var t=arguments.length<=1||void 0===arguments[1]||arguments[1];if(!t)return i(e,t);try{if(!e.match(/^\d+(:\d+(:\d+)?)?$/))throw new Error;return i(e,t)}catch(r){if(n(r))throw r;throw new Error("time-number, timeToInt(): supported formats are 'HH', 'HH:mm', 'HH:mm:ss', provided value: '"+e+"' doesn't match any of them")}}Object.defineProperty(t,"__esModule",{value:!0}),t.timeFromInt=a,t.timeToInt=u}])},[398,61,79,77,80,78,83,29,195,382,334,335,76],[399,79,61,77,80,78,83,29,336,76],[400,61,79,77,80,78,83,29,195,76],[401,61,79,77,80,78,83,29,76],140,[403,344],[404,345],[405,346],[406,347],[407,348],[408,349],[413,370,25],[414,371,25],[415,376,25],[416,372,25],[417,375,373,377,378,25],[418,374,379,135],222,223,[420,21,368,367],[424,46,128,65],[427,20],[430,184],[431,127,81,129,44,47],229,[433,46,21],[434,82,64,26,45,63],[435,46,128,65,194,188,63],[438,45,62,46,42],[440,21,191],[442,26,194,130],[445,46,21,65],[447,64,62,185,190],[451,132,123],[452,132],[454,132],[460,351,357,125,21,189],[461,43,360],[462,43,127],[463,43,365],244,[464,366,189],[465,20,26,42,43,193,359,63,131,129,82,47,135,134,358,353,355,62,21,133,81,127,362,190,45,46,191,65,128,126,44],[466,43,364],[467,134],[468,134],[469,369,20,44,125,47],252,253,254,102,[471,66,48],[472,84,386,136,392,387,388,27,390,393,394,28],[473,384,27,138,395],[474,66,84,136,27,389,197,137,139,48,200,396,28],[476,27],[479,200],[480,27,197,391,138,199,28],111,[481,84,136,137,139],169,[482,66,27,48],[483,66,196,27,199,48,383,28],19,332,function(e,t,n,r,o,a,i,u,s,l,c,p,d,f,h){"use strict";function v(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var m=n(r),g=v(m),y=n(o),b=v(y),C=n(a),_=v(C),E=n(i),x=v(E),w=n(u),T=v(w),P=n(s),S=v(P),k=n(l),M=v(k),N=n(c),O=v(N),R=n(p),I=(v(R),n(d)),A=v(I),D=n(f),L=v(D),U=n(h),F={componentClass:O["default"],type:M["default"].PropTypes.string,id:M["default"].PropTypes.string},j={componentClass:"input"},V={$bs_formGroup:M["default"].PropTypes.object},B=function(e){function t(){return(0,_["default"])(this,t),(0,x["default"])(this,e.apply(this,arguments))}return(0,T["default"])(t,e),t.prototype.render=function(){var e=this.context.$bs_formGroup,t=e&&e.controlId,n=this.props,r=n.componentClass,o=n.type,a=n.id,i=void 0===a?t:a,u=n.className,s=(0,b["default"])(n,["componentClass","type","id","className"]),l=(0,U.splitBsProps)(s),c=l[0],p=l[1],d=void 0;return"file"!==o&&(d=(0,U.getClassSet)(c)),M["default"].createElement(r,(0,g["default"])({},p,{type:o,id:i,className:(0,S["default"])(u,d)}))},t}(M["default"].Component);B.propTypes=F,B.defaultProps=j,B.contextTypes=V,B.Feedback=A["default"],B.Static=L["default"],t["default"]=(0,U.bsClass)("form-control",B),e.exports=t["default"]},function(e,t,n,r,o,a,i,u,s,l,c,p){"use strict";function d(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var f=n(r),h=d(f),v=n(o),m=d(v),g=n(a),y=d(g),b=n(i),C=d(b),_=n(u),E=d(_),x=n(s),w=d(x),T=n(l),P=d(T),S=n(c),k=d(S),M=n(p),N={bsRole:"feedback"},O={$bs_formGroup:P["default"].PropTypes.object},R=function(e){function t(){return(0,y["default"])(this,t),(0,C["default"])(this,e.apply(this,arguments))}return(0,E["default"])(t,e),t.prototype.getGlyph=function(e){switch(e){case"success":return"ok";case"warning":return"warning-sign";case"error":return"remove";default:return null}},t.prototype.renderDefaultFeedback=function(e,t,n,r){var o=this.getGlyph(e&&e.validationState);return o?P["default"].createElement(k["default"],(0,m["default"])({},r,{glyph:o,className:(0,w["default"])(t,n)})):null},t.prototype.render=function(){var e=this.props,t=e.className,n=e.children,r=(0,h["default"])(e,["className","children"]),o=(0,M.splitBsProps)(r),a=o[0],i=o[1],u=(0,M.getClassSet)(a);if(!n)return this.renderDefaultFeedback(this.context.$bs_formGroup,t,u,i);var s=P["default"].Children.only(n);return P["default"].cloneElement(s,(0,m["default"])({},i,{className:(0,w["default"])(s.props.className,t,u)}))},t}(P["default"].Component);R.defaultProps=N,R.contextTypes=O,t["default"]=(0,M.bsClass)("form-control-feedback",R),e.exports=t["default"]},function(e,t,n,r,o,a,i,u,s,l,c,p){"use strict";function d(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var f=n(r),h=d(f),v=n(o),m=d(v),g=n(a),y=d(g),b=n(i),C=d(b),_=n(u),E=d(_),x=n(s),w=d(x),T=n(l),P=d(T),S=n(c),k=d(S),M=n(p),N={componentClass:k["default"]},O={componentClass:"p"},R=function(e){function t(){return(0,y["default"])(this,t),(0,C["default"])(this,e.apply(this,arguments))}return(0,E["default"])(t,e),t.prototype.render=function(){var e=this.props,t=e.componentClass,n=e.className,r=(0,m["default"])(e,["componentClass","className"]),o=(0,M.splitBsProps)(r),a=o[0],i=o[1],u=(0,M.getClassSet)(a);return P["default"].createElement(t,(0,h["default"])({},i,{className:(0,w["default"])(n,u)}))},t}(P["default"].Component);R.propTypes=N,R.defaultProps=O,t["default"]=(0,M.bsClass)("form-control-static",R),e.exports=t["default"]},function(e,t,n,r,o,a,i,u,s,l,c){"use strict";function p(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var d=n(r),f=p(d),h=n(o),v=p(h),m=n(a),g=p(m),y=n(i),b=p(y),C=n(u),_=p(C),E=n(s),x=p(E),w=n(l),T=p(w),P=n(c),S={glyph:T["default"].PropTypes.string.isRequired},k=function(e){function t(){return(0,g["default"])(this,t),(0,b["default"])(this,e.apply(this,arguments))}return(0,_["default"])(t,e),t.prototype.render=function(){var e,t=this.props,n=t.glyph,r=t.className,o=(0,v["default"])(t,["glyph","className"]),a=(0,P.splitBsProps)(o),i=a[0],u=a[1],s=(0,f["default"])({},(0,P.getClassSet)(i),(e={},e[(0,P.prefix)(i,n)]=!0,e));return T["default"].createElement("span",(0,f["default"])({},u,{className:(0,x["default"])(r,s)}))},t}(T["default"].Component);k.propTypes=S,t["default"]=(0,P.bsClass)("glyphicon",k),e.exports=t["default"]},function(e,t,n,r,o,a,i,u){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}function l(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r1?t-1:0),r=1;rc;)if(o=a[c++],o!=o)return!0}else for(;l>c;c++)if((e||c in a)&&a[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n,r){var o=n(r);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n,r){e.exports=!n(r)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n,r,o){var a=n(r),i=n(o).document,u=a(i)&&a(i.createElement);e.exports=function(e){return u?i.createElement(e):{}}},function(e,t,n,r,o,a){var i=n(r),u=n(o),s=n(a);e.exports=function(e){var t=i(e),n=u.f;if(n)for(var r,o=n(e),a=s.f,l=0;o.length>l;)a.call(e,r=o[l++])&&t.push(r);return t}},function(e,t,n,r,o,a,i){var u=n(r),s=n(o),l=n(a),c=n(i),p="prototype",d=function(e,t,n){var r,o,a,i=e&d.F,f=e&d.G,h=e&d.S,v=e&d.P,m=e&d.B,g=e&d.W,y=f?s:s[t]||(s[t]={}),b=y[p],C=f?u:h?u[t]:(u[t]||{})[p];f&&(n=t);for(r in n)o=!i&&C&&void 0!==C[r],o&&r in y||(a=o?C[r]:n[r],y[r]=f&&"function"!=typeof C[r]?n[r]:m&&o?l(a,u):g&&C[r]==a?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[p]=e[p],t}(a):v&&"function"==typeof a?l(Function.call,a):a,v&&((y.virtual||(y.virtual={}))[r]=a,e&d.R&&b&&!b[r]&&c(b,r,a)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},function(e,t,n,r,o,a){var i=n(r),u=n(o);e.exports=n(a)?function(e,t,n){return i.f(e,t,u(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n,r){e.exports=n(r).document&&document.documentElement},function(e,t,n,r,o,a){e.exports=!n(r)&&!n(o)(function(){return 7!=Object.defineProperty(n(a)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n,r){var o=n(r);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t,n,r){var o=n(r);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n,r,o,a,i,u){"use strict";var s=n(r),l=n(o),c=n(a),p={};n(i)(p,n(u)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=s(p,{next:l(1,n)}),c(e,t+" Iterator")}},function(e,t,n,r,o,a,i,u,s,l,c,p,d){"use strict";var f=n(r),h=n(o),v=n(a),m=n(i),g=n(u),y=n(s),b=n(l),C=n(c),_=n(p),E=n(d)("iterator"),x=!([].keys&&"next"in[].keys()),w="@@iterator",T="keys",P="values",S=function(){return this};e.exports=function(e,t,n,r,o,a,i){b(n,t,r);var u,s,l,c=function(e){if(!x&&e in M)return M[e];switch(e){case T:return function(){return new n(this,e)};case P:return function(){return new n(this,e)}}return function(){return new n(this,e)}},p=t+" Iterator",d=o==P,k=!1,M=e.prototype,N=M[E]||M[w]||o&&M[o],O=N||c(o),R=o?d?c("entries"):O:void 0,I="Array"==t?M.entries||N:N;if(I&&(l=_(I.call(new e)),l!==Object.prototype&&(C(l,p,!0),f||g(l,E)||m(l,E,S))),d&&N&&N.name!==P&&(k=!0,O=function(){return N.call(this)}),f&&!i||!x&&!k&&M[E]||m(M,E,O),y[t]=O,y[p]=S,o)if(u={values:d?O:c(P),keys:a?O:c(T),entries:R},i)for(s in u)s in M||v(M,s,u[s]);else h(h.P+h.F*(x||k),t,u);return u}},function(e,t,n,r,o){var a=n(r),i=n(o);e.exports=function(e,t){for(var n,r=i(e),o=a(r),u=o.length,s=0;u>s;)if(r[n=o[s++]]===t)return n}},function(e,t,n,r,o,a,i,u){var s=n(r)("meta"),l=n(o),c=n(a),p=n(i).f,d=0,f=Object.isExtensible||function(){return!0},h=!n(u)(function(){return f(Object.preventExtensions({}))}),v=function(e){p(e,s,{value:{i:"O"+ ++d,w:{}}})},m=function(e,t){if(!l(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!c(e,s)){if(!f(e))return"F";if(!t)return"E";v(e)}return e[s].i},g=function(e,t){if(!c(e,s)){if(!f(e))return!0;if(!t)return!1;v(e)}return e[s].w},y=function(e){return h&&b.NEED&&f(e)&&!c(e,s)&&v(e),e},b=e.exports={KEY:s,NEED:!1,fastKey:m,getWeak:g,onFreeze:y}},function(e,t,n,r,o,a,i,u,s){"use strict";var l=n(r),c=n(o),p=n(a),d=n(i),f=n(u),h=Object.assign;e.exports=!h||n(s)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=h({},e)[n]||Object.keys(h({},t)).join("")!=r})?function(e,t){for(var n=d(e),r=arguments.length,o=1,a=c.f,i=p.f;r>o;)for(var u,s=f(arguments[o++]),h=a?l(s).concat(a(s)):l(s),v=h.length,m=0;v>m;)i.call(s,u=h[m++])&&(n[u]=s[u]);return n}:h},function(e,t,n,r,o,a,i,u,s){var l=n(r),c=n(o),p=n(a),d=n(i)("IE_PROTO"),f=function(){},h="prototype",v=function(){var e,t=n(u)("iframe"),r=p.length,o="<",a=">";for(t.style.display="none",n(s).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),v=e.F;r--;)delete v[h][p[r]];return v()};e.exports=Object.create||function(e,t){var n;return null!==e?(f[h]=l(e),n=new f,f[h]=null,n[d]=e):n=v(),void 0===t?n:c(n,t)}},function(e,t,n,r,o,a,i){var u=n(r),s=n(o),l=n(a),c=Object.defineProperty;t.f=n(i)?Object.defineProperty:function(e,t,n){if(u(e),t=l(t,!0),u(n),s)try{return c(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n,r,o,a,i){var u=n(r),s=n(o),l=n(a);e.exports=n(i)?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),o=r.length,a=0;o>a;)u.f(e,n=r[a++],t[n]);return e}},function(e,t,n,r,o,a,i,u,s,l){var c=n(r),p=n(o),d=n(a),f=n(i),h=n(u),v=n(s),m=Object.getOwnPropertyDescriptor;t.f=n(l)?m:function(e,t){if(e=d(e),t=f(t,!0),v)try{return m(e,t)}catch(n){}if(h(e,t))return p(!c.f.call(e,t),e[t])}},function(e,t,n,r,o){var a=n(r),i=n(o).f,u={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return i(e)}catch(t){return s.slice()}};e.exports.f=function(e){return s&&"[object Window]"==u.call(e)?l(e):i(a(e))}},function(e,t,n,r,o){var a=n(r),i=n(o).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,i)}},function(e,t,n,r,o,a){var i=n(r),u=n(o),s=n(a)("IE_PROTO"),l=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=u(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n,r,o,a,i){var u=n(r),s=n(o),l=n(a)(!1),c=n(i)("IE_PROTO");e.exports=function(e,t){var n,r=s(e),o=0,a=[];for(n in r)n!=c&&u(r,n)&&a.push(n);for(;t.length>o;)u(r,n=t[o++])&&(~l(a,n)||a.push(n));return a}},function(e,t,n,r,o){var a=n(r),i=n(o);e.exports=Object.keys||function(e){return a(e,i)}},function(e,t,n,r,o,a){var i=n(r),u=n(o),s=n(a).f;e.exports=function(e){return function(t){for(var n,r=u(t),o=i(r),a=o.length,l=0,c=[];a>l;)s.call(r,n=o[l++])&&c.push(e?[n,r[n]]:r[n]);return c}}},function(e,t,n,r){e.exports=n(r)},function(e,t,n,r,o,a,i){var u=n(r),s=n(o),l=function(e,t){if(s(e),!u(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(a)(Function.call,n(i).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return l(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:l}},function(e,t,n,r,o,a){var i=n(r).f,u=n(o),s=n(a)("toStringTag");e.exports=function(e,t,n){e&&!u(e=n?e:e.prototype,s)&&i(e,s,{configurable:!0,value:t})}},function(e,t,n,r,o){var a=n(r)("keys"),i=n(o);e.exports=function(e){return a[e]||(a[e]=i(e))}},function(e,t,n,r){var o=n(r),a="__core-js_shared__",i=o[a]||(o[a]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n,r,o){var a=n(r),i=n(o);e.exports=function(e){return function(t,n){var r,o,u=String(i(t)),s=a(n),l=u.length;return s<0||s>=l?e?"":void 0:(r=u.charCodeAt(s),r<55296||r>56319||s+1===l||(o=u.charCodeAt(s+1))<56320||o>57343?e?u.charAt(s):r:e?u.slice(s,s+2):(r-55296<<10)+(o-56320)+65536)}}},function(e,t,n,r){var o=n(r),a=Math.max,i=Math.min;e.exports=function(e,t){return e=o(e),e<0?a(e+t,0):i(e,t)}},function(e,t,n,r,o){var a=n(r),i=n(o);e.exports=function(e){return a(i(e))}},function(e,t,n,r){var o=n(r),a=Math.min;e.exports=function(e){return e>0?a(o(e),9007199254740991):0}},function(e,t,n,r){var o=n(r);e.exports=function(e){return Object(o(e))}},function(e,t,n,r){var o=n(r);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n,r,o,a,i,u){var s=n(r),l=n(o),c=n(a),p=n(i),d=n(u).f;e.exports=function(e){var t=l.Symbol||(l.Symbol=c?{}:s.Symbol||{});"_"==e.charAt(0)||e in t||d(t,e,{value:p.f(e)})}},function(e,t,n,r){t.f=n(r)},function(e,t,n,r,o,a){var i=n(r)("wks"),u=n(o),s=n(a).Symbol,l="function"==typeof s,c=e.exports=function(e){return i[e]||(i[e]=l&&s[e]||(l?s:u)("Symbol."+e))};c.store=i},function(e,t,n,r,o,a,i,u){"use strict";var s=n(r),l=n(o),c=n(a),p=n(i);e.exports=n(u)(Array,"Array",function(e,t){this._t=p(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,l(1)):"keys"==t?l(0,n):"values"==t?l(0,e[n]):l(0,[n,e[n]])},"values"),c.Arguments=c.Array,s("keys"),s("values"),s("entries")},function(e,t,n,r,o){var a=n(r);a(a.S+a.F,"Object",{assign:n(o)})},function(e,t,n,r,o){var a=n(r);a(a.S,"Object",{create:n(o)})},function(e,t,n,r,o){var a=n(r);a(a.S,"Object",{setPrototypeOf:n(o).set})},function(e,t,n,r,o){"use strict";var a=n(r)(!0);n(o)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=a(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n,r,o,a,i,u,s,l,c,p,d,f,h,v,m,g,y,b,C,_,E,x,w,T,P,S,k,M,N,O,R){"use strict";var I=n(r),A=n(o),D=n(a),L=n(i),U=n(u),F=n(s).KEY,j=n(l),V=n(c),B=n(p),W=n(d),H=n(f),q=n(h),K=n(v),z=n(m),Y=n(g),G=n(y),X=n(b),Q=n(C),$=n(_),Z=n(E),J=n(x),ee=n(w),te=n(T),ne=n(P),re=n(S),oe=te.f,ae=ne.f,ie=ee.f,ue=I.Symbol,se=I.JSON,le=se&&se.stringify,ce="prototype",pe=H("_hidden"),de=H("toPrimitive"),fe={}.propertyIsEnumerable,he=V("symbol-registry"),ve=V("symbols"),me=V("op-symbols"),ge=Object[ce],ye="function"==typeof ue,be=I.QObject,Ce=!be||!be[ce]||!be[ce].findChild,_e=D&&j(function(){return 7!=J(ae({},"a",{get:function(){return ae(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=oe(ge,t);r&&delete ge[t],ae(e,t,n),r&&e!==ge&&ae(ge,t,r)}:ae,Ee=function(e){var t=ve[e]=J(ue[ce]);return t._k=e,t},xe=ye&&"symbol"==typeof ue.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof ue},we=function(e,t,n){return e===ge&&we(me,t,n),X(e),t=$(t,!0),X(n),A(ve,t)?(n.enumerable?(A(e,pe)&&e[pe][t]&&(e[pe][t]=!1),n=J(n,{enumerable:Z(0,!1)})):(A(e,pe)||ae(e,pe,Z(1,{})),e[pe][t]=!0),_e(e,t,n)):ae(e,t,n)},Te=function(e,t){X(e);for(var n,r=Y(t=Q(t)),o=0,a=r.length;a>o;)we(e,n=r[o++],t[n]);return e},Pe=function(e,t){return void 0===t?J(e):Te(J(e),t)},Se=function(e){var t=fe.call(this,e=$(e,!0));return!(this===ge&&A(ve,e)&&!A(me,e))&&(!(t||!A(this,e)||!A(ve,e)||A(this,pe)&&this[pe][e])||t)},ke=function(e,t){if(e=Q(e),t=$(t,!0),e!==ge||!A(ve,t)||A(me,t)){var n=oe(e,t);return!n||!A(ve,t)||A(e,pe)&&e[pe][t]||(n.enumerable=!0),n}},Me=function(e){for(var t,n=ie(Q(e)),r=[],o=0;n.length>o;)A(ve,t=n[o++])||t==pe||t==F||r.push(t);return r},Ne=function(e){for(var t,n=e===ge,r=ie(n?me:Q(e)),o=[],a=0;r.length>a;)!A(ve,t=r[a++])||n&&!A(ge,t)||o.push(ve[t]);return o};ye||(ue=function(){if(this instanceof ue)throw TypeError("Symbol is not a constructor!");var e=W(arguments.length>0?arguments[0]:void 0),t=function(n){this===ge&&t.call(me,n),A(this,pe)&&A(this[pe],e)&&(this[pe][e]=!1),_e(this,e,Z(1,n))};return D&&Ce&&_e(ge,e,{configurable:!0,set:t}),Ee(e)},U(ue[ce],"toString",function(){return this._k}),te.f=ke,ne.f=we,n(k).f=ee.f=Me,n(M).f=Se,n(N).f=Ne,D&&!n(O)&&U(ge,"propertyIsEnumerable",Se,!0),q.f=function(e){return Ee(H(e))}),L(L.G+L.W+L.F*!ye,{Symbol:ue});for(var Oe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Re=0;Oe.length>Re;)H(Oe[Re++]);for(var Oe=re(H.store),Re=0;Oe.length>Re;)K(Oe[Re++]);L(L.S+L.F*!ye,"Symbol",{"for":function(e){return A(he,e+="")?he[e]:he[e]=ue(e)},keyFor:function(e){if(xe(e))return z(he,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Ce=!0},useSimple:function(){Ce=!1}}),L(L.S+L.F*!ye,"Object",{create:Pe,defineProperty:we,defineProperties:Te,getOwnPropertyDescriptor:ke,getOwnPropertyNames:Me,getOwnPropertySymbols:Ne}),se&&L(L.S+L.F*(!ye||j(function(){var e=ue();return"[null]"!=le([e])||"{}"!=le({a:e})||"{}"!=le(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!xe(e)){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&G(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!xe(t))return t}),r[1]=t,le.apply(se,r)}}}),ue[ce][de]||n(R)(ue[ce],de,ue[ce].valueOf),B(ue,"Symbol"),B(Math,"Math",!0),B(I.JSON,"JSON",!0)},function(e,t,n,r,o){var a=n(r),i=n(o)(!0);a(a.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n,r){n(r)("asyncIterator")},function(e,t,n,r){n(r)("observable")},function(e,t,n,r,o,a,i,u){n(r);for(var s=n(o),l=n(a),c=n(i),p=n(u)("toStringTag"),d=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],f=0;f<5;f++){var h=d[f],v=s[h],m=v&&v.prototype;m&&!m[p]&&l(m,p,h),c[h]=c.Array}},function(e,t,n,r,o){"use strict";function a(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n,r,o){var a=e[t],i="undefined"==typeof a?"undefined":u(a);return l["default"].isValidElement(a)?new Error("Invalid "+r+" `"+o+"` of type ReactElement "+("supplied to `"+n+"`, expected an element type (a string ")+"or a ReactClass)."):"function"!==i&&"string"!==i?new Error("Invalid "+r+" `"+o+"` of value `"+a+"` "+("supplied to `"+n+"`, expected an element type (a string ")+"or a ReactClass)."):null; +}t.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=n(r),l=a(s),c=n(o),p=a(c);t["default"]=(0,p["default"])(i)},function(e,t,n,r,o){"use strict";var a=n(r),i=(n(o),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),u=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},s=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},l=function(e,t,n,r){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r),a}return new o(e,t,n,r)},c=function(e,t,n,r,o){var a=this;if(a.instancePool.length){var i=a.instancePool.pop();return a.call(i,e,t,n,r,o),i}return new a(e,t,n,r,o)},p=function(e){var t=this;e instanceof t?void 0:a("25"),e.destructor(),t.instancePool.length1){for(var m=Array(v),g=0;g1){for(var b=Array(y),C=0;C>"),I={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:f(),arrayOf:h,element:v(),instanceOf:m,node:C(),objectOf:y,oneOf:g,oneOfType:b,shape:_};c.prototype=Error.prototype,e.exports=I},function(e,t,n,r,o,a,i){"use strict";function u(e,t,n){this.props=e,this.context=t,this.refs=d,this.updater=n||p}function s(){}var l=n(r),c=n(o),p=n(a),d=n(i);s.prototype=c.prototype,u.prototype=new s,u.prototype.constructor=u,l(u.prototype,c.prototype),u.prototype.isPureReactComponent=!0,e.exports=u},function(e,t,n,r,o,a){"use strict";function i(e){return s.isValidElement(e)?void 0:u("143"),e}var u=n(r),s=n(o);n(a);e.exports=i},function(e,t,n,r,o,a,i,u,s,l){"use strict";function c(e,t){return e&&"object"==typeof e&&null!=e.key?m.escape(e.key):t.toString(36)}function p(e,t,n,r){var o=typeof e;if("undefined"!==o&&"boolean"!==o||(e=null),null===e||"string"===o||"number"===o||h.isValidElement(e))return n(r,e,""===t?g+c(e,0):t),1;var a,i,u=0,s=""===t?g:t+y;if(Array.isArray(e))for(var l=0;l +
+ +
+
+
+

Configurable props

+

format

+
+
+

initialValue

+ this.setState({ initialValue: e.target.value })} /> +

value

+ this.setState({ value: e.target.value })} /> +

start

+ this.setState({ start: e.target.value })} /> +

end

+ this.setState({ end: e.target.value })} /> +

step

+ this.setState({ step: parseInt(e.target.value, 10) })} /> +
+

Reset

+ +
+ + ); + } +} + +render(, document.getElementById('app')); diff --git a/demo/webpack.config.js b/demo/webpack.config.js new file mode 100644 index 0000000..59eb0ba --- /dev/null +++ b/demo/webpack.config.js @@ -0,0 +1,29 @@ +var webpack = require('webpack'); +var path = require('path'); + +module.exports = { + entry: './src/index.js', + output: { + path: path.join(__dirname, 'dist'), + filename: '[name].js', + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env': { + 'NODE_ENV': JSON.stringify('production') + } + }), + new webpack.optimize.DedupePlugin(), + new webpack.optimize.OccurenceOrderPlugin() + ], + module: { + loaders: [ + { include: /\.jsx?$/, loader: 'babel', exclude: /node_modules/ } + ] + }, + resolve: { + root: path.join(__dirname, 'src'), + modulesDirectories: [ 'node_modules' ], + extensions: ['', '.js', '.jsx'] + } +}; diff --git a/docs/rbtp.png b/docs/rbtp.png new file mode 100644 index 0000000000000000000000000000000000000000..a575db72010327f3f7af6f22f8a04b354e232e6e GIT binary patch literal 7082 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 {}, + start = '00:00', + step = 30, + value = null, + ...rest, +}) { + function generateFormattedTime(time) { + const ret = timeFromInt(time, false); + + if (format === 24) { + return ret; + } + + const found = ret.match(/^(\d+):/); + const hour = parseInt(found[1], 10); + + if (hour === 0) { + return `${ret.replace(/^\d+/, '12')} AM`; + } else if (hour < 12) { + return `${ret} AM`; + } else if (hour === 12) { + return `${ret} PM`; + } + + const newHour = hour < 22 ? `0${hour - 12}` : (hour - 12).toString(); + + return `${ret.replace(/^\d+/, newHour)} PM`; + } + + function generateTimeRange() { + const times = []; + const iend = timeToInt(end, false); + + for (let i = timeToInt(start, false); i <= iend; i += step * 60) { + times.push(i); + } + + return times; + } + + function listTimeOptions() { + return generateTimeRange().map((unformattedTime) => { + const formattedTime = generateFormattedTime(unformattedTime); + + return { + key: unformattedTime, + val: formattedTime, + }; + }); + } + + const timeOptions = listTimeOptions(); + const optionWidgets = timeOptions.map(({ key, val }) => ( + + )); + + let currentValue = value || initialValue; + + try { + currentValue = timeToInt(currentValue); + } catch (ex) { + currentValue = parseInt(currentValue, 10); + } + + if (!timeOptions.filter(({ key }) => currentValue === key).length) { + currentValue = timeToInt(start); + } + + return ( + { onChange(parseInt(e.target.value, 10)); }} + value = {currentValue} + {...rest} + > + {optionWidgets} + + ); +} + +TimePicker.propTypes = propTypes; + +export default TimePicker; diff --git a/src/index.js b/src/index.js index a8d1afa..b45de81 100644 --- a/src/index.js +++ b/src/index.js @@ -1,89 +1,3 @@ -import React, { PropTypes } from 'react'; -import FormControl from 'react-bootstrap/lib/FormControl'; -import { timeToInt, timeFromInt } from 'time-number'; +import ReactBootstrapTimePicker from './ReactBootstrapTimePicker'; -const propTypes = { - end: PropTypes.string, - format: PropTypes.number, - initialValue: PropTypes.any, - onChange: PropTypes.func, - start: PropTypes.string, - step: PropTypes.number, - value: PropTypes.any, -}; - -function TimePicker({ - end = '23:59', - format = 12, - initialValue = '00:00', - onChange = () => {}, - start = '00:00', - step = 30, - value = null, - ...rest, -}) { - function generateFormattedTime(time) { - const ret = timeFromInt(time); - - if (format === 24) { - return ret; - } - - const found = ret.match(/^(\d+):/); - const hour = parseInt(found[1], 10); - - if (hour < 12) { - return `${ret} AM`; - } else if (hour === 12) { - return `${ret} PM`; - } - - const newHour = hour < 22 ? `0${hour - 12}` : (hour - 12).toString(); - - return `${ret.replace(/^\d+/, newHour)} PM`; - } - - function generateTimeRange() { - const times = []; - const iend = timeToInt(end); - - for (let i = timeToInt(start); i < iend; i += step * 60) { - times.push(i); - } - - return times; - } - - function listTimeOptions() { - return generateTimeRange().map((unformattedTime) => { - const formattedTime = generateFormattedTime(unformattedTime); - - return { - key: unformattedTime, - val: formattedTime, - }; - }); - } - - const currentValue = timeToInt(value || initialValue); - const options = listTimeOptions().map(({ key, val }) => ( - - )); - - return ( - { onChange(e.target.value); }} - value = {currentValue} - {...rest} - > - {options} - - ); -} - -TimePicker.propTypes = propTypes; - -export default TimePicker; +export default ReactBootstrapTimePicker; diff --git a/test/ReactBootstrapTimePicker.spec.js b/test/ReactBootstrapTimePicker.spec.js new file mode 100644 index 0000000..c101856 --- /dev/null +++ b/test/ReactBootstrapTimePicker.spec.js @@ -0,0 +1,184 @@ +// We don't need to mutate props as TimePicker is stateless component + +import React from 'react'; +import chai, { expect } from 'chai'; +import chaiEnzyme from 'chai-enzyme'; +import { shallow, mount, render } from 'enzyme'; +import jsdom from 'jsdom'; +import { timeToInt } from 'time-number'; +import TimePicker from '../dist/bundle'; + +chai.use(chaiEnzyme()); + +const doc = jsdom.jsdom(''); + +global.document = doc; +global.window = doc.defaultView; + +describe('className and style props are propagated', () => { + it('className: "temp"', () => { + const component = render(); + + expect(component).to.have.attr('class').match(/temp/); + }); + + it('style: {{ zIndex: "-9999" }}', () => { + const component = render(); + + expect(component).to.have.attr('style').match(/\-9999/); + }); +}); + +describe('initialValue and value', () => { + it('initialValue: 3600 => "3600"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal("3600"); + }); + + it('value: 3600 => "3600"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal("3600"); + }); + + + it('initialValue: "undefined", value: "04:00" => 3600 * 4', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal((4 * 3600).toString()); + }); + + it('initialValue: "03:00", value: "04:00" => 3600 * 4', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal((4 * 3600).toString()); + }); + + it('initialValue: "03:00", value: 3600 => 3600', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal("3600"); + }); + + it('initialValue: "03:00", value: "3600" => 3600', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal("3600"); + }); + + it('initialValue: undefined, value: undefined => "00:00"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal("0"); + }); + + it('initialValue: undefined, value: undefined, min="03:00" => "03:00"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.attr('value').equal((3 * 3600).toString()); + }); +}); + +describe('hour format', () => { + it('format: 12, "00:00" => "12:00 AM"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("12:00 AM"); + }); + + it('format: 12, "01:00" => "01:00 AM"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("01:00 AM"); + }); + + it('format: 12, "12:00" => "12:00 PM"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("12:00 PM"); + }); + + it('format: 12, "13:00" => "01:00 PM"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("01:00 PM"); + }); + + it('format: 24, "00:00" => "00:00"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("00:00"); + }); + + it('format: 24, "01:00" => "01:00"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("01:00"); + }); + + it('format: 24, "13:00" => "13:00"', () => { + const component = render(); + + expect(component.find('option[selected]')).to.have.text("13:00"); + }); +}); + +describe('onChange', () => { + it('onChange is called', () => { + let testVal = ''; + + const onChangeTest = (val) => testVal = 'called'; + + const component = mount(); + + component.find('option[value=3600]').simulate('change', '3600'); + + expect(testVal).to.equal('called'); + }); + + it('onChange changes value properly', () => { + let testVal = ''; + + const onChangeTest = (val) => testVal = val; + + const component = mount(); + + component.find('option[value=3600]').simulate('change', '3600'); + + expect(testVal).to.equal(3600); + }); +}); + +describe('start, end and step', () => { + it('number of options is equal to (end - start) / step, test 1', () => { + const component = render(); + + expect(component.find('option')).to.have.length(1 + Math.floor((timeToInt("12:00") - timeToInt("0:00")) / 600)); + }); + + it('number of options is equal to (end - start) / step, test 2 ', () => { + const component = render(); + + expect(component.find('option')).to.have.length(1 + Math.floor((timeToInt("11:59") - timeToInt("0:00")) / 600)); + }); + + it('first element === start', () => { + const component = render(); + + expect(component.find('option').first()).to.have.attr('value').equal((4 * 3600).toString()); + }); + + it('last element might be equal end', () => { + const component = render(); + + expect(component.find('option').last()).to.have.attr('value').equal((4 * 3600).toString()); + }); + + it('last element might be less than end', () => { + const component = render(); + + expect(component.find('option')).to.have.length(1); + }); + +}); diff --git a/webpack.config.prod.js b/webpack.config.js similarity index 85% rename from webpack.config.prod.js rename to webpack.config.js index bbb42bd..3aa3f9d 100644 --- a/webpack.config.prod.js +++ b/webpack.config.js @@ -34,5 +34,10 @@ module.exports = { loader: 'json' } ] - } + }, + resolve: { + root: path.join(__dirname, 'src'), + modulesDirectories: [ 'node_modules' ], + extensions: ['', '.js', '.jsx'] + } };