From 105eac0ea1d8396c1a24485d6786063e99b591cf Mon Sep 17 00:00:00 2001 From: ibogdanov Date: Fri, 9 Oct 2015 15:42:49 -0700 Subject: [PATCH] remove form from PicklistBase --- components/SLDSPicklistBase/index.jsx | 2 -- demo/static/bundle.js | 48 +++++++++++++-------------- lib/SLDSPicklistBase/index.js | 40 ++++++++++------------ lib/SLDSPicklistBase/list-item.js | 2 +- package.json | 2 +- 5 files changed, 44 insertions(+), 50 deletions(-) diff --git a/components/SLDSPicklistBase/index.jsx b/components/SLDSPicklistBase/index.jsx index 2cf64db0ad..b10acbf96a 100644 --- a/components/SLDSPicklistBase/index.jsx +++ b/components/SLDSPicklistBase/index.jsx @@ -214,7 +214,6 @@ module.exports = React.createClass( {
-
diff --git a/demo/static/bundle.js b/demo/static/bundle.js index dbac179b46..cd709b23c5 100644 --- a/demo/static/bundle.js +++ b/demo/static/bundle.js @@ -998,25 +998,25 @@ /* 159 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };\n\nvar PropTypes = __webpack_require__(160);\nvar RouteHandler = __webpack_require__(169);\nvar Route = __webpack_require__(171);\n\n/**\n * A component is a special kind of that\n * renders when its parent matches but none of its siblings do.\n * Only one such route may be used at any given level in the\n * route hierarchy.\n */\n\nvar DefaultRoute = (function (_Route) {\n function DefaultRoute() {\n _classCallCheck(this, DefaultRoute);\n\n if (_Route != null) {\n _Route.apply(this, arguments);\n }\n }\n\n _inherits(DefaultRoute, _Route);\n\n return DefaultRoute;\n})(Route);\n\n// TODO: Include these in the above class definition\n// once we can use ES7 property initializers.\n// https://github.com/babel/babel/issues/619\n\nDefaultRoute.propTypes = {\n name: PropTypes.string,\n path: PropTypes.falsy,\n children: PropTypes.falsy,\n handler: PropTypes.func.isRequired\n};\n\nDefaultRoute.defaultProps = {\n handler: RouteHandler\n};\n\nmodule.exports = DefaultRoute;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/components/DefaultRoute.js\n ** module id = 159\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/components/DefaultRoute.js?"); + eval("'use strict';\n\nvar _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar PropTypes = __webpack_require__(160);\nvar RouteHandler = __webpack_require__(169);\nvar Route = __webpack_require__(171);\n\n/**\n * A component is a special kind of that\n * renders when its parent matches but none of its siblings do.\n * Only one such route may be used at any given level in the\n * route hierarchy.\n */\n\nvar DefaultRoute = (function (_Route) {\n _inherits(DefaultRoute, _Route);\n\n function DefaultRoute() {\n _classCallCheck(this, DefaultRoute);\n\n _get(Object.getPrototypeOf(DefaultRoute.prototype), 'constructor', this).apply(this, arguments);\n }\n\n // TODO: Include these in the above class definition\n // once we can use ES7 property initializers.\n // https://github.com/babel/babel/issues/619\n\n return DefaultRoute;\n})(Route);\n\nDefaultRoute.propTypes = {\n name: PropTypes.string,\n path: PropTypes.falsy,\n children: PropTypes.falsy,\n handler: PropTypes.func.isRequired\n};\n\nDefaultRoute.defaultProps = {\n handler: RouteHandler\n};\n\nmodule.exports = DefaultRoute;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/components/DefaultRoute.js\n ** module id = 159\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/components/DefaultRoute.js?"); /***/ }, /* 160 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar assign = __webpack_require__(14);\nvar ReactPropTypes = __webpack_require__(2).PropTypes;\nvar Route = __webpack_require__(161);\n\nvar PropTypes = assign({}, ReactPropTypes, {\n\n /**\n * Indicates that a prop should be falsy.\n */\n falsy: function falsy(props, propName, componentName) {\n if (props[propName]) {\n return new Error('<' + componentName + '> should not have a \"' + propName + '\" prop');\n }\n },\n\n /**\n * Indicates that a prop should be a Route object.\n */\n route: ReactPropTypes.instanceOf(Route),\n\n /**\n * Indicates that a prop should be a Router object.\n */\n //router: ReactPropTypes.instanceOf(Router) // TODO\n router: ReactPropTypes.func\n\n});\n\nmodule.exports = PropTypes;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/PropTypes.js\n ** module id = 160\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/PropTypes.js?"); + eval("'use strict';\n\nvar assign = __webpack_require__(14);\nvar ReactPropTypes = __webpack_require__(2).PropTypes;\nvar Route = __webpack_require__(161);\n\nvar PropTypes = assign({}, ReactPropTypes, {\n\n /**\n * Indicates that a prop should be falsy.\n */\n falsy: function falsy(props, propName, componentName) {\n if (props[propName]) return new Error('<' + componentName + '> should not have a \"' + propName + '\" prop');\n },\n\n /**\n * Indicates that a prop should be a Route object.\n */\n route: ReactPropTypes.instanceOf(Route),\n\n /**\n * Indicates that a prop should be a Router object.\n */\n //router: ReactPropTypes.instanceOf(Router) // TODO\n router: ReactPropTypes.func\n\n});\n\nmodule.exports = PropTypes;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/PropTypes.js\n ** module id = 160\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/PropTypes.js?"); /***/ }, /* 161 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar assign = __webpack_require__(14);\nvar invariant = __webpack_require__(8);\nvar warning = __webpack_require__(16);\nvar PathUtils = __webpack_require__(162);\n\nvar _currentRoute;\n\nvar Route = (function () {\n function Route(name, path, ignoreScrollBehavior, isDefault, isNotFound, onEnter, onLeave, handler) {\n _classCallCheck(this, Route);\n\n this.name = name;\n this.path = path;\n this.paramNames = PathUtils.extractParamNames(this.path);\n this.ignoreScrollBehavior = !!ignoreScrollBehavior;\n this.isDefault = !!isDefault;\n this.isNotFound = !!isNotFound;\n this.onEnter = onEnter;\n this.onLeave = onLeave;\n this.handler = handler;\n }\n\n _createClass(Route, [{\n key: 'appendChild',\n\n /**\n * Appends the given route to this route's child routes.\n */\n value: function appendChild(route) {\n invariant(route instanceof Route, 'route.appendChild must use a valid Route');\n\n if (!this.childRoutes) this.childRoutes = [];\n\n this.childRoutes.push(route);\n }\n }, {\n key: 'toString',\n value: function toString() {\n var string = '';\n\n return string;\n }\n }], [{\n key: 'createRoute',\n\n /**\n * Creates and returns a new route. Options may be a URL pathname string\n * with placeholders for named params or an object with any of the following\n * properties:\n *\n * - name The name of the route. This is used to lookup a\n * route relative to its parent route and should be\n * unique among all child routes of the same parent\n * - path A URL pathname string with optional placeholders\n * that specify the names of params to extract from\n * the URL when the path matches. Defaults to `/${name}`\n * when there is a name given, or the path of the parent\n * route, or /\n * - ignoreScrollBehavior True to make this route (and all descendants) ignore\n * the scroll behavior of the router\n * - isDefault True to make this route the default route among all\n * its siblings\n * - isNotFound True to make this route the \"not found\" route among\n * all its siblings\n * - onEnter A transition hook that will be called when the\n * router is going to enter this route\n * - onLeave A transition hook that will be called when the\n * router is going to leave this route\n * - handler A React component that will be rendered when\n * this route is active\n * - parentRoute The parent route to use for this route. This option\n * is automatically supplied when creating routes inside\n * the callback to another invocation of createRoute. You\n * only ever need to use this when declaring routes\n * independently of one another to manually piece together\n * the route hierarchy\n *\n * The callback may be used to structure your route hierarchy. Any call to\n * createRoute, createDefaultRoute, createNotFoundRoute, or createRedirect\n * inside the callback automatically uses this route as its parent.\n */\n value: function createRoute(options, callback) {\n options = options || {};\n\n if (typeof options === 'string') options = { path: options };\n\n var parentRoute = _currentRoute;\n\n if (parentRoute) {\n warning(options.parentRoute == null || options.parentRoute === parentRoute, 'You should not use parentRoute with createRoute inside another route\\'s child callback; it is ignored');\n } else {\n parentRoute = options.parentRoute;\n }\n\n var name = options.name;\n var path = options.path || name;\n\n if (path && !(options.isDefault || options.isNotFound)) {\n if (PathUtils.isAbsolute(path)) {\n if (parentRoute) {\n invariant(path === parentRoute.path || parentRoute.paramNames.length === 0, 'You cannot nest path \"%s\" inside \"%s\"; the parent requires URL parameters', path, parentRoute.path);\n }\n } else if (parentRoute) {\n // Relative paths extend their parent.\n path = PathUtils.join(parentRoute.path, path);\n } else {\n path = '/' + path;\n }\n } else {\n path = parentRoute ? parentRoute.path : '/';\n }\n\n if (options.isNotFound && !/\\*$/.test(path)) path += '*'; // Auto-append * to the path of not found routes.\n\n var route = new Route(name, path, options.ignoreScrollBehavior, options.isDefault, options.isNotFound, options.onEnter, options.onLeave, options.handler);\n\n if (parentRoute) {\n if (route.isDefault) {\n invariant(parentRoute.defaultRoute == null, '%s may not have more than one default route', parentRoute);\n\n parentRoute.defaultRoute = route;\n } else if (route.isNotFound) {\n invariant(parentRoute.notFoundRoute == null, '%s may not have more than one not found route', parentRoute);\n\n parentRoute.notFoundRoute = route;\n }\n\n parentRoute.appendChild(route);\n }\n\n // Any routes created in the callback\n // use this route as their parent.\n if (typeof callback === 'function') {\n var currentRoute = _currentRoute;\n _currentRoute = route;\n callback.call(route, route);\n _currentRoute = currentRoute;\n }\n\n return route;\n }\n }, {\n key: 'createDefaultRoute',\n\n /**\n * Creates and returns a route that is rendered when its parent matches\n * the current URL.\n */\n value: function createDefaultRoute(options) {\n return Route.createRoute(assign({}, options, { isDefault: true }));\n }\n }, {\n key: 'createNotFoundRoute',\n\n /**\n * Creates and returns a route that is rendered when its parent matches\n * the current URL but none of its siblings do.\n */\n value: function createNotFoundRoute(options) {\n return Route.createRoute(assign({}, options, { isNotFound: true }));\n }\n }, {\n key: 'createRedirect',\n\n /**\n * Creates and returns a route that automatically redirects the transition\n * to another route. In addition to the normal options to createRoute, this\n * function accepts the following options:\n *\n * - from An alias for the `path` option. Defaults to *\n * - to The path/route/route name to redirect to\n * - params The params to use in the redirect URL. Defaults\n * to using the current params\n * - query The query to use in the redirect URL. Defaults\n * to using the current query\n */\n value: function createRedirect(options) {\n return Route.createRoute(assign({}, options, {\n path: options.path || options.from || '*',\n onEnter: function onEnter(transition, params, query) {\n transition.redirect(options.to, options.params || params, options.query || query);\n }\n }));\n }\n }]);\n\n return Route;\n})();\n\nmodule.exports = Route;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/Route.js\n ** module id = 161\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/Route.js?"); + eval("'use strict';\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar assign = __webpack_require__(14);\nvar invariant = __webpack_require__(8);\nvar warning = __webpack_require__(16);\nvar PathUtils = __webpack_require__(162);\n\nvar _currentRoute;\n\nvar Route = (function () {\n _createClass(Route, null, [{\n key: 'createRoute',\n\n /**\n * Creates and returns a new route. Options may be a URL pathname string\n * with placeholders for named params or an object with any of the following\n * properties:\n *\n * - name The name of the route. This is used to lookup a\n * route relative to its parent route and should be\n * unique among all child routes of the same parent\n * - path A URL pathname string with optional placeholders\n * that specify the names of params to extract from\n * the URL when the path matches. Defaults to `/${name}`\n * when there is a name given, or the path of the parent\n * route, or /\n * - ignoreScrollBehavior True to make this route (and all descendants) ignore\n * the scroll behavior of the router\n * - isDefault True to make this route the default route among all\n * its siblings\n * - isNotFound True to make this route the \"not found\" route among\n * all its siblings\n * - onEnter A transition hook that will be called when the\n * router is going to enter this route\n * - onLeave A transition hook that will be called when the\n * router is going to leave this route\n * - handler A React component that will be rendered when\n * this route is active\n * - parentRoute The parent route to use for this route. This option\n * is automatically supplied when creating routes inside\n * the callback to another invocation of createRoute. You\n * only ever need to use this when declaring routes\n * independently of one another to manually piece together\n * the route hierarchy\n *\n * The callback may be used to structure your route hierarchy. Any call to\n * createRoute, createDefaultRoute, createNotFoundRoute, or createRedirect\n * inside the callback automatically uses this route as its parent.\n */\n value: function createRoute(options, callback) {\n options = options || {};\n\n if (typeof options === 'string') options = { path: options };\n\n var parentRoute = _currentRoute;\n\n if (parentRoute) {\n warning(options.parentRoute == null || options.parentRoute === parentRoute, 'You should not use parentRoute with createRoute inside another route\\'s child callback; it is ignored');\n } else {\n parentRoute = options.parentRoute;\n }\n\n var name = options.name;\n var path = options.path || name;\n\n if (path && !(options.isDefault || options.isNotFound)) {\n if (PathUtils.isAbsolute(path)) {\n if (parentRoute) {\n invariant(path === parentRoute.path || parentRoute.paramNames.length === 0, 'You cannot nest path \"%s\" inside \"%s\"; the parent requires URL parameters', path, parentRoute.path);\n }\n } else if (parentRoute) {\n // Relative paths extend their parent.\n path = PathUtils.join(parentRoute.path, path);\n } else {\n path = '/' + path;\n }\n } else {\n path = parentRoute ? parentRoute.path : '/';\n }\n\n if (options.isNotFound && !/\\*$/.test(path)) path += '*'; // Auto-append * to the path of not found routes.\n\n var route = new Route(name, path, options.ignoreScrollBehavior, options.isDefault, options.isNotFound, options.onEnter, options.onLeave, options.handler);\n\n if (parentRoute) {\n if (route.isDefault) {\n invariant(parentRoute.defaultRoute == null, '%s may not have more than one default route', parentRoute);\n\n parentRoute.defaultRoute = route;\n } else if (route.isNotFound) {\n invariant(parentRoute.notFoundRoute == null, '%s may not have more than one not found route', parentRoute);\n\n parentRoute.notFoundRoute = route;\n }\n\n parentRoute.appendChild(route);\n }\n\n // Any routes created in the callback\n // use this route as their parent.\n if (typeof callback === 'function') {\n var currentRoute = _currentRoute;\n _currentRoute = route;\n callback.call(route, route);\n _currentRoute = currentRoute;\n }\n\n return route;\n }\n\n /**\n * Creates and returns a route that is rendered when its parent matches\n * the current URL.\n */\n }, {\n key: 'createDefaultRoute',\n value: function createDefaultRoute(options) {\n return Route.createRoute(assign({}, options, { isDefault: true }));\n }\n\n /**\n * Creates and returns a route that is rendered when its parent matches\n * the current URL but none of its siblings do.\n */\n }, {\n key: 'createNotFoundRoute',\n value: function createNotFoundRoute(options) {\n return Route.createRoute(assign({}, options, { isNotFound: true }));\n }\n\n /**\n * Creates and returns a route that automatically redirects the transition\n * to another route. In addition to the normal options to createRoute, this\n * function accepts the following options:\n *\n * - from An alias for the `path` option. Defaults to *\n * - to The path/route/route name to redirect to\n * - params The params to use in the redirect URL. Defaults\n * to using the current params\n * - query The query to use in the redirect URL. Defaults\n * to using the current query\n */\n }, {\n key: 'createRedirect',\n value: function createRedirect(options) {\n return Route.createRoute(assign({}, options, {\n path: options.path || options.from || '*',\n onEnter: function onEnter(transition, params, query) {\n transition.redirect(options.to, options.params || params, options.query || query);\n }\n }));\n }\n }]);\n\n function Route(name, path, ignoreScrollBehavior, isDefault, isNotFound, onEnter, onLeave, handler) {\n _classCallCheck(this, Route);\n\n this.name = name;\n this.path = path;\n this.paramNames = PathUtils.extractParamNames(this.path);\n this.ignoreScrollBehavior = !!ignoreScrollBehavior;\n this.isDefault = !!isDefault;\n this.isNotFound = !!isNotFound;\n this.onEnter = onEnter;\n this.onLeave = onLeave;\n this.handler = handler;\n }\n\n /**\n * Appends the given route to this route's child routes.\n */\n\n _createClass(Route, [{\n key: 'appendChild',\n value: function appendChild(route) {\n invariant(route instanceof Route, 'route.appendChild must use a valid Route');\n\n if (!this.childRoutes) this.childRoutes = [];\n\n this.childRoutes.push(route);\n }\n }, {\n key: 'toString',\n value: function toString() {\n var string = '';\n\n return string;\n }\n }]);\n\n return Route;\n})();\n\nmodule.exports = Route;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/Route.js\n ** module id = 161\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/Route.js?"); /***/ }, /* 162 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar invariant = __webpack_require__(8);\nvar assign = __webpack_require__(163);\nvar qs = __webpack_require__(164);\n\nvar paramCompileMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|[*.()\\[\\]\\\\+|{}^$]/g;\nvar paramInjectMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$?]*[?]?)|[*]/g;\nvar paramInjectTrailingSlashMatcher = /\\/\\/\\?|\\/\\?\\/|\\/\\?/g;\nvar queryMatcher = /\\?(.*)$/;\n\nvar _compiledPatterns = {};\n\nfunction compilePattern(pattern) {\n if (!(pattern in _compiledPatterns)) {\n var paramNames = [];\n var source = pattern.replace(paramCompileMatcher, function (match, paramName) {\n if (paramName) {\n paramNames.push(paramName);\n return '([^/?#]+)';\n } else if (match === '*') {\n paramNames.push('splat');\n return '(.*?)';\n } else {\n return '\\\\' + match;\n }\n });\n\n _compiledPatterns[pattern] = {\n matcher: new RegExp('^' + source + '$', 'i'),\n paramNames: paramNames\n };\n }\n\n return _compiledPatterns[pattern];\n}\n\nvar PathUtils = {\n\n /**\n * Returns true if the given path is absolute.\n */\n isAbsolute: function isAbsolute(path) {\n return path.charAt(0) === '/';\n },\n\n /**\n * Joins two URL paths together.\n */\n join: function join(a, b) {\n return a.replace(/\\/*$/, '/') + b;\n },\n\n /**\n * Returns an array of the names of all parameters in the given pattern.\n */\n extractParamNames: function extractParamNames(pattern) {\n return compilePattern(pattern).paramNames;\n },\n\n /**\n * Extracts the portions of the given URL path that match the given pattern\n * and returns an object of param name => value pairs. Returns null if the\n * pattern does not match the given path.\n */\n extractParams: function extractParams(pattern, path) {\n var _compilePattern = compilePattern(pattern);\n\n var matcher = _compilePattern.matcher;\n var paramNames = _compilePattern.paramNames;\n\n var match = path.match(matcher);\n\n if (!match) {\n return null;\n }var params = {};\n\n paramNames.forEach(function (paramName, index) {\n params[paramName] = match[index + 1];\n });\n\n return params;\n },\n\n /**\n * Returns a version of the given route path with params interpolated. Throws\n * if there is a dynamic segment of the route path for which there is no param.\n */\n injectParams: function injectParams(pattern, params) {\n params = params || {};\n\n var splatIndex = 0;\n\n return pattern.replace(paramInjectMatcher, function (match, paramName) {\n paramName = paramName || 'splat';\n\n // If param is optional don't check for existence\n if (paramName.slice(-1) === '?') {\n paramName = paramName.slice(0, -1);\n\n if (params[paramName] == null) return '';\n } else {\n invariant(params[paramName] != null, 'Missing \"%s\" parameter for path \"%s\"', paramName, pattern);\n }\n\n var segment;\n if (paramName === 'splat' && Array.isArray(params[paramName])) {\n segment = params[paramName][splatIndex++];\n\n invariant(segment != null, 'Missing splat # %s for path \"%s\"', splatIndex, pattern);\n } else {\n segment = params[paramName];\n }\n\n return segment;\n }).replace(paramInjectTrailingSlashMatcher, '/');\n },\n\n /**\n * Returns an object that is the result of parsing any query string contained\n * in the given path, null if the path contains no query string.\n */\n extractQuery: function extractQuery(path) {\n var match = path.match(queryMatcher);\n return match && qs.parse(match[1]);\n },\n\n /**\n * Returns a version of the given path without the query string.\n */\n withoutQuery: function withoutQuery(path) {\n return path.replace(queryMatcher, '');\n },\n\n /**\n * Returns a version of the given path with the parameters in the given\n * query merged into the query string.\n */\n withQuery: function withQuery(path, query) {\n var existingQuery = PathUtils.extractQuery(path);\n\n if (existingQuery) query = query ? assign(existingQuery, query) : existingQuery;\n\n var queryString = qs.stringify(query, { arrayFormat: 'brackets' });\n\n if (queryString) {\n return PathUtils.withoutQuery(path) + '?' + queryString;\n }return PathUtils.withoutQuery(path);\n }\n\n};\n\nmodule.exports = PathUtils;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/PathUtils.js\n ** module id = 162\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/PathUtils.js?"); + eval("'use strict';\n\nvar invariant = __webpack_require__(8);\nvar assign = __webpack_require__(163);\nvar qs = __webpack_require__(164);\n\nvar paramCompileMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|[*.()\\[\\]\\\\+|{}^$]/g;\nvar paramInjectMatcher = /:([a-zA-Z_$][a-zA-Z0-9_$?]*[?]?)|[*]/g;\nvar paramInjectTrailingSlashMatcher = /\\/\\/\\?|\\/\\?\\/|\\/\\?(?![^\\/=]+=.*$)/g;\nvar queryMatcher = /\\?(.*)$/;\n\nvar _compiledPatterns = {};\n\nfunction compilePattern(pattern) {\n if (!(pattern in _compiledPatterns)) {\n var paramNames = [];\n var source = pattern.replace(paramCompileMatcher, function (match, paramName) {\n if (paramName) {\n paramNames.push(paramName);\n return '([^/?#]+)';\n } else if (match === '*') {\n paramNames.push('splat');\n return '(.*?)';\n } else {\n return '\\\\' + match;\n }\n });\n\n _compiledPatterns[pattern] = {\n matcher: new RegExp('^' + source + '$', 'i'),\n paramNames: paramNames\n };\n }\n\n return _compiledPatterns[pattern];\n}\n\nvar PathUtils = {\n\n /**\n * Returns true if the given path is absolute.\n */\n isAbsolute: function isAbsolute(path) {\n return path.charAt(0) === '/';\n },\n\n /**\n * Joins two URL paths together.\n */\n join: function join(a, b) {\n return a.replace(/\\/*$/, '/') + b;\n },\n\n /**\n * Returns an array of the names of all parameters in the given pattern.\n */\n extractParamNames: function extractParamNames(pattern) {\n return compilePattern(pattern).paramNames;\n },\n\n /**\n * Extracts the portions of the given URL path that match the given pattern\n * and returns an object of param name => value pairs. Returns null if the\n * pattern does not match the given path.\n */\n extractParams: function extractParams(pattern, path) {\n var _compilePattern = compilePattern(pattern);\n\n var matcher = _compilePattern.matcher;\n var paramNames = _compilePattern.paramNames;\n\n var match = path.match(matcher);\n\n if (!match) return null;\n\n var params = {};\n\n paramNames.forEach(function (paramName, index) {\n params[paramName] = match[index + 1];\n });\n\n return params;\n },\n\n /**\n * Returns a version of the given route path with params interpolated. Throws\n * if there is a dynamic segment of the route path for which there is no param.\n */\n injectParams: function injectParams(pattern, params) {\n params = params || {};\n\n var splatIndex = 0;\n\n return pattern.replace(paramInjectMatcher, function (match, paramName) {\n paramName = paramName || 'splat';\n\n // If param is optional don't check for existence\n if (paramName.slice(-1) === '?') {\n paramName = paramName.slice(0, -1);\n\n if (params[paramName] == null) return '';\n } else {\n invariant(params[paramName] != null, 'Missing \"%s\" parameter for path \"%s\"', paramName, pattern);\n }\n\n var segment;\n if (paramName === 'splat' && Array.isArray(params[paramName])) {\n segment = params[paramName][splatIndex++];\n\n invariant(segment != null, 'Missing splat # %s for path \"%s\"', splatIndex, pattern);\n } else {\n segment = params[paramName];\n }\n\n return segment;\n }).replace(paramInjectTrailingSlashMatcher, '/');\n },\n\n /**\n * Returns an object that is the result of parsing any query string contained\n * in the given path, null if the path contains no query string.\n */\n extractQuery: function extractQuery(path) {\n var match = path.match(queryMatcher);\n return match && qs.parse(match[1]);\n },\n\n /**\n * Returns a version of the given path without the query string.\n */\n withoutQuery: function withoutQuery(path) {\n return path.replace(queryMatcher, '');\n },\n\n /**\n * Returns a version of the given path with the parameters in the given\n * query merged into the query string.\n */\n withQuery: function withQuery(path, query) {\n var existingQuery = PathUtils.extractQuery(path);\n\n if (existingQuery) query = query ? assign(existingQuery, query) : existingQuery;\n\n var queryString = qs.stringify(query, { arrayFormat: 'brackets' });\n\n if (queryString) return PathUtils.withoutQuery(path) + '?' + queryString;\n\n return PathUtils.withoutQuery(path);\n }\n\n};\n\nmodule.exports = PathUtils;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react-router/lib/PathUtils.js\n ** module id = 162\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/react-router/lib/PathUtils.js?"); /***/ }, /* 163 */ @@ -1058,43 +1058,43 @@ /* 169 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } };\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; };\n\nvar React = __webpack_require__(2);\nvar ContextWrapper = __webpack_require__(170);\nvar assign = __webpack_require__(14);\nvar PropTypes = __webpack_require__(160);\n\nvar REF_NAME = '__routeHandler__';\n\n/**\n * A component renders the active child route handler\n * when routes are nested.\n */\n\nvar RouteHandler = (function (_React$Component) {\n function RouteHandler() {\n _classCallCheck(this, RouteHandler);\n\n if (_React$Component != null) {\n _React$Component.apply(this, arguments);\n }\n }\n\n _inherits(RouteHandler, _React$Component);\n\n _createClass(RouteHandler, [{\n key: 'getChildContext',\n value: function getChildContext() {\n return {\n routeDepth: this.context.routeDepth + 1\n };\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n this._updateRouteComponent(this.refs[REF_NAME]);\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this._updateRouteComponent(this.refs[REF_NAME]);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this._updateRouteComponent(null);\n }\n }, {\n key: '_updateRouteComponent',\n value: function _updateRouteComponent(component) {\n this.context.router.setRouteComponentAtDepth(this.getRouteDepth(), component);\n }\n }, {\n key: 'getRouteDepth',\n value: function getRouteDepth() {\n return this.context.routeDepth;\n }\n }, {\n key: 'createChildRouteHandler',\n value: function createChildRouteHandler(props) {\n var route = this.context.router.getRouteAtDepth(this.getRouteDepth());\n\n if (route == null) {\n return null;\n }var childProps = assign({}, props || this.props, {\n ref: REF_NAME,\n params: this.context.router.getCurrentParams(),\n query: this.context.router.getCurrentQuery()\n });\n\n return React.createElement(route.handler, childProps);\n }\n }, {\n key: 'render',\n value: function render() {\n var handler = this.createChildRouteHandler();\n //