<NME> react-widgets.js <BEF> ADDFILE <MSG> [added] selectlist selectAll() method <DFF> @@ -0,0 +1,9139 @@ +/*! (c) 2015 Jason Quense | https://github.com/jquense/react-widgets/blob/master/License.txt */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("react"), require("react-dom")); + else if(typeof define === 'function' && define.amd) + define([, ], factory); + else if(typeof exports === 'object') + exports["ReactWidgets"] = factory(require("react"), require("react-dom")); + else + root["ReactWidgets"] = factory(root["React"], root["ReactDOM"]); +})(this, function(__WEBPACK_EXTERNAL_MODULE_21__, __WEBPACK_EXTERNAL_MODULE_32__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + var babelHelpers = __webpack_require__(2); + + var configure = __webpack_require__(3); + + if (process.env.NODE_ENV !== 'production') { + [Array.prototype.some, Array.prototype.filter, Array.prototype.reduce].forEach(function (method) { + if (!method) throw new Error('One or more ES5 features is not available to ReactWidgets: http://jquense.github.io/react-widgets/docs/#/getting-started/browser'); + }); + } + + module.exports = babelHelpers._extends({}, configure, { + DropdownList: __webpack_require__(22), + Combobox: __webpack_require__(57), + Calendar: __webpack_require__(61), + DateTimePicker: __webpack_require__(75), + NumberPicker: __webpack_require__(78), + Multiselect: __webpack_require__(81), + SelectList: __webpack_require__(84), + + utils: { + ReplaceTransitionGroup: __webpack_require__(73), + SlideTransition: __webpack_require__(72) + } + }); + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) + +/***/ }, +/* 1 */ +/***/ function(module, exports) { + + // shim for using process in browser + + var process = module.exports = {}; + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + + function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + + function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); + } + + process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + setTimeout(drainQueue, 0); + } + }; + + // v8 likes predictible objects + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function () { + this.fun.apply(null, this.array); + }; + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + process.version = ''; // empty string to avoid regexp issues + process.versions = {}; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + process.cwd = function () { return '/' }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + process.umask = function() { return 0; }; + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === "object") { + factory(exports); + } else { + factory(root.babelHelpers = {}); + } + })(this, function (global) { + var babelHelpers = global; + + babelHelpers.createDecoratedObject = function (descriptors) { + var target = {}; + + for (var i = 0; i < descriptors.length; i++) { + var descriptor = descriptors[i]; + var decorators = descriptor.decorators; + var key = descriptor.key; + delete descriptor.key; + delete descriptor.decorators; + descriptor.enumerable = true; + descriptor.configurable = true; + if ("value" in descriptor || descriptor.initializer) descriptor.writable = true; + + if (decorators) { + for (var f = 0; f < decorators.length; f++) { + var decorator = decorators[f]; + + if (typeof decorator === "function") { + descriptor = decorator(target, key, descriptor) || descriptor; + } else { + throw new TypeError("The decorator for method " + descriptor.key + " is of the invalid type " + typeof decorator); + } + } + } + + if (descriptor.initializer) { + descriptor.value = descriptor.initializer.call(target); + } + + Object.defineProperty(target, key, descriptor); + } + + return target; + }; + + babelHelpers.objectWithoutProperties = function (obj, keys) { + var target = {}; + + for (var i in obj) { + if (keys.indexOf(i) >= 0) continue; + if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; + target[i] = obj[i]; + } + + return target; + }; + + babelHelpers.interopRequireWildcard = function (obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + + newObj["default"] = obj; + return newObj; + } + }; + + babelHelpers.interopRequireDefault = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + babelHelpers._extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + }) + +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + exports.__esModule = true; + + var _utilConfiguration = __webpack_require__(4); + + var _utilConfiguration2 = babelHelpers.interopRequireDefault(_utilConfiguration); + + var _utilLocalizers = __webpack_require__(18); + + var localizers = babelHelpers.interopRequireWildcard(_utilLocalizers); + exports['default'] = { + + setAnimate: function setAnimate(animatefn) { + _utilConfiguration2['default'].animate = animatefn; + }, + + setLocalizers: function setLocalizers(_ref) { + var date = _ref.date; + var number = _ref.number; + + date && this.setDateLocalizer(date); + number && this.setNumberLocalizer(number); + }, + + setDateLocalizer: localizers.setDate, + + setNumberLocalizer: localizers.setNumber + }; + module.exports = exports['default']; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + exports.__esModule = true; + + var _domAnimate = __webpack_require__(5); + + var _domAnimate2 = babelHelpers.interopRequireDefault(_domAnimate); + + exports['default'] = { animate: _domAnimate2['default'] }; + module.exports = exports['default']; + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + exports.__esModule = true; + exports['default'] = animate; + + var _domHelpersUtilHyphenate = __webpack_require__(6); + + var _domHelpersUtilHyphenate2 = babelHelpers.interopRequireDefault(_domHelpersUtilHyphenate); + + var _domHelpersStyle = __webpack_require__(7); + + var _domHelpersStyle2 = babelHelpers.interopRequireDefault(_domHelpersStyle); + + var _domHelpersEventsOn = __webpack_require__(14); + + var _domHelpersEventsOn2 = babelHelpers.interopRequireDefault(_domHelpersEventsOn); + + var _domHelpersEventsOff = __webpack_require__(16); + + var _domHelpersEventsOff2 = babelHelpers.interopRequireDefault(_domHelpersEventsOff); + + var _domHelpersTransitionProperties = __webpack_require__(17); + + var _domHelpersTransitionProperties2 = babelHelpers.interopRequireDefault(_domHelpersTransitionProperties); + + var has = Object.prototype.hasOwnProperty, + reset = {}, + TRANSLATION_MAP = { + left: 'translateX', + right: 'translateX', + top: 'translateY', + bottom: 'translateY' + }; + + reset[_domHelpersTransitionProperties2['default'].property] = reset[_domHelpersTransitionProperties2['default'].duration] = reset[_domHelpersTransitionProperties2['default'].delay] = reset[_domHelpersTransitionProperties2['default'].timing] = ''; + + animate.endEvent = _domHelpersTransitionProperties2['default'].end; + animate.transform = _domHelpersTransitionProperties2['default'].transform; + animate.TRANSLATION_MAP = TRANSLATION_MAP; + + // super lean animate function for transitions + // doesn't support all translations to keep it matching the jquery API + /** + * code in part from: Zepto 1.1.4 | zeptojs.com/license + */ + + function animate(node, properties, duration, easing, callback) { + var cssProperties = [], + fakeEvent = { target: node, currentTarget: node }, + cssValues = {}, + transforms = '', + fired; + + if (typeof easing === 'function') callback = easing, easing = null; + + if (!_domHelpersTransitionProperties2['default'].end) duration = 0; + if (duration === undefined) duration = 200; + + for (var key in properties) if (has.call(properties, key)) { + if (/(top|bottom)/.test(key)) transforms += TRANSLATION_MAP[key] + '(' + properties[key] + ') ';else { + cssValues[key] = properties[key]; + cssProperties.push(_domHelpersUtilHyphenate2['default'](key)); + } + } + + if (transforms) { + cssValues[_domHelpersTransitionProperties2['default'].transform] = transforms; + cssProperties.push(_domHelpersTransitionProperties2['default'].transform); + } + + if (duration > 0) { + cssValues[_domHelpersTransitionProperties2['default'].property] = cssProperties.join(', '); + cssValues[_domHelpersTransitionProperties2['default'].duration] = duration / 1000 + 's'; + cssValues[_domHelpersTransitionProperties2['default'].delay] = 0 + 's'; + cssValues[_domHelpersTransitionProperties2['default'].timing] = easing || 'linear'; + + _domHelpersEventsOn2['default'](node, _domHelpersTransitionProperties2['default'].end, done); + + setTimeout(function () { + if (!fired) done(fakeEvent); + }, duration + 500); + } + + node.clientLeft; // trigger page reflow + _domHelpersStyle2['default'](node, cssValues); + + if (duration <= 0) setTimeout(done.bind(null, fakeEvent), 0); + + function done(event) { + if (event.target !== event.currentTarget) return; + + fired = true; + _domHelpersEventsOff2['default'](event.target, _domHelpersTransitionProperties2['default'].end, done); + _domHelpersStyle2['default'](node, reset); + callback && callback.call(this); + } + } + + module.exports = exports['default']; + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + 'use strict'; + + var rUpper = /([A-Z])/g; + + module.exports = function hyphenate(string) { + return string.replace(rUpper, '-$1').toLowerCase(); + }; + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var camelize = __webpack_require__(8), + hyphenate = __webpack_require__(10), + _getComputedStyle = __webpack_require__(11), + removeStyle = __webpack_require__(13); + + var has = Object.prototype.hasOwnProperty; + + module.exports = function style(node, property, value) { + var css = '', + props = property; + + if (typeof property === 'string') { + + if (value === undefined) return node.style[camelize(property)] || _getComputedStyle(node).getPropertyValue(hyphenate(property));else (props = {})[property] = value; + } + + for (var key in props) if (has.call(props, key)) { + !props[key] && props[key] !== 0 ? removeStyle(node, hyphenate(key)) : css += hyphenate(key) + ':' + props[key] + ';'; + } + + node.style.cssText += ';' + css; + }; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js + */ + + 'use strict'; + var camelize = __webpack_require__(9); + var msPattern = /^-ms-/; + + module.exports = function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); + }; + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + "use strict"; + + var rHyphen = /-(.)/g; + + module.exports = function camelize(string) { + return string.replace(rHyphen, function (_, chr) { + return chr.toUpperCase(); + }); + }; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. + * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js + */ + + "use strict"; + + var hyphenate = __webpack_require__(6); + var msPattern = /^ms-/; + + module.exports = function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, "-ms-"); + }; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(12); + + var _utilCamelizeStyle = __webpack_require__(8); + + var _utilCamelizeStyle2 = babelHelpers.interopRequireDefault(_utilCamelizeStyle); + + var rposition = /^(top|right|bottom|left)$/; + var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i; + + module.exports = function _getComputedStyle(node) { + if (!node) throw new TypeError('No Element passed to `getComputedStyle()`'); + var doc = node.ownerDocument; + + return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : { //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72 + getPropertyValue: function getPropertyValue(prop) { + var style = node.style; + + prop = (0, _utilCamelizeStyle2['default'])(prop); + + if (prop == 'float') prop = 'styleFloat'; + + var current = node.currentStyle[prop] || null; + + if (current == null && style && style[prop]) current = style[prop]; + + if (rnumnonpx.test(current) && !rposition.test(prop)) { + // Remember the original values + var left = style.left; + var runStyle = node.runtimeStyle; + var rsLeft = runStyle && runStyle.left; + + // Put in the new values to get a computed value out + if (rsLeft) runStyle.left = node.currentStyle.left; + + style.left = prop === 'fontSize' ? '1em' : current; + current = style.pixelLeft + 'px'; + + // Revert the changed values + style.left = left; + if (rsLeft) runStyle.left = rsLeft; + } + + return current; + } + }; + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === "object") { + factory(exports); + } else { + factory(root.babelHelpers = {}); + } + })(this, function (global) { + var babelHelpers = global; + + babelHelpers.interopRequireDefault = function (obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; + }; + + babelHelpers._extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + }) + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function removeStyle(node, key) { + return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key); + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var canUseDOM = __webpack_require__(15); + var on = function on() {}; + + if (canUseDOM) { + on = (function () { + + if (document.addEventListener) return function (node, eventName, handler, capture) { + return node.addEventListener(eventName, handler, capture || false); + };else if (document.attachEvent) return function (node, eventName, handler) { + return node.attachEvent('on' + eventName, handler); + }; + })(); + } + + module.exports = on; + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + 'use strict'; + module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement); + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var canUseDOM = __webpack_require__(15); + var off = function off() {}; + + if (canUseDOM) { + + off = (function () { + + if (document.addEventListener) return function (node, eventName, handler, capture) { + return node.removeEventListener(eventName, handler, capture || false); + };else if (document.attachEvent) return function (node, eventName, handler) { + return node.detachEvent('on' + eventName, handler); + }; + })(); + } + + module.exports = off; + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var canUseDOM = __webpack_require__(15); + + var has = Object.prototype.hasOwnProperty, + transform = 'transform', + transition = {}, + transitionTiming, + transitionDuration, + transitionProperty, + transitionDelay; + + if (canUseDOM) { + transition = getTransitionProperties(); + + transform = transition.prefix + transform; + + transitionProperty = transition.prefix + 'transition-property'; + transitionDuration = transition.prefix + 'transition-duration'; + transitionDelay = transition.prefix + 'transition-delay'; + transitionTiming = transition.prefix + 'transition-timing-function'; + } + + module.exports = { + transform: transform, + end: transition.end, + property: transitionProperty, + timing: transitionTiming, + delay: transitionDelay, + duration: transitionDuration + }; + + function getTransitionProperties() { + var endEvent, + prefix = '', + transitions = { + O: 'otransitionend', + Moz: 'transitionend', + Webkit: 'webkitTransitionEnd', + ms: 'MSTransitionEnd' + }; + + var element = document.createElement('div'); + + for (var vendor in transitions) if (has.call(transitions, vendor)) { + if (element.style[vendor + 'TransitionProperty'] !== undefined) { + prefix = '-' + vendor.toLowerCase() + '-'; + endEvent = transitions[vendor]; + break; + } + } + + if (!endEvent && element.style.transitionProperty !== undefined) endEvent = 'transitionend'; + + return { end: endEvent, prefix: prefix }; + } + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {'use strict'; + + var babelHelpers = __webpack_require__(2); + + exports.__esModule = true; + exports.setNumber = setNumber; + exports.setDate = setDate; + + var _invariant = __webpack_require__(19); + + var _invariant2 = babelHelpers.interopRequireDefault(_invariant); + + var _ = __webpack_require__(20); + + var _react = __webpack_require__(21); + + var _react2 = babelHelpers.interopRequireDefault(_react); + + var localePropType = _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.func]); + + var REQUIRED_NUMBER_FORMATS = ['default']; + + var REQUIRED_DATE_FORMATS = ['default', 'date', 'time', 'header', 'footer', 'dayOfMonth', 'month', 'year', 'decade', 'century']; + + function _format(localizer, formatter, value, format, culture) { + var result = typeof format === 'function' ? format(value, culture, localizer) : formatter.call(localizer, value, format, culture); + + _invariant2['default'](result == null || typeof result === 'string', '`localizer format(..)` must return a string, null, or undefined'); + + return result; + } + + function checkFormats(requiredFormats, formats) { + if (process.env.NODE_ENV !== 'production') requiredFormats.forEach(function (f) { + return _invariant2['default'](_.has(formats, f), 'localizer missing required format: `%s`', f); + }); + } + + var _numberLocalizer = createWrapper('NumberPicker'); + + function setNumber(_ref) { + var _format2 = _ref.format; + var _parse = _ref.parse; + var _ref$precision = _ref.precision; + var precision = _ref$precision === undefined ? function () { + return null; + } : _ref$precision; + var formats = _ref.formats; + var propType = _ref.propType; + + _invariant2['default'](typeof _format2 === 'function', 'number localizer `format(..)` must be a function'); + _invariant2['default'](typeof _parse === 'function', 'number localizer `parse(..)` must be a function'); + + checkFormats(REQUIRED_NUMBER_FORMATS, formats); + + _numberLocalizer = { + formats: formats, + precision: precision, + propType: propType || localePropType, + + format: function format(value, str, culture) { + return _format(this, _format2, value, str, culture); + }, + + parse: function parse(value, culture) { + var result = _parse.call(this, value, culture); + _invariant2['default'](result == null || typeof result === 'number', 'number localizer `parse(..)` must return a number, null, or undefined'); + return result; + } + }; + } + + var _dateLocalizer = createWrapper('DateTimePicker'); + + function setDate(spec) { + _invariant2['default'](typeof spec.format === 'function', 'date localizer `format(..)` must be a function'); + _invariant2['default'](typeof spec.parse === 'function', 'date localizer `parse(..)` must be a function'); + _invariant2['default'](typeof spec.firstOfWeek === 'function', 'date localizer `firstOfWeek(..)` must be a function'); + checkFormats(REQUIRED_DATE_FORMATS, spec.formats); + + _dateLocalizer = { + formats: spec.formats, + propType: spec.propType || localePropType, + startOfWeek: spec.firstOfWeek, + format: function format(value, str, culture) { + return _format(this, spec.format, value, str, culture); + }, + parse: function parse(value, culture) { + var result = spec.parse.call(this, value, culture); + _invariant2['default'](result == null || result instanceof Date && !isNaN(result.getTime()), 'date localizer `parse(..)` must return a valid Date, null, or undefined'); + return result; + } + }; + } + + var number = { + propType: function propType() { + var _numberLocalizer2; + + return (_numberLocalizer2 = _numberLocalizer).propType.apply(_numberLocalizer2, arguments); + }, + getFormat: function getFormat(key, format) { + return format || _numberLocalizer.formats[key]; + }, + parse: function parse() { + var _numberLocalizer3; + + return (_numberLocalizer3 = _numberLocalizer).parse.apply(_numberLocalizer3, arguments); + }, + format: function format() { + var _numberLocalizer4; + + return (_numberLocalizer4 = _numberLocalizer).format.apply(_numberLocalizer4, arguments); + }, + precision: function precision() { + var _numberLocalizer5; + + return (_numberLocalizer5 = _numberLocalizer).precision.apply(_numberLocalizer5, arguments); + } + }; + + exports.number = number; + var date = { + propType: function propType() { + var _dateLocalizer2; + + return (_dateLocalizer2 = _dateLocalizer).propType.apply(_dateLocalizer2, arguments); + }, + getFormat: function getFormat(key, format) { + return format || _dateLocalizer.formats[key]; + }, + parse: function parse() { + var _dateLocalizer3; + + return (_dateLocalizer3 = _dateLocalizer).parse.apply(_dateLocalizer3, arguments); + }, + format: function format() { + var _dateLocalizer4; + + return (_dateLocalizer4 = _dateLocalizer).format.apply(_dateLocalizer4, arguments); + }, + startOfWeek: function startOfWeek() { + var _dateLocalizer5; + + return (_dateLocalizer5 = _dateLocalizer).startOfWeek.apply(_dateLocalizer5, arguments); + } + }; + + exports.date = date; + exports['default'] = { number: number, date: date }; + + function createWrapper() { + var dummy = {}; + + ['formats', 'parse', 'format', 'firstOfWeek', 'precision'].forEach(function (name) { + return Object.defineProperty(dummy, name, { + enumerable: true, + get: function get() { + throw new Error('[React Widgets] You are attempting to use a widget that requires localization ' + '(Calendar, DateTimePicker, NumberPicker). ' + 'However there is no localizer set. Please configure a localizer. \n\n' + 'see http://jquense.github.io/react-widgets/docs/#/i18n for more info.'); + } + }); + }); + return dummy; + } + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var invariant = function(condition, format, a, b, c, d, e, f) { + if (process.env.NODE_ENV !== 'production') { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + }; + + module.exports = invariant; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1))) + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + 'use strict'; + var idCount = 0; + + var _ = module.exports = { + + has: has, + + result: function result(value) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + return typeof value === 'function' ? value.apply(undefined, args) : value; + }, + + isShallowEqual: function isShallowEqual(a, b) { + if (a === b) return true; + if (a instanceof Date && b instanceof Date) return a.getTime() === b.getTime(); + + if (typeof a !== 'object' && typeof b !== 'object') return a === b; + + if (typeof a !== typeof b) return false; + + return shallowEqual(a, b); + }, + + transform: function transform(obj, cb, seed) { + _.each(obj, cb.bind(null, seed = seed || (Array.isArray(obj) ? [] : {}))); + return seed; + }, + + each: function each(obj, cb, thisArg) { + if (Array.isArray(obj)) return obj.forEach(cb, thisArg); + + for (var key in obj) if (has(obj, key)) cb.call(thisArg, obj[key], key, obj); + }, + + pick: function pick(obj, keys) { + keys = [].concat(keys); + return _.transform(obj, function (mapped, val, key) { + if (keys.indexOf(key) !== -1) mapped[key] = val; + }, {}); + }, + + omit: function omit(obj, keys) { + keys = [].concat(keys); + return _.transform(obj, function (mapped, val, key) { + if (keys.indexOf(key) === -1) mapped[key] = val; + }, {}); + }, + + find: function find(arr, cb, thisArg) { + var result; + if (Array.isArray(arr)) { + arr.every(function (val, idx) { + if (cb.call(thisArg, val, idx, arr)) return (result = val, false); + return true; + }); + return result; + } else for (var key in arr) if (has(arr, key)) if (cb.call(thisArg, arr[key], key, arr)) return arr[key]; + }, + + chunk: function chunk(array, chunkSize) { + var index = 0, + length = array ? array.length : 0, + result = []; + + chunkSize = Math.max(+chunkSize || 1, 1); + + while (index < length) result.push(array.slice(index, index += chunkSize)); + + return result; + }, + + splat: function splat(obj) { + return obj == null ? [] : [].concat(obj); + }, + + noop: function noop() {}, + + uniqueId: function uniqueId(prefix) { + return '' + ((prefix == null ? '' : prefix) + ++idCount); + } + }; + + function has(o, k) { + return o ? Object.prototype.hasOwnProperty.call(o, k) : false; + } + + function eql(a, b) { + return a === b; + } + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + */ + function shallowEqual(objA, objB) { + + if (objA == null || objB == null) return false; + + var keysA = Object.keys(objA), + keysB = Object.keys(objB); + + if (keysA.length !== keysB.length) return false; + + for (var i = 0; i < keysA.length; i++) if (!has(objB, keysA[i]) || !eql(objA[keysA[i]], objB[keysA[i]])) return false; + + return true; + } + +/***/ }, +/* 21 */ +/***/ function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_21__; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + exports.__esModule = true; + + var _react = __webpack_require__(21); + + var _react2 = babelHelpers.interopRequireDefault(_react); + + var _domHelpersActiveElement = __webpack_require__(23); + + var _domHelpersActiveElement2 = babelHelpers.interopRequireDefault(_domHelpersActiveElement); + + var _domHelpersQueryContains = __webpack_require__(25); + + var _domHelpersQueryContains2 = babelHelpers.interopRequireDefault(_domHelpersQueryContains); + + var _classnames = __webpack_require__(26); + + var _classnames2 = babelHelpers.interopRequireDefault(_classnames); + + var _util_ = __webpack_require__(20); + + var _util_2 = babelHelpers.interopRequireDefault(_util_); + + var _Popup = __webpack_require__(27); + + var _Popup2 = babelHelpers.interopRequireDefault(_Popup); + + var _utilCompat = __webpack_require__(31); + + var _utilCompat2 = babelHelpers.interopRequireDefault(_utilCompat); + + var _utilPropTypes = __webpack_require__(33); + + var _utilPropTypes2 = babelHelpers.interopRequireDefault(_utilPropTypes); + + var _List = __webpack_require__(35); + + var _List2 = babelHelpers.interopRequireDefault(_List); + + var _ListGroupable = __webpack_require__(41); + + var _ListGroupable2 = babelHelpers.interopRequireDefault(_ListGroupable); + + var _utilValidateListInterface = __webpack_require__(43); + + var _utilValidateListInterface2 = babelHelpers.interopRequireDefault(_utilValidateListInterface); + + var _uncontrollable = __webpack_require__(44); + + var _uncontrollable2 = babelHelpers.interopRequireDefault(_uncontrollable); + + var _utilDataHelpers = __webpack_require__(37); + + var _utilInteraction = __webpack_require__(47); + + var _utilWidgetHelpers = __webpack_require__(38); + + var omit = _util_2['default'].omit; + var pick = _util_2['default'].pick; + var result = _util_2['default'].result; + + var propTypes = { + //-- controlled props ----------- + value: _react2['default'].PropTypes.any, + onChange: _react2['default'].PropTypes.func, + open: _react2['default'].PropTypes.bool, + onToggle: _react2['default'].PropTypes.func, + //------------------------------------ + + data: _react2['default'].PropTypes.array, + valueField: _react2['default'].PropTypes.string, + textField: _utilPropTypes2['default'].accessor, + + valueComponent: _utilPropTypes2['default'].elementType, + itemComponent: _utilPropTypes2['default'].elementType, + listComponent: _utilPropTypes2['default'].elementType, + + groupComponent: _utilPropTypes2['default'].elementType, + groupBy: _utilPropTypes2['default'].accessor, + + onSelect: _react2['default'].PropTypes.func, + + searchTerm: _react2['default'].PropTypes.string, + onSearch: _react2['default'].PropTypes.func, + + busy: _react2['default'].PropTypes.bool, + + delay: _react2['default'].PropTypes.number, + + dropUp: _react2['default'].PropTypes.bool, + duration: _react2['default'].PropTypes.number, //popup + + disabled: _utilPropTypes2['default'].disabled, + + readOnly: _utilPropTypes2['default'].readOnly, + + messages: _react2['default'].PropTypes.shape({ + open: _utilPropTypes2['default'].message, + emptyList: _utilPropTypes2['default'].message, + emptyFilter: _utilPropTypes2['default'].message, + filterPlaceholder: _utilPropTypes2['default'].message + }) + }; + + var DropdownList = _react2['default'].createClass(babelHelpers.createDecoratedObject([{ + key: 'displayName', + initializer: function initializer() { + return 'DropdownList'; + } + }, { + key: 'mixins', + initializer: function initializer() { + return [__webpack_require__(48), __webpack_require__(49), __webpack_require__(50), __webpack_require__(51), __webpack_require__(56), __webpack_require__(40)()]; + } + }, { + key: 'propTypes', + initializer: function initializer() { + return propTypes; + } + }, { + key: 'getDefaultProps', + value: function getDefaultProps() { + return { + delay: 500, + value: '', + open: false, + data: [], + searchTerm: '', + messages: msgs(), + ariaActiveDescendantKey: 'dropdownlist' + }; + } + }, { + key: 'getInitialState', + value: function getInitialState() { + var _props = this.props; + var open = _props.open; + var filter = _props.filter; + var value = _props.value; + var data = _props.data; + var searchTerm = _props.searchTerm; + var valueField = _props.valueField; + + var processed = filter ? this.filter(data, searchTerm) : data, + initialIdx = _utilDataHelpers.dataIndexOf(data, value, valueField); + + return { + filteredData: open && filter ? processed : null, + selectedItem: processed[initialIdx], + focusedItem: processed[initialIdx] || data[0] + }; + } + }, { + key: 'componentDidUpdate', + value: function componentDidUpdate() { + this.refs.list && _utilValidateListInterface2['default'](this.refs.list); + } + }, { + key: 'componentWillReceiveProps', + value: function componentWillReceiveProps(props) { + var open = props.open; + var filter = props.filter; + var value = props.value; + var data = props.data; + var searchTerm = props.searchTerm; + var valueField = props.valueField; + + var processed = filter ? this.filter(data, searchTerm) : data, + idx = _utilDataHelpers.dataIndexOf(data, value, valueField); + + this.setState({ + filteredData: open && filter ? processed : null, + selectedItem: processed[idx], + focusedItem: processed[! ~idx ? 0 : idx] + }); + } + }, { + key: 'render', + value: function render() { + var _cx, + _this = this; + + var _props2 = this.props; + var className = _props2.className; + var tabIndex = _props2.tabIndex; + var filter = _props2.filter; + var valueField = _props2.valueField; + var textField = _props2.textField; + var groupBy = _props2.groupBy; + var messages = _props2.messages; + var data = _props2.data; + var busy = _props2.busy; + var dropUp = _props2.dropUp; + var placeholder = _props2.placeholder; + var value = _props2.value; + var open = _props2.open; + var disabled = _props2.disabled; + var readOnly = _props2.readOnly; + var ValueComponent = _props2.valueComponent; + var List = _props2.listComponent; + + List = List || groupBy && _ListGroupable2['default'] || _List2['default']; + + var elementProps = omit(this.props, Object.keys(propTypes)); + var listProps = pick(this.props, Object.keys(List.propTypes)); + var popupProps = pick(this.props, Object.keys(_Popup2['default'].propTypes)); + + var _state = this.state; + var focusedItem = _state.focusedItem; + var selectedItem = _state.selectedItem; + var focused = _state.focused; + + var items = this._data(), + valueItem = _utilDataHelpers.dataItem(data, value, valueField), + // take value from the raw data + listID = _utilWidgetHelpers.instanceId(this, '__listbox'); + + var shouldRenderList = _utilWidgetHelpers.isFirstFocusedRender(this) || open; + + messages = msgs(messages); + + return _react2['default'].createElement( + 'div', + babelHelpers._extends({}, elementProps, { + ref: 'input', + role: 'combobox', + tabIndex: tabIndex || '0', + 'aria-expanded': open, + 'aria-haspopup': true, + 'aria-owns': listID, + 'aria-busy': !!busy, + 'aria-live': !open && 'polite', + //aria-activedescendant={activeID} + 'aria-autocomplete': 'list', + 'aria-disabled': disabled, + 'aria-readonly': readOnly, + onKeyDown: this._keyDown, + onClick: this._click, + onFocus: this._focus.bind(null, true), + onBlur: this._focus.bind(null, false), + className: _classnames2['default'](className, 'rw-dropdownlist', 'rw-widget', (_cx = { + 'rw-state-disabled': disabled, + 'rw-state-readonly': readOnly, + 'rw-state-focus': focused, + 'rw-rtl': this.isRtl() + + }, _cx['rw-open' + (dropUp ? '-up' : '')] = open, _cx)) }), + _react2['default'].createElement( + 'span', + { className: 'rw-dropdownlist-picker rw-select rw-btn' }, + _react2['default'].createElement( + 'i', + { className: 'rw-i rw-i-caret-down' + (busy ? ' rw-loading' : '') }, + _react2['default'].createElement( + 'span', + { className: 'rw-sr' }, + result(messages.open, this.props) + ) + ) + ), + _react2['default'].createElement( + 'div', + { + className: 'rw-input' + }, + !valueItem && placeholder ? _react2['default'].createElement( + 'span', + { className: 'rw-placeholder' }, + placeholder + ) : this.props.valueComponent ? _react2['default'].createElement(ValueComponent, { item: valueItem }) : _utilDataHelpers.dataText(valueItem, textField) + ), + _react2['default'].createElement( + _Popup2['default'], + babelHelpers._extends({}, popupProps, { + onOpen: function () { + return _this.focus(); + }, + onOpening: function () { + return _this.refs.list.forceUpdate(); + }, + onRequestClose: this.close + }), + _react2['default'].createElement( + 'div', + null, + filter && this._renderFilter(messages), + shouldRenderList && _react2['default'].createElement(List, babelHelpers._extends({ ref: 'list' + }, listProps, { + data: items, + id: listID, + 'aria-live': open && 'polite', + 'aria-labelledby': _utilWidgetHelpers.instanceId(this), + 'aria-hidden': !this.props.open, + selected: selectedItem, + focused: open ? focusedItem : null, + onSelect: this._onSelect, + onMove: this._scrollTo, + messages: { + emptyList: data.length ? messages.emptyFilter : messages.emptyList + } })) + ) + ) + ); + } + }, { + key: '_renderFilter', + value: function _renderFilter(messages) { + var _this2 = this; + + return _react2['default'].createElement( + 'div', + { ref: 'filterWrapper', className: 'rw-filter-input' }, + _react2['default'].createElement( + 'span', + { className: 'rw-select rw-btn' }, + _react2['default'].createElement('i', { className: 'rw-i rw-i-search' }) + ), + _react2['default'].createElement('input', { ref: 'filter', className: 'rw-input', + placeholder: _util_2['default'].result(messages.filterPlaceholder, this.props), + value: this.props.searchTerm, + onChange: function (e) { + return _utilWidgetHelpers.notify(_this2.props.onSearch, e.target.value); + } }) + ); + } + }, { + key: '_focus', + decorators: [_utilInteraction.widgetEnabled], + value: function _focus(focused, e) { + var _this3 = this; + + this.setTimeout('focus', function () { + if (!focused) _this3.close(); + + if (focused !== _this3.state.focused) { + _utilWidgetHelpers.notify(_this3.props[focused ? 'onFocus' : 'onBlur'], e); + _this3.setState({ focused: focused }); + } + }); + } + }, { + key: '_onSelect', + decorators: [_utilInteraction.widgetEditable], + value: function _onSelect(data) { + this.close(); + _utilWidgetHelpers.notify(this.props.onSelect, data); + this.change(data); + this.focus(this); + } + }, { + key: '_click', + decorators: [_utilInteraction.widgetEditable], + value: function _click(e) { + var wrapper = this.refs.filterWrapper; + + if (!this.props.filter || !this.props.open) this.toggle();else if (!_domHelpersQueryContains2['default'](_utilCompat2['default'].findDOMNode(wrapper), e.target)) this.close(); + + _utilWidgetHelpers.notify(this.props.onClick, e); + } + }, { + key: '_keyDown', + decorators: [_utilInteraction.widgetEditable], + value: function _keyDown(e) { + var _this4 = this; + + var self = this, + key = e.key, + alt = e.altKey, + list = this.refs.list, + filtering = this.props.filter, + focusedItem = this.state.focusedItem, + selectedItem = this.state.selectedItem, + isOpen = this.props.open, + closeWithFocus = function closeWithFocus() { + _this4.close(), _utilCompat2['default'].findDOMNode(_this4).focus(); + }; + + _utilWidgetHelpers.notify(this.props.onKeyDown, [e]); + + if (e.defaultPrevented) return; + + if (key === 'End') { + if (isOpen) this.setState({ focusedItem: list.last() });else change(list.last()); + e.preventDefault(); + } else if (key === 'Home') { + if (isOpen) this.setState({ focusedItem: list.first() });else change(list.first()); + e.preventDefault(); + } else if (key === 'Escape' && isOpen) { + closeWithFocus(); + } else if ((key === 'Enter' || key === ' ' && !filtering) && isOpen) { + change(this.state.focusedItem, true); + } else if (key === 'ArrowDown') { + if (alt) this.open();else if (isOpen) this.setState({ focusedItem: list.next(focusedItem) });else change(list.next(selectedItem)); + e.preventDefault(); + } else if (key === 'ArrowUp') { + if (alt) closeWithFocus();else if (isOpen) this.setState({ focusedItem: list.prev(focusedItem) });else change(list.prev(selectedItem)); + e.preventDefault(); + } else if (!(this.props.filter && isOpen)) this.search(String.fromCharCode(e.keyCode), function (item) { + isOpen ? _this4.setState({ focusedItem: item }) : change(item); + }); + + function change(item, fromList) { + if (!item) return; + fromList ? self._onSelect(item) : self.change(item); + } + } + }, { + key: 'change', + value: function change(data) { + if (!_util_2['default'].isShallowEqual(data, this.props.value)) { + _utilWidgetHelpers.notify(this.props.onChange, data); + _utilWidgetHelpers.notify(this.props.onSearch, ''); + this.close(); + } + } + }, { + key: 'focus', + value: function focus(target) { + var inst = target || (this.props.filter && this.props.open ? this.refs.filter : this.refs.input); + + if (_domHelpersActiveElement2['default']() !== _utilCompat2['default'].findDOMNode(inst)) _utilCompat2['default'].findDOMNode(inst).focus(); + } + }, { + key: '_data', + value: function _data() { + return this.state.filteredData || this.props.data.concat(); + } + }, { + key: 'search', + value: function search(character, cb) { + var _this5 = this; + + var word = ((this._searchTerm || '') + character).toLowerCase(); + + this._searchTerm = word; + + this.setTimeout('search', function () { + var list = _this5.refs.list, + key = _this5.props.open ? 'focusedItem' : 'selectedItem', + item = list.next(_this5.state[key], word); + + _this5._searchTerm = ''; + if (item) cb(item); + }, this.props.delay); + } + }, { + key: 'open', + value: function open() { + _utilWidgetHelpers.notify(this.props.onToggle, true); + } + }, { + key: 'close', + value: function close() { + _utilWidgetHelpers.notify(this.props.onToggle, false); + } + }, { + key: 'toggle', + value: function toggle() { + this.props.open ? this.close() : this.open(); + } + }])); + + function msgs(msgs) { + return babelHelpers._extends({ + open: 'open dropdown', + filterPlaceholder: '', + emptyList: 'There are no items in this list', + emptyFilter: 'The filter returned no results' + }, msgs); + } + + exports['default'] = _uncontrollable2['default'](DropdownList, { open: 'onToggle', value: 'onChange', searchTerm: 'onSearch' }); + module.exports = exports['default']; + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(12); + + exports.__esModule = true; + + /** + * document.activeElement + */ + exports['default'] = activeElement; + + var _ownerDocument = __webpack_require__(24); + + var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument); + + function activeElement() { + var doc = arguments[0] === undefined ? document : arguments[0]; + + try { + return doc.activeElement; + } catch (e) {} + } + + module.exports = exports['default']; + +/***/ }, +/* 24 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + exports["default"] = ownerDocument; + + function ownerDocument(node) { + return node && node.ownerDocument || document; + } + + module.exports = exports["default"]; + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var canUseDOM = __webpack_require__(15); + + var contains = (function () { + var root = canUseDOM && document.documentElement; + + return root && root.contains ? function (context, node) { + return context.contains(node); + } : root && root.compareDocumentPosition ? function (context, node) { + return context === node || !!(context.compareDocumentPosition(node) & 16); + } : function (context, node) { + if (node) do { + if (node === context) return true; + } while (node = node.parentNode); + + return false; + }; + })(); + + module.exports = contains; + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_RESULT__;/*! + Copyright (c) 2015 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames + */ + /* global define */ + + (function () { + 'use strict'; + + var hasOwn = {}.hasOwnProperty; + + function classNames () { + var classes = ''; + + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i]; + if (!arg) continue; + + var argType = typeof arg; + + if (argType === 'string' || argType === 'number') { + classes += ' ' + arg; + } else if (Array.isArray(arg)) { + classes += ' ' + classNames.apply(null, arg); + } else if (argType === 'object') { + for (var key in arg) { + if (hasOwn.call(arg, key) && arg[key]) { + classes += ' ' + key; + } + } + } + } + + return classes.substr(1); + } + + if (typeof module !== 'undefined' && module.exports) { + module.exports = classNames; + } else if (true) { + // register as 'classnames', consistent with npm package name + !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { + return classNames; + }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else { + window.classNames = classNames; + } + }()); + + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + var _react = __webpack_require__(21); + + var _react2 = babelHelpers.interopRequireDefault(_react); + + var _domHelpersStyle = __webpack_require__(7); + + var _domHelpersStyle2 = babelHelpers.interopRequireDefault(_domHelpersStyle); + + var _domHelpersQueryHeight = __webpack_require__(28); + + var _domHelpersQueryHeight2 = babelHelpers.interopRequireDefault(_domHelpersQueryHeight); + + var _utilConfiguration = __webpack_require__(4); + + var _utilConfiguration2 = babelHelpers.interopRequireDefault(_utilConfiguration); + + var _classnames = __webpack_require__(26); + + var _classnames2 = babelHelpers.interopRequireDefault(_classnames); + + var _utilCompat = __webpack_require__(31); + + var _utilCompat2 = babelHelpers.interopRequireDefault(_utilCompat); + + var transform = _utilConfiguration2['default'].animate.transform; + + function properties(prop, value) { + var _ref, _ref2; + + var TRANSLATION_MAP = _utilConfiguration2['default'].animate.TRANSLATION_MAP; + + if (TRANSLATION_MAP && TRANSLATION_MAP[prop]) return (_ref = {}, _ref[transform] = TRANSLATION_MAP[prop] + '(' + value + ')', _ref); + + return (_ref2 = {}, _ref2[prop] = value, _ref2); + } + + var PopupContent = _react2['default'].createClass({ + displayName: 'PopupContent', + + render: function render() { + var child = this.props.children; + + if (!child) return _react2['default'].createElement('span', { className: 'rw-popup rw-widget' }); + + child = _react2['default'].Children.only(this.props.children); + + return _react.cloneElement(child, { + className: _classnames2['default'](child.props.className, 'rw-popup rw-widget') + }); + } + }); + + module.exports = _react2['default'].createClass({ + + displayName: 'Popup', + + propTypes: { + open: _react2['default'].PropTypes.bool, + dropUp: _react2['default'].PropTypes.bool, + duration: _react2['default'].PropTypes.number, + + onRequestClose: _react2['default'].PropTypes.func.isRequired, + onClosing: _react2['default'].PropTypes.func, + onOpening: _react2['default'].PropTypes.func, + onClose: _react2['default'].PropTypes.func, + onOpen: _react2['default'].PropTypes.func + }, + + getInitialState: function getInitialState() { + return {}; + }, + + getDefaultProps: function getDefaultProps() { + return { + duration: 200, + open: false, + onClosing: function onClosing() {}, + onOpening: function onOpening() {}, + onClose: function onClose() {}, + onOpen: function onOpen() {} + }; + }, + + // componentDidMount(){ + // !this.props.open && this.close(0) + // }, + componentWillMount: function componentWillMount() { + !this.props.open && (this._initialPosition = true); + }, + + componentWillReceiveProps: function componentWillReceiveProps(nextProps) { + this.setState({ + contentChanged: childKey(nextProps.children) !== childKey(this.props.children) + }); + }, + + componentDidUpdate: function componentDidUpdate(pvProps) { + var closing = pvProps.open && !this.props.open, + opening = !pvProps.open && this.props.open, + open = this.props.open; + + if (opening) this.open();else if (closing) this.close();else if (open) this.height(); + }, + + render: function render() { + var _props = this.props; + var className = _props.className; + var open = _props.open; + var dropUp = _props.dropUp; + var props = babelHelpers.objectWithoutProperties(_props, ['className', 'open', 'dropUp']); + var display = open ? 'block' : void 0; + + if (this._initialPosition) { + display = 'none'; + } + + return _react2['default'].createElement( + 'div', + babelHelpers._extends({}, props, { + style: babelHelpers._extends({ + display: display, + height: this.state.height + }, props.style), + className: _classnames2['default'](className, 'rw-popup-container', { 'rw-dropup': dropUp }) + }), + _react2['default'].createElement( + PopupContent, + { ref: 'content' }, + this.props.children + ) + ); + }, + + reset: function reset() { + var container = _utilCompat2['default'].findDOMNode(this), + content = _utilCompat2['default'].findDOMNode(this.refs.content), + style = { display: 'block', overflow: 'hidden' }; + + _domHelpersStyle2['default'](container, style); + this.height(); + _domHelpersStyle2['default'](content, properties('top', this.props.dropUp ? '100%' : '-100%')); + }, + + height: function height() { + var el = _utilCompat2['default'].findDOMNode(this), + content = _utilCompat2['default'].findDOMNode(this.refs.content), + margin = parseInt(_domHelpersStyle2['default'](content, 'margin-top'), 10) + parseInt(_domHelpersStyle2['default'](content, 'margin-bottom'), 10); + + var height = _domHelpersQueryHeight2['default'](content) + (isNaN(margin) ? 0 : margin); + + if (this.state.height !== height) { + el.style.height = height + 'px'; + this.setState({ height: height }); + } + }, + + open: function open() { + var self = this, + anim = _utilCompat2['default'].findDOMNode(this), + el = _utilCompat2['default'].findDOMNode(this.refs.content); + + this.ORGINAL_POSITION = _domHelpersStyle2['default'](el, 'position'); + this._isOpening = true; + + if (this._initialPosition) { + this._initialPosition = false; + this.reset(); + } else this.height(); + + this.props.onOpening(); + + anim.className += ' rw-popup-animating'; + el.style.position = 'absolute'; + + _utilConfiguration2['default'].animate(el, { top: 0 }, self.props.duration, 'ease', function () { + if (!self._isOpening) return; + + anim.className = anim.className.replace(/ ?rw-popup-animating/g, ''); + + el.style.position = self.ORGINAL_POSITION; + anim.style.overflow = 'visible'; + self.ORGINAL_POSITION = null; + + self.props.onOpen(); + }); + }, + + close: function close(dur) { + var self = this, + el = _utilCompat2['default'].findDOMNode(this.refs.content), + anim = _utilCompat2['default'].findDOMNode(this); + + this.ORGINAL_POSITION = _domHelpersStyle2['default'](el, 'position'); + + this._isOpening = false; + this.height(); + this.props.onClosing(); + + anim.style.overflow = 'hidden'; + anim.className += ' rw-popup-animating'; + el.style.position = 'absolute'; + + _utilConfiguration2['default'].animate(el, { top: this.props.dropUp ? '100%' : '-100%' }, dur === undefined ? this.props.duration : dur, 'ease', function () { + if (self._isOpening) return; + + el.style.position = self.ORGINAL_POSITION; + anim.className = anim.className.replace(/ ?rw-popup-animating/g, ''); + + anim.style.display = 'none'; + self.ORGINAL_POSITION = null; + self.props.onClose(); + }); + } + + }); + + function childKey(children) { + var nextChildMapping = _react2['default'].Children.map(children, function (c) { + return c; + }); + for (var key in nextChildMapping) return key; + } + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var offset = __webpack_require__(29), + getWindow = __webpack_require__(30); + + module.exports = function height(node, client) { + var win = getWindow(node); + return win ? win.innerHeight : client ? node.clientHeight : offset(node).height; + }; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var contains = __webpack_require__(25), + getWindow = __webpack_require__(30), + ownerDocument = __webpack_require__(24); + + module.exports = function offset(node) { + var doc = ownerDocument(node), + win = getWindow(doc), + docElem = doc && doc.documentElement, + box = { top: 0, left: 0, height: 0, width: 0 }; + + if (!doc) return; + + // Make sure it's not a disconnected DOM node + if (!contains(docElem, node)) return box; + + if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect(); + + if (box.width || box.height) { + + box = { + top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0), + left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0), + width: (box.width == null ? node.offsetWidth : box.width) || 0, + height: (box.height == null ? node.offsetHeight : box.height) || 0 + }; + } + + return box; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports) { + + 'use strict'; + + module.exports = function getWindow(node) { + return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false; + }; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + var _react = __webpack_require__(21); + + var _react2 = babelHelpers.interopRequireDefault(_react); + + var _reactDom = __webpack_require__(32); + + var _reactDom2 = babelHelpers.interopRequireDefault(_reactDom); + + var _version = _react2['default'].version.split('.').map(parseFloat); + + module.exports = { + + version: function version() { + return _version; + }, + + findDOMNode: function findDOMNode(component) { + return _reactDom2['default'].findDOMNode(component); + } + + }; + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_32__; + +/***/ }, +/* 33 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var babelHelpers = __webpack_require__(2); + + var _react = __webpack_require__(21); + + var _react2 = babelHelpers.interopRequireDefault(_react); + + var _localizers = __webpack_require__(18); + + var _localizers2 = babelHelpers.interopRequireDefault(_localizers); + + var _filter = __webpack_require__(34); + + var _filter2 = babelHelpers.interopRequireDefault(_filter); + + var filterTypes = Object.keys(_filter2['default']).filter(function (i) { + return i !== 'filter'; + }); + + function getInteractionPropType(key) { + var types = [_react.PropTypes.bool, _react.PropTypes.oneOf([key])], + propType = _react.PropTypes.oneOfType(types); + + propType.acceptsArray = _react.PropTypes.oneOfType(types.concat(_react.PropTypes.array)); + + return propType; + } + + module.exports = { + + elementType: createChainableTypeChecker(function (props, propName, componentName) { + + if (typeof props[propName] !== 'function') { + if (_react2['default'].isValidElement(props[propName])) return new Error('Invalid prop `' + propName + '` specified in `' + componentName + '`.' + ' Expected an Element `type`, not an actual Element'); + + if (typeof props[propName] !== 'string') return new Error('Invalid prop `' + propName + '` specified in `' + componentName + '`.' + ' Expected an Element `type` such as a tag name or return value of React.createClass(...)'); + } + return null; + }), + + numberFormat: createChainableTypeChecker(function () { + var _localizers$number; + + return (_localizers$number = _localizers2['default'].number).propType.apply(_localizers$number, arguments); + }), + + dateFormat: createChainableTypeChecker(function () { + var _localizers$date; + + return (_localizers$date = _localizers2['default'].date).propType.apply(_localizers$date, arguments); + }), + + disabled: getInteractionPropType('disabled'), + readOnly: getInteractionPropType('readOnly'), + + accessor: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.func]), + + message: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.func, _react2['default'].PropTypes.string]), + + filter: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.func, _react2['default'].PropTypes.bool, _react2['default'].PropTypes.oneOf(filterTypes)]) + }; + + function createChainableTypeChecker(validate) { + + function checkType(isRequired, props, propName, componentName, location) { + componentName = componentName || '<<anonymous>>'; + if (props[propName] == null) { + if (isRequired) { + return new Error('Required prop `' + propName + '` was not specified in `' + componentName + '`.'); + } + } else return validate(props, propName, componentName, location); + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + +/***/ }, +/* 34 */ +/***/ function(module, exports) { + + "use strict"; + + exports.__esModule = true; + var common = { + eq: function eq(a, b) { + return a === b; + }, + neq: function neq(a, b) { + return a !== b; + }, + gt: function gt(a, b) { + return a > b; + }, + gte: function gte(a, b) { + return a >= b; + },
[added] selectlist selectAll() method