Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-select-module

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-module - npm Package Compare versions

Comparing version 3.2.0 to 3.2.1

288

animated/dist/react-select.browser.cjs.js

@@ -1,275 +0,15 @@

'use strict';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck'));
var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass'));
var _inherits = _interopDefault(require('@babel/runtime/helpers/inherits'));
var _possibleConstructorReturn = _interopDefault(require('@babel/runtime/helpers/possibleConstructorReturn'));
var _getPrototypeOf = _interopDefault(require('@babel/runtime/helpers/getPrototypeOf'));
var React = require('react');
var React__default = _interopDefault(React);
var memoizeOne = _interopDefault(require('memoize-one'));
require('@emotion/core');
require('react-dom');
require('@babel/runtime/helpers/typeof');
var index$1 = require('../../dist/index-3f7cd5d8.browser.cjs.js');
require('@emotion/css');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('react-input-autosize');
var reactTransitionGroup = require('react-transition-group');
// strip transition props off before spreading onto select component
// note we need to be explicit about innerRef for flow
var AnimatedInput = function AnimatedInput(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
appear = _ref.appear,
enter = _ref.enter,
exit = _ref.exit,
props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]);
return /*#__PURE__*/React__default.createElement(WrappedComponent, props);
};
};
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var Fade = function Fade(_ref) {
var Tag = _ref.component,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 1 : _ref$duration,
inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]);
var transition = {
entering: {
opacity: 0
},
entered: {
opacity: 1,
transition: "opacity ".concat(duration, "ms")
},
exiting: {
opacity: 0
},
exited: {
opacity: 0
}
};
return /*#__PURE__*/React__default.createElement(reactTransitionGroup.Transition, {
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: duration
}, function (state) {
var innerProps = {
style: _objectSpread({}, transition[state])
};
return /*#__PURE__*/React__default.createElement(Tag, _extends({
innerProps: innerProps
}, props));
});
}; // ==============================
// Collapse Transition
// ==============================
var collapseDuration = 260;
// wrap each MultiValue with a collapse transition; decreases width until
// finally removing from DOM
var Collapse = /*#__PURE__*/function (_Component) {
_inherits(Collapse, _Component);
var _super = _createSuper(Collapse);
function Collapse() {
var _this;
_classCallCheck(this, Collapse);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_this.duration = collapseDuration;
_this.rafID = void 0;
_this.state = {
width: 'auto'
};
_this.transition = {
exiting: {
width: 0,
transition: "width ".concat(_this.duration, "ms ease-out")
},
exited: {
width: 0
}
};
_this.getWidth = function (ref) {
if (ref && isNaN(_this.state.width)) {
/*
Here we're invoking requestAnimationFrame with a callback invoking our
call to getBoundingClientRect and setState in order to resolve an edge case
around portalling. Certain portalling solutions briefly remove children from the DOM
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
while the Select component is in this state.
*/
// cannot use `offsetWidth` because it is rounded
_this.rafID = window.requestAnimationFrame(function () {
var _ref$getBoundingClien = ref.getBoundingClientRect(),
width = _ref$getBoundingClien.width;
_this.setState({
width: width
});
});
}
};
_this.getStyle = function (width) {
return {
overflow: 'hidden',
whiteSpace: 'nowrap',
width: width
};
};
_this.getTransition = function (state) {
return _this.transition[state];
};
return _this;
}
_createClass(Collapse, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.rafID) {
window.cancelAnimationFrame(this.rafID);
}
} // width must be calculated; cannot transition from `undefined` to `number`
}, {
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
children = _this$props.children,
inProp = _this$props.in;
var width = this.state.width;
return /*#__PURE__*/React__default.createElement(reactTransitionGroup.Transition, {
enter: false,
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: this.duration
}, function (state) {
var style = _objectSpread(_objectSpread({}, _this2.getStyle(width)), _this2.getTransition(state));
return /*#__PURE__*/React__default.createElement("div", {
ref: _this2.getWidth,
style: style
}, children);
});
}
}]);
return Collapse;
}(React.Component);
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, ["in", "onExited"]);
return /*#__PURE__*/React__default.createElement(Collapse, {
in: inProp,
onExited: onExited
}, /*#__PURE__*/React__default.createElement(WrappedComponent, _extends({
cropWithEllipsis: inProp
}, props)));
};
};
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__default.createElement(Fade, _extends({
component: WrappedComponent,
duration: props.isMulti ? collapseDuration : 1
}, props));
};
};
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__default.createElement(Fade, _extends({
component: WrappedComponent
}, props));
};
};
// make ValueContainer a transition group
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__default.createElement(reactTransitionGroup.TransitionGroup, _extends({
component: WrappedComponent
}, props));
};
};
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var makeAnimated = function makeAnimated() {
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components = index$1.defaultComponents({
components: externalComponents
});
var Input = components.Input,
MultiValue = components.MultiValue,
Placeholder = components.Placeholder,
SingleValue = components.SingleValue,
ValueContainer = components.ValueContainer,
rest = _objectWithoutProperties(components, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]);
return _objectSpread$1({
Input: AnimatedInput(Input),
MultiValue: AnimatedMultiValue(MultiValue),
Placeholder: AnimatedPlaceholder(Placeholder),
SingleValue: AnimatedSingleValue(SingleValue),
ValueContainer: AnimatedValueContainer(ValueContainer)
}, rest);
};
var AnimatedComponents = makeAnimated();
var Input = AnimatedComponents.Input;
var MultiValue = AnimatedComponents.MultiValue;
var Placeholder = AnimatedComponents.Placeholder;
var SingleValue = AnimatedComponents.SingleValue;
var ValueContainer = AnimatedComponents.ValueContainer;
var index = memoizeOne(makeAnimated, index$1.exportedEqual);
exports.Input = Input;
exports.MultiValue = MultiValue;
exports.Placeholder = Placeholder;
exports.SingleValue = SingleValue;
exports.ValueContainer = ValueContainer;
exports.default = index;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/animated/index.js")

@@ -1,264 +0,15 @@

import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import _extends from '@babel/runtime/helpers/esm/extends';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import memoizeOne from 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import { B as exportedEqual, y as defaultComponents } from '../../dist/index-75b02bac.browser.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { Transition, TransitionGroup } from 'react-transition-group';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
// strip transition props off before spreading onto select component
// note we need to be explicit about innerRef for flow
var AnimatedInput = function AnimatedInput(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
appear = _ref.appear,
enter = _ref.enter,
exit = _ref.exit,
props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]);
return /*#__PURE__*/React.createElement(WrappedComponent, props);
};
};
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var Fade = function Fade(_ref) {
var Tag = _ref.component,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 1 : _ref$duration,
inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]);
var transition = {
entering: {
opacity: 0
},
entered: {
opacity: 1,
transition: "opacity ".concat(duration, "ms")
},
exiting: {
opacity: 0
},
exited: {
opacity: 0
}
};
return /*#__PURE__*/React.createElement(Transition, {
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: duration
}, function (state) {
var innerProps = {
style: _objectSpread({}, transition[state])
};
return /*#__PURE__*/React.createElement(Tag, _extends({
innerProps: innerProps
}, props));
});
}; // ==============================
// Collapse Transition
// ==============================
var collapseDuration = 260;
// wrap each MultiValue with a collapse transition; decreases width until
// finally removing from DOM
var Collapse = /*#__PURE__*/function (_Component) {
_inherits(Collapse, _Component);
var _super = _createSuper(Collapse);
function Collapse() {
var _this;
_classCallCheck(this, Collapse);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_this.duration = collapseDuration;
_this.rafID = void 0;
_this.state = {
width: 'auto'
};
_this.transition = {
exiting: {
width: 0,
transition: "width ".concat(_this.duration, "ms ease-out")
},
exited: {
width: 0
}
};
_this.getWidth = function (ref) {
if (ref && isNaN(_this.state.width)) {
/*
Here we're invoking requestAnimationFrame with a callback invoking our
call to getBoundingClientRect and setState in order to resolve an edge case
around portalling. Certain portalling solutions briefly remove children from the DOM
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
while the Select component is in this state.
*/
// cannot use `offsetWidth` because it is rounded
_this.rafID = window.requestAnimationFrame(function () {
var _ref$getBoundingClien = ref.getBoundingClientRect(),
width = _ref$getBoundingClien.width;
_this.setState({
width: width
});
});
}
};
_this.getStyle = function (width) {
return {
overflow: 'hidden',
whiteSpace: 'nowrap',
width: width
};
};
_this.getTransition = function (state) {
return _this.transition[state];
};
return _this;
}
_createClass(Collapse, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.rafID) {
window.cancelAnimationFrame(this.rafID);
}
} // width must be calculated; cannot transition from `undefined` to `number`
}, {
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
children = _this$props.children,
inProp = _this$props.in;
var width = this.state.width;
return /*#__PURE__*/React.createElement(Transition, {
enter: false,
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: this.duration
}, function (state) {
var style = _objectSpread(_objectSpread({}, _this2.getStyle(width)), _this2.getTransition(state));
return /*#__PURE__*/React.createElement("div", {
ref: _this2.getWidth,
style: style
}, children);
});
}
}]);
return Collapse;
}(Component);
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, ["in", "onExited"]);
return /*#__PURE__*/React.createElement(Collapse, {
in: inProp,
onExited: onExited
}, /*#__PURE__*/React.createElement(WrappedComponent, _extends({
cropWithEllipsis: inProp
}, props)));
};
};
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(Fade, _extends({
component: WrappedComponent,
duration: props.isMulti ? collapseDuration : 1
}, props));
};
};
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(Fade, _extends({
component: WrappedComponent
}, props));
};
};
// make ValueContainer a transition group
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(TransitionGroup, _extends({
component: WrappedComponent
}, props));
};
};
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var makeAnimated = function makeAnimated() {
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components = defaultComponents({
components: externalComponents
});
var Input = components.Input,
MultiValue = components.MultiValue,
Placeholder = components.Placeholder,
SingleValue = components.SingleValue,
ValueContainer = components.ValueContainer,
rest = _objectWithoutProperties(components, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]);
return _objectSpread$1({
Input: AnimatedInput(Input),
MultiValue: AnimatedMultiValue(MultiValue),
Placeholder: AnimatedPlaceholder(Placeholder),
SingleValue: AnimatedSingleValue(SingleValue),
ValueContainer: AnimatedValueContainer(ValueContainer)
}, rest);
};
var AnimatedComponents = makeAnimated();
var Input = AnimatedComponents.Input;
var MultiValue = AnimatedComponents.MultiValue;
var Placeholder = AnimatedComponents.Placeholder;
var SingleValue = AnimatedComponents.SingleValue;
var ValueContainer = AnimatedComponents.ValueContainer;
var index = memoizeOne(makeAnimated, exportedEqual);
export default index;
export { Input, MultiValue, Placeholder, SingleValue, ValueContainer };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/animated/index.js")

24

animated/dist/react-select.cjs.js

@@ -1,7 +0,19 @@

'use strict';
"use strict";
// this file might look strange and you might be wondering what it's for
// it's lets you import your source files by importing this entrypoint
// as you would import it if it was built with preconstruct build
// this file is slightly different to some others though
// it has a require hook which compiles your code with Babel
// this means that you don't have to set up @babel/register or anything like that
// but you can still require this module and it'll be compiled
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}
// this bit of code imports the require hook and registers it
let unregister = require("/Users/talko/Development/react-select/node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook("/Users/talko/Development/react-select");
// this re-exports the source file
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/animated/index.js");
// this unregisters the require hook so that any modules required after this one
// aren't compiled with the require hook in case you have some other require hook
// or something that should be used on other modules
unregister();

@@ -1,264 +0,15 @@

import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import _extends from '@babel/runtime/helpers/esm/extends';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import memoizeOne from 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import { B as exportedEqual, y as defaultComponents } from '../../dist/index-fa0d9f94.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { Transition, TransitionGroup } from 'react-transition-group';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
// strip transition props off before spreading onto select component
// note we need to be explicit about innerRef for flow
var AnimatedInput = function AnimatedInput(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
appear = _ref.appear,
enter = _ref.enter,
exit = _ref.exit,
props = _objectWithoutProperties(_ref, ["in", "onExited", "appear", "enter", "exit"]);
return /*#__PURE__*/React.createElement(WrappedComponent, props);
};
};
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var Fade = function Fade(_ref) {
var Tag = _ref.component,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 1 : _ref$duration,
inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, ["component", "duration", "in", "onExited"]);
var transition = {
entering: {
opacity: 0
},
entered: {
opacity: 1,
transition: "opacity ".concat(duration, "ms")
},
exiting: {
opacity: 0
},
exited: {
opacity: 0
}
};
return /*#__PURE__*/React.createElement(Transition, {
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: duration
}, function (state) {
var innerProps = {
style: _objectSpread({}, transition[state])
};
return /*#__PURE__*/React.createElement(Tag, _extends({
innerProps: innerProps
}, props));
});
}; // ==============================
// Collapse Transition
// ==============================
var collapseDuration = 260;
// wrap each MultiValue with a collapse transition; decreases width until
// finally removing from DOM
var Collapse = /*#__PURE__*/function (_Component) {
_inherits(Collapse, _Component);
var _super = _createSuper(Collapse);
function Collapse() {
var _this;
_classCallCheck(this, Collapse);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_this.duration = collapseDuration;
_this.rafID = void 0;
_this.state = {
width: 'auto'
};
_this.transition = {
exiting: {
width: 0,
transition: "width ".concat(_this.duration, "ms ease-out")
},
exited: {
width: 0
}
};
_this.getWidth = function (ref) {
if (ref && isNaN(_this.state.width)) {
/*
Here we're invoking requestAnimationFrame with a callback invoking our
call to getBoundingClientRect and setState in order to resolve an edge case
around portalling. Certain portalling solutions briefly remove children from the DOM
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
while the Select component is in this state.
*/
// cannot use `offsetWidth` because it is rounded
_this.rafID = window.requestAnimationFrame(function () {
var _ref$getBoundingClien = ref.getBoundingClientRect(),
width = _ref$getBoundingClien.width;
_this.setState({
width: width
});
});
}
};
_this.getStyle = function (width) {
return {
overflow: 'hidden',
whiteSpace: 'nowrap',
width: width
};
};
_this.getTransition = function (state) {
return _this.transition[state];
};
return _this;
}
_createClass(Collapse, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.rafID) {
window.cancelAnimationFrame(this.rafID);
}
} // width must be calculated; cannot transition from `undefined` to `number`
}, {
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
children = _this$props.children,
inProp = _this$props.in;
var width = this.state.width;
return /*#__PURE__*/React.createElement(Transition, {
enter: false,
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: this.duration
}, function (state) {
var style = _objectSpread(_objectSpread({}, _this2.getStyle(width)), _this2.getTransition(state));
return /*#__PURE__*/React.createElement("div", {
ref: _this2.getWidth,
style: style
}, children);
});
}
}]);
return Collapse;
}(Component);
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, ["in", "onExited"]);
return /*#__PURE__*/React.createElement(Collapse, {
in: inProp,
onExited: onExited
}, /*#__PURE__*/React.createElement(WrappedComponent, _extends({
cropWithEllipsis: inProp
}, props)));
};
};
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(Fade, _extends({
component: WrappedComponent,
duration: props.isMulti ? collapseDuration : 1
}, props));
};
};
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(Fade, _extends({
component: WrappedComponent
}, props));
};
};
// make ValueContainer a transition group
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(TransitionGroup, _extends({
component: WrappedComponent
}, props));
};
};
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var makeAnimated = function makeAnimated() {
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components = defaultComponents({
components: externalComponents
});
var Input = components.Input,
MultiValue = components.MultiValue,
Placeholder = components.Placeholder,
SingleValue = components.SingleValue,
ValueContainer = components.ValueContainer,
rest = _objectWithoutProperties(components, ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"]);
return _objectSpread$1({
Input: AnimatedInput(Input),
MultiValue: AnimatedMultiValue(MultiValue),
Placeholder: AnimatedPlaceholder(Placeholder),
SingleValue: AnimatedSingleValue(SingleValue),
ValueContainer: AnimatedValueContainer(ValueContainer)
}, rest);
};
var AnimatedComponents = makeAnimated();
var Input = AnimatedComponents.Input;
var MultiValue = AnimatedComponents.MultiValue;
var Placeholder = AnimatedComponents.Placeholder;
var SingleValue = AnimatedComponents.SingleValue;
var ValueContainer = AnimatedComponents.ValueContainer;
var index = memoizeOne(makeAnimated, exportedEqual);
export default index;
export { Input, MultiValue, Placeholder, SingleValue, ValueContainer };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/animated/index.js")

@@ -1,34 +0,15 @@

'use strict';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
Object.defineProperty(exports, '__esModule', { value: true });
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/extends');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/toConsumableArray');
require('@babel/runtime/helpers/defineProperty');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/assertThisInitialized');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/possibleConstructorReturn');
require('@babel/runtime/helpers/getPrototypeOf');
require('react');
require('memoize-one');
require('@emotion/core');
require('react-dom');
require('@babel/runtime/helpers/typeof');
require('../../dist/index-3f7cd5d8.browser.cjs.js');
var reactSelect = require('../../dist/Select-059b9809.browser.cjs.js');
require('@emotion/css');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('react-input-autosize');
var stateManager = require('../../dist/stateManager-8478caa9.browser.cjs.js');
var reactSelect$1 = require('../../async/dist/react-select.browser.cjs.js');
var reactSelect$2 = require('../../creatable/dist/react-select.browser.cjs.js');
var SelectCreatable = reactSelect$2.makeCreatableSelect(reactSelect.Select);
var SelectCreatableState = stateManager.manageState(SelectCreatable);
var AsyncCreatable = reactSelect$1.makeAsyncSelect(SelectCreatableState);
exports.default = AsyncCreatable;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/AsyncCreatable.js")

@@ -1,30 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/possibleConstructorReturn';
import '@babel/runtime/helpers/getPrototypeOf';
import 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import '../../dist/index-75b02bac.browser.esm.js';
import { S as Select } from '../../dist/Select-e1cf49ae.browser.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from '../../dist/stateManager-2f2b6f5b.browser.esm.js';
import { makeAsyncSelect } from '../../async/dist/react-select.browser.esm.js';
import { makeCreatableSelect } from '../../creatable/dist/react-select.browser.esm.js';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
var SelectCreatable = makeCreatableSelect(Select);
var SelectCreatableState = manageState(SelectCreatable);
var AsyncCreatable = makeAsyncSelect(SelectCreatableState);
export default AsyncCreatable;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/AsyncCreatable.js")

@@ -1,7 +0,19 @@

'use strict';
"use strict";
// this file might look strange and you might be wondering what it's for
// it's lets you import your source files by importing this entrypoint
// as you would import it if it was built with preconstruct build
// this file is slightly different to some others though
// it has a require hook which compiles your code with Babel
// this means that you don't have to set up @babel/register or anything like that
// but you can still require this module and it'll be compiled
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}
// this bit of code imports the require hook and registers it
let unregister = require("/Users/talko/Development/react-select/node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook("/Users/talko/Development/react-select");
// this re-exports the source file
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/AsyncCreatable.js");
// this unregisters the require hook so that any modules required after this one
// aren't compiled with the require hook in case you have some other require hook
// or something that should be used on other modules
unregister();

@@ -1,30 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/possibleConstructorReturn';
import '@babel/runtime/helpers/getPrototypeOf';
import 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import '../../dist/index-fa0d9f94.esm.js';
import { S as Select } from '../../dist/Select-e132d453.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from '../../dist/stateManager-4518fdaa.esm.js';
import { makeAsyncSelect } from '../../async/dist/react-select.esm.js';
import { makeCreatableSelect } from '../../creatable/dist/react-select.esm.js';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
var SelectCreatable = makeCreatableSelect(Select);
var SelectCreatableState = manageState(SelectCreatable);
var AsyncCreatable = makeAsyncSelect(SelectCreatableState);
export default AsyncCreatable;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/AsyncCreatable.js")

@@ -1,229 +0,15 @@

'use strict';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/toConsumableArray');
require('@babel/runtime/helpers/defineProperty');
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck'));
var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass'));
require('@babel/runtime/helpers/assertThisInitialized');
var _inherits = _interopDefault(require('@babel/runtime/helpers/inherits'));
var _possibleConstructorReturn = _interopDefault(require('@babel/runtime/helpers/possibleConstructorReturn'));
var _getPrototypeOf = _interopDefault(require('@babel/runtime/helpers/getPrototypeOf'));
var React = require('react');
var React__default = _interopDefault(React);
require('memoize-one');
require('@emotion/core');
require('react-dom');
require('@babel/runtime/helpers/typeof');
var index$1 = require('../../dist/index-3f7cd5d8.browser.cjs.js');
var reactSelect = require('../../dist/Select-059b9809.browser.cjs.js');
require('@emotion/css');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('react-input-autosize');
var stateManager = require('../../dist/stateManager-8478caa9.browser.cjs.js');
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var defaultProps = {
cacheOptions: false,
defaultOptions: false,
filterOption: null,
isLoading: false
};
var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_Component) {
_inherits(Async, _Component);
var _super = _createSuper(Async);
function Async(props) {
var _this;
_classCallCheck(this, Async);
_this = _super.call(this);
_this.select = void 0;
_this.lastRequest = void 0;
_this.mounted = false;
_this.optionsCache = {};
_this.handleInputChange = function (newValue, actionMeta) {
var _this$props = _this.props,
cacheOptions = _this$props.cacheOptions,
onInputChange = _this$props.onInputChange; // TODO
var inputValue = index$1.handleInputChange(newValue, actionMeta, onInputChange);
if (!inputValue) {
delete _this.lastRequest;
_this.setState({
inputValue: '',
loadedInputValue: '',
loadedOptions: [],
isLoading: false,
passEmptyOptions: false
});
return;
}
if (cacheOptions && _this.optionsCache[inputValue]) {
_this.setState({
inputValue: inputValue,
loadedInputValue: inputValue,
loadedOptions: _this.optionsCache[inputValue],
isLoading: false,
passEmptyOptions: false
});
} else {
var request = _this.lastRequest = {};
_this.setState({
inputValue: inputValue,
isLoading: true,
passEmptyOptions: !_this.state.loadedInputValue
}, function () {
_this.loadOptions(inputValue, function (options) {
if (!_this.mounted) return;
if (options) {
_this.optionsCache[inputValue] = options;
}
if (request !== _this.lastRequest) return;
delete _this.lastRequest;
_this.setState({
isLoading: false,
loadedInputValue: inputValue,
loadedOptions: options || [],
passEmptyOptions: false
});
});
});
}
return inputValue;
};
_this.state = {
defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,
inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '',
isLoading: props.defaultOptions === true,
loadedOptions: [],
passEmptyOptions: false
};
return _this;
}
_createClass(Async, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.mounted = true;
var defaultOptions = this.props.defaultOptions;
var inputValue = this.state.inputValue;
if (defaultOptions === true) {
this.loadOptions(inputValue, function (options) {
if (!_this2.mounted) return;
var isLoading = !!_this2.lastRequest;
_this2.setState({
defaultOptions: options || [],
isLoading: isLoading
});
});
}
}
}, {
key: "UNSAFE_componentWillReceiveProps",
value: function UNSAFE_componentWillReceiveProps(nextProps) {
// if the cacheOptions prop changes, clear the cache
if (nextProps.cacheOptions !== this.props.cacheOptions) {
this.optionsCache = {};
}
if (nextProps.defaultOptions !== this.props.defaultOptions) {
this.setState({
defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined
});
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.mounted = false;
}
}, {
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "loadOptions",
value: function loadOptions(inputValue, callback) {
var loadOptions = this.props.loadOptions;
if (!loadOptions) return callback();
var loader = loadOptions(inputValue, callback);
if (loader && typeof loader.then === 'function') {
loader.then(callback, function () {
return callback();
});
}
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var _this$props2 = this.props,
loadOptions = _this$props2.loadOptions,
isLoadingProp = _this$props2.isLoading,
props = _objectWithoutProperties(_this$props2, ["loadOptions", "isLoading"]);
var _this$state = this.state,
defaultOptions = _this$state.defaultOptions,
inputValue = _this$state.inputValue,
isLoading = _this$state.isLoading,
loadedInputValue = _this$state.loadedInputValue,
loadedOptions = _this$state.loadedOptions,
passEmptyOptions = _this$state.passEmptyOptions;
var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];
return /*#__PURE__*/React__default.createElement(SelectComponent, _extends({}, props, {
ref: function ref(_ref) {
_this3.select = _ref;
},
options: options,
isLoading: isLoading || isLoadingProp,
onInputChange: this.handleInputChange
}));
}
}]);
return Async;
}(React.Component), _class.defaultProps = defaultProps, _temp;
};
var SelectState = stateManager.manageState(reactSelect.Select);
var Async = makeAsyncSelect(SelectState);
exports.default = Async;
exports.defaultProps = defaultProps;
exports.makeAsyncSelect = makeAsyncSelect;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Async.js")

@@ -1,221 +0,15 @@

import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import _extends from '@babel/runtime/helpers/esm/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import { G as handleInputChange } from '../../dist/index-75b02bac.browser.esm.js';
import { S as Select } from '../../dist/Select-e1cf49ae.browser.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from '../../dist/stateManager-2f2b6f5b.browser.esm.js';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var defaultProps = {
cacheOptions: false,
defaultOptions: false,
filterOption: null,
isLoading: false
};
var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_Component) {
_inherits(Async, _Component);
var _super = _createSuper(Async);
function Async(props) {
var _this;
_classCallCheck(this, Async);
_this = _super.call(this);
_this.select = void 0;
_this.lastRequest = void 0;
_this.mounted = false;
_this.optionsCache = {};
_this.handleInputChange = function (newValue, actionMeta) {
var _this$props = _this.props,
cacheOptions = _this$props.cacheOptions,
onInputChange = _this$props.onInputChange; // TODO
var inputValue = handleInputChange(newValue, actionMeta, onInputChange);
if (!inputValue) {
delete _this.lastRequest;
_this.setState({
inputValue: '',
loadedInputValue: '',
loadedOptions: [],
isLoading: false,
passEmptyOptions: false
});
return;
}
if (cacheOptions && _this.optionsCache[inputValue]) {
_this.setState({
inputValue: inputValue,
loadedInputValue: inputValue,
loadedOptions: _this.optionsCache[inputValue],
isLoading: false,
passEmptyOptions: false
});
} else {
var request = _this.lastRequest = {};
_this.setState({
inputValue: inputValue,
isLoading: true,
passEmptyOptions: !_this.state.loadedInputValue
}, function () {
_this.loadOptions(inputValue, function (options) {
if (!_this.mounted) return;
if (options) {
_this.optionsCache[inputValue] = options;
}
if (request !== _this.lastRequest) return;
delete _this.lastRequest;
_this.setState({
isLoading: false,
loadedInputValue: inputValue,
loadedOptions: options || [],
passEmptyOptions: false
});
});
});
}
return inputValue;
};
_this.state = {
defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,
inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '',
isLoading: props.defaultOptions === true,
loadedOptions: [],
passEmptyOptions: false
};
return _this;
}
_createClass(Async, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.mounted = true;
var defaultOptions = this.props.defaultOptions;
var inputValue = this.state.inputValue;
if (defaultOptions === true) {
this.loadOptions(inputValue, function (options) {
if (!_this2.mounted) return;
var isLoading = !!_this2.lastRequest;
_this2.setState({
defaultOptions: options || [],
isLoading: isLoading
});
});
}
}
}, {
key: "UNSAFE_componentWillReceiveProps",
value: function UNSAFE_componentWillReceiveProps(nextProps) {
// if the cacheOptions prop changes, clear the cache
if (nextProps.cacheOptions !== this.props.cacheOptions) {
this.optionsCache = {};
}
if (nextProps.defaultOptions !== this.props.defaultOptions) {
this.setState({
defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined
});
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.mounted = false;
}
}, {
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "loadOptions",
value: function loadOptions(inputValue, callback) {
var loadOptions = this.props.loadOptions;
if (!loadOptions) return callback();
var loader = loadOptions(inputValue, callback);
if (loader && typeof loader.then === 'function') {
loader.then(callback, function () {
return callback();
});
}
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var _this$props2 = this.props,
loadOptions = _this$props2.loadOptions,
isLoadingProp = _this$props2.isLoading,
props = _objectWithoutProperties(_this$props2, ["loadOptions", "isLoading"]);
var _this$state = this.state,
defaultOptions = _this$state.defaultOptions,
inputValue = _this$state.inputValue,
isLoading = _this$state.isLoading,
loadedInputValue = _this$state.loadedInputValue,
loadedOptions = _this$state.loadedOptions,
passEmptyOptions = _this$state.passEmptyOptions;
var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];
return /*#__PURE__*/React.createElement(SelectComponent, _extends({}, props, {
ref: function ref(_ref) {
_this3.select = _ref;
},
options: options,
isLoading: isLoading || isLoadingProp,
onInputChange: this.handleInputChange
}));
}
}]);
return Async;
}(Component), _class.defaultProps = defaultProps, _temp;
};
var SelectState = manageState(Select);
var Async = makeAsyncSelect(SelectState);
export default Async;
export { defaultProps, makeAsyncSelect };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Async.js")

@@ -1,7 +0,19 @@

'use strict';
"use strict";
// this file might look strange and you might be wondering what it's for
// it's lets you import your source files by importing this entrypoint
// as you would import it if it was built with preconstruct build
// this file is slightly different to some others though
// it has a require hook which compiles your code with Babel
// this means that you don't have to set up @babel/register or anything like that
// but you can still require this module and it'll be compiled
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}
// this bit of code imports the require hook and registers it
let unregister = require("/Users/talko/Development/react-select/node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook("/Users/talko/Development/react-select");
// this re-exports the source file
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Async.js");
// this unregisters the require hook so that any modules required after this one
// aren't compiled with the require hook in case you have some other require hook
// or something that should be used on other modules
unregister();

@@ -1,221 +0,15 @@

import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import _extends from '@babel/runtime/helpers/esm/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import { G as handleInputChange } from '../../dist/index-fa0d9f94.esm.js';
import { S as Select } from '../../dist/Select-e132d453.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from '../../dist/stateManager-4518fdaa.esm.js';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var defaultProps = {
cacheOptions: false,
defaultOptions: false,
filterOption: null,
isLoading: false
};
var makeAsyncSelect = function makeAsyncSelect(SelectComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_Component) {
_inherits(Async, _Component);
var _super = _createSuper(Async);
function Async(props) {
var _this;
_classCallCheck(this, Async);
_this = _super.call(this);
_this.select = void 0;
_this.lastRequest = void 0;
_this.mounted = false;
_this.optionsCache = {};
_this.handleInputChange = function (newValue, actionMeta) {
var _this$props = _this.props,
cacheOptions = _this$props.cacheOptions,
onInputChange = _this$props.onInputChange; // TODO
var inputValue = handleInputChange(newValue, actionMeta, onInputChange);
if (!inputValue) {
delete _this.lastRequest;
_this.setState({
inputValue: '',
loadedInputValue: '',
loadedOptions: [],
isLoading: false,
passEmptyOptions: false
});
return;
}
if (cacheOptions && _this.optionsCache[inputValue]) {
_this.setState({
inputValue: inputValue,
loadedInputValue: inputValue,
loadedOptions: _this.optionsCache[inputValue],
isLoading: false,
passEmptyOptions: false
});
} else {
var request = _this.lastRequest = {};
_this.setState({
inputValue: inputValue,
isLoading: true,
passEmptyOptions: !_this.state.loadedInputValue
}, function () {
_this.loadOptions(inputValue, function (options) {
if (!_this.mounted) return;
if (options) {
_this.optionsCache[inputValue] = options;
}
if (request !== _this.lastRequest) return;
delete _this.lastRequest;
_this.setState({
isLoading: false,
loadedInputValue: inputValue,
loadedOptions: options || [],
passEmptyOptions: false
});
});
});
}
return inputValue;
};
_this.state = {
defaultOptions: Array.isArray(props.defaultOptions) ? props.defaultOptions : undefined,
inputValue: typeof props.inputValue !== 'undefined' ? props.inputValue : '',
isLoading: props.defaultOptions === true,
loadedOptions: [],
passEmptyOptions: false
};
return _this;
}
_createClass(Async, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.mounted = true;
var defaultOptions = this.props.defaultOptions;
var inputValue = this.state.inputValue;
if (defaultOptions === true) {
this.loadOptions(inputValue, function (options) {
if (!_this2.mounted) return;
var isLoading = !!_this2.lastRequest;
_this2.setState({
defaultOptions: options || [],
isLoading: isLoading
});
});
}
}
}, {
key: "UNSAFE_componentWillReceiveProps",
value: function UNSAFE_componentWillReceiveProps(nextProps) {
// if the cacheOptions prop changes, clear the cache
if (nextProps.cacheOptions !== this.props.cacheOptions) {
this.optionsCache = {};
}
if (nextProps.defaultOptions !== this.props.defaultOptions) {
this.setState({
defaultOptions: Array.isArray(nextProps.defaultOptions) ? nextProps.defaultOptions : undefined
});
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.mounted = false;
}
}, {
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "loadOptions",
value: function loadOptions(inputValue, callback) {
var loadOptions = this.props.loadOptions;
if (!loadOptions) return callback();
var loader = loadOptions(inputValue, callback);
if (loader && typeof loader.then === 'function') {
loader.then(callback, function () {
return callback();
});
}
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var _this$props2 = this.props,
loadOptions = _this$props2.loadOptions,
isLoadingProp = _this$props2.isLoading,
props = _objectWithoutProperties(_this$props2, ["loadOptions", "isLoading"]);
var _this$state = this.state,
defaultOptions = _this$state.defaultOptions,
inputValue = _this$state.inputValue,
isLoading = _this$state.isLoading,
loadedInputValue = _this$state.loadedInputValue,
loadedOptions = _this$state.loadedOptions,
passEmptyOptions = _this$state.passEmptyOptions;
var options = passEmptyOptions ? [] : inputValue && loadedInputValue ? loadedOptions : defaultOptions || [];
return /*#__PURE__*/React.createElement(SelectComponent, _extends({}, props, {
ref: function ref(_ref) {
_this3.select = _ref;
},
options: options,
isLoading: isLoading || isLoadingProp,
onInputChange: this.handleInputChange
}));
}
}]);
return Async;
}(Component), _class.defaultProps = defaultProps, _temp;
};
var SelectState = manageState(Select);
var Async = makeAsyncSelect(SelectState);
export default Async;
export { defaultProps, makeAsyncSelect };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Async.js")

@@ -1,30 +0,15 @@

'use strict';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
Object.defineProperty(exports, '__esModule', { value: true });
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/extends');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/toConsumableArray');
require('@babel/runtime/helpers/defineProperty');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/assertThisInitialized');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/possibleConstructorReturn');
require('@babel/runtime/helpers/getPrototypeOf');
require('react');
require('memoize-one');
require('@emotion/core');
require('react-dom');
require('@babel/runtime/helpers/typeof');
require('../../dist/index-3f7cd5d8.browser.cjs.js');
var reactSelect = require('../../dist/Select-059b9809.browser.cjs.js');
require('@emotion/css');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('react-input-autosize');
exports.default = reactSelect.Select;
exports.defaultProps = reactSelect.defaultProps;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Select.js")

@@ -1,21 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/possibleConstructorReturn';
import '@babel/runtime/helpers/getPrototypeOf';
import 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import '../../dist/index-75b02bac.browser.esm.js';
export { S as default, d as defaultProps } from '../../dist/Select-e1cf49ae.browser.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Select.js")

@@ -1,7 +0,19 @@

'use strict';
"use strict";
// this file might look strange and you might be wondering what it's for
// it's lets you import your source files by importing this entrypoint
// as you would import it if it was built with preconstruct build
// this file is slightly different to some others though
// it has a require hook which compiles your code with Babel
// this means that you don't have to set up @babel/register or anything like that
// but you can still require this module and it'll be compiled
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}
// this bit of code imports the require hook and registers it
let unregister = require("/Users/talko/Development/react-select/node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook("/Users/talko/Development/react-select");
// this re-exports the source file
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Select.js");
// this unregisters the require hook so that any modules required after this one
// aren't compiled with the require hook in case you have some other require hook
// or something that should be used on other modules
unregister();

@@ -1,21 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/possibleConstructorReturn';
import '@babel/runtime/helpers/getPrototypeOf';
import 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import '../../dist/index-fa0d9f94.esm.js';
export { S as default, d as defaultProps } from '../../dist/Select-e132d453.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Select.js")

@@ -1,192 +0,15 @@

'use strict';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
require('@babel/runtime/helpers/objectWithoutProperties');
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));
require('@babel/runtime/helpers/slicedToArray');
var _toConsumableArray = _interopDefault(require('@babel/runtime/helpers/toConsumableArray'));
var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck'));
var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass'));
require('@babel/runtime/helpers/assertThisInitialized');
var _inherits = _interopDefault(require('@babel/runtime/helpers/inherits'));
var _possibleConstructorReturn = _interopDefault(require('@babel/runtime/helpers/possibleConstructorReturn'));
var _getPrototypeOf = _interopDefault(require('@babel/runtime/helpers/getPrototypeOf'));
var React = require('react');
var React__default = _interopDefault(React);
require('memoize-one');
require('@emotion/core');
require('react-dom');
require('@babel/runtime/helpers/typeof');
var index$1 = require('../../dist/index-3f7cd5d8.browser.cjs.js');
var reactSelect = require('../../dist/Select-059b9809.browser.cjs.js');
require('@emotion/css');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('react-input-autosize');
var stateManager = require('../../dist/stateManager-8478caa9.browser.cjs.js');
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var compareOption = function compareOption() {
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var option = arguments.length > 1 ? arguments[1] : undefined;
var candidate = String(inputValue).toLowerCase();
var optionValue = String(option.value).toLowerCase();
var optionLabel = String(option.label).toLowerCase();
return optionValue === candidate || optionLabel === candidate;
};
var builtins = {
formatCreateLabel: function formatCreateLabel(inputValue) {
return "Create \"".concat(inputValue, "\"");
},
isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {
return !(!inputValue || selectValue.some(function (option) {
return compareOption(inputValue, option);
}) || selectOptions.some(function (option) {
return compareOption(inputValue, option);
}));
},
getNewOptionData: function getNewOptionData(inputValue, optionLabel) {
return {
label: optionLabel,
value: inputValue,
__isNew__: true
};
}
};
var defaultProps = _objectSpread({
allowCreateWhileLoading: false,
createOptionPosition: 'last'
}, builtins);
var makeCreatableSelect = function makeCreatableSelect(SelectComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_Component) {
_inherits(Creatable, _Component);
var _super = _createSuper(Creatable);
function Creatable(props) {
var _this;
_classCallCheck(this, Creatable);
_this = _super.call(this, props);
_this.select = void 0;
_this.onChange = function (newValue, actionMeta) {
var _this$props = _this.props,
getNewOptionData = _this$props.getNewOptionData,
inputValue = _this$props.inputValue,
isMulti = _this$props.isMulti,
onChange = _this$props.onChange,
onCreateOption = _this$props.onCreateOption,
value = _this$props.value,
name = _this$props.name;
if (actionMeta.action !== 'select-option') {
return onChange(newValue, actionMeta);
}
var newOption = _this.state.newOption;
var valueArray = Array.isArray(newValue) ? newValue : [newValue];
if (valueArray[valueArray.length - 1] === newOption) {
if (onCreateOption) onCreateOption(inputValue);else {
var newOptionData = getNewOptionData(inputValue, inputValue);
var newActionMeta = {
action: 'create-option',
name: name
};
if (isMulti) {
onChange([].concat(_toConsumableArray(index$1.cleanValue(value)), [newOptionData]), newActionMeta);
} else {
onChange(newOptionData, newActionMeta);
}
}
return;
}
onChange(newValue, actionMeta);
};
var options = props.options || [];
_this.state = {
newOption: undefined,
options: options
};
return _this;
}
_createClass(Creatable, [{
key: "UNSAFE_componentWillReceiveProps",
value: function UNSAFE_componentWillReceiveProps(nextProps) {
var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,
createOptionPosition = nextProps.createOptionPosition,
formatCreateLabel = nextProps.formatCreateLabel,
getNewOptionData = nextProps.getNewOptionData,
inputValue = nextProps.inputValue,
isLoading = nextProps.isLoading,
isValidNewOption = nextProps.isValidNewOption,
value = nextProps.value;
var options = nextProps.options || [];
var newOption = this.state.newOption;
if (isValidNewOption(inputValue, index$1.cleanValue(value), options)) {
newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));
} else {
newOption = undefined;
}
this.setState({
newOption: newOption,
options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options
});
}
}, {
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var options = this.state.options;
return /*#__PURE__*/React__default.createElement(SelectComponent, _extends({}, this.props, {
ref: function ref(_ref) {
_this2.select = _ref;
},
options: options,
onChange: this.onChange
}));
}
}]);
return Creatable;
}(React.Component), _class.defaultProps = defaultProps, _temp;
}; // TODO: do this in package entrypoint
var SelectCreatable = makeCreatableSelect(reactSelect.Select);
var Creatable = stateManager.manageState(SelectCreatable);
exports.default = Creatable;
exports.defaultProps = defaultProps;
exports.makeCreatableSelect = makeCreatableSelect;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Creatable.js")

@@ -1,184 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import _extends from '@babel/runtime/helpers/esm/extends';
import '@babel/runtime/helpers/slicedToArray';
import _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import { C as cleanValue } from '../../dist/index-75b02bac.browser.esm.js';
import { S as Select } from '../../dist/Select-e1cf49ae.browser.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from '../../dist/stateManager-2f2b6f5b.browser.esm.js';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var compareOption = function compareOption() {
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var option = arguments.length > 1 ? arguments[1] : undefined;
var candidate = String(inputValue).toLowerCase();
var optionValue = String(option.value).toLowerCase();
var optionLabel = String(option.label).toLowerCase();
return optionValue === candidate || optionLabel === candidate;
};
var builtins = {
formatCreateLabel: function formatCreateLabel(inputValue) {
return "Create \"".concat(inputValue, "\"");
},
isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {
return !(!inputValue || selectValue.some(function (option) {
return compareOption(inputValue, option);
}) || selectOptions.some(function (option) {
return compareOption(inputValue, option);
}));
},
getNewOptionData: function getNewOptionData(inputValue, optionLabel) {
return {
label: optionLabel,
value: inputValue,
__isNew__: true
};
}
};
var defaultProps = _objectSpread({
allowCreateWhileLoading: false,
createOptionPosition: 'last'
}, builtins);
var makeCreatableSelect = function makeCreatableSelect(SelectComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_Component) {
_inherits(Creatable, _Component);
var _super = _createSuper(Creatable);
function Creatable(props) {
var _this;
_classCallCheck(this, Creatable);
_this = _super.call(this, props);
_this.select = void 0;
_this.onChange = function (newValue, actionMeta) {
var _this$props = _this.props,
getNewOptionData = _this$props.getNewOptionData,
inputValue = _this$props.inputValue,
isMulti = _this$props.isMulti,
onChange = _this$props.onChange,
onCreateOption = _this$props.onCreateOption,
value = _this$props.value,
name = _this$props.name;
if (actionMeta.action !== 'select-option') {
return onChange(newValue, actionMeta);
}
var newOption = _this.state.newOption;
var valueArray = Array.isArray(newValue) ? newValue : [newValue];
if (valueArray[valueArray.length - 1] === newOption) {
if (onCreateOption) onCreateOption(inputValue);else {
var newOptionData = getNewOptionData(inputValue, inputValue);
var newActionMeta = {
action: 'create-option',
name: name
};
if (isMulti) {
onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta);
} else {
onChange(newOptionData, newActionMeta);
}
}
return;
}
onChange(newValue, actionMeta);
};
var options = props.options || [];
_this.state = {
newOption: undefined,
options: options
};
return _this;
}
_createClass(Creatable, [{
key: "UNSAFE_componentWillReceiveProps",
value: function UNSAFE_componentWillReceiveProps(nextProps) {
var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,
createOptionPosition = nextProps.createOptionPosition,
formatCreateLabel = nextProps.formatCreateLabel,
getNewOptionData = nextProps.getNewOptionData,
inputValue = nextProps.inputValue,
isLoading = nextProps.isLoading,
isValidNewOption = nextProps.isValidNewOption,
value = nextProps.value;
var options = nextProps.options || [];
var newOption = this.state.newOption;
if (isValidNewOption(inputValue, cleanValue(value), options)) {
newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));
} else {
newOption = undefined;
}
this.setState({
newOption: newOption,
options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options
});
}
}, {
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var options = this.state.options;
return /*#__PURE__*/React.createElement(SelectComponent, _extends({}, this.props, {
ref: function ref(_ref) {
_this2.select = _ref;
},
options: options,
onChange: this.onChange
}));
}
}]);
return Creatable;
}(Component), _class.defaultProps = defaultProps, _temp;
}; // TODO: do this in package entrypoint
var SelectCreatable = makeCreatableSelect(Select);
var Creatable = manageState(SelectCreatable);
export default Creatable;
export { defaultProps, makeCreatableSelect };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Creatable.js")

@@ -1,7 +0,19 @@

'use strict';
"use strict";
// this file might look strange and you might be wondering what it's for
// it's lets you import your source files by importing this entrypoint
// as you would import it if it was built with preconstruct build
// this file is slightly different to some others though
// it has a require hook which compiles your code with Babel
// this means that you don't have to set up @babel/register or anything like that
// but you can still require this module and it'll be compiled
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}
// this bit of code imports the require hook and registers it
let unregister = require("/Users/talko/Development/react-select/node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook("/Users/talko/Development/react-select");
// this re-exports the source file
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Creatable.js");
// this unregisters the require hook so that any modules required after this one
// aren't compiled with the require hook in case you have some other require hook
// or something that should be used on other modules
unregister();

@@ -1,184 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import _extends from '@babel/runtime/helpers/esm/extends';
import '@babel/runtime/helpers/slicedToArray';
import _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import 'memoize-one';
import '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
import { C as cleanValue } from '../../dist/index-fa0d9f94.esm.js';
import { S as Select } from '../../dist/Select-e132d453.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from '../../dist/stateManager-4518fdaa.esm.js';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
var compareOption = function compareOption() {
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var option = arguments.length > 1 ? arguments[1] : undefined;
var candidate = String(inputValue).toLowerCase();
var optionValue = String(option.value).toLowerCase();
var optionLabel = String(option.label).toLowerCase();
return optionValue === candidate || optionLabel === candidate;
};
var builtins = {
formatCreateLabel: function formatCreateLabel(inputValue) {
return "Create \"".concat(inputValue, "\"");
},
isValidNewOption: function isValidNewOption(inputValue, selectValue, selectOptions) {
return !(!inputValue || selectValue.some(function (option) {
return compareOption(inputValue, option);
}) || selectOptions.some(function (option) {
return compareOption(inputValue, option);
}));
},
getNewOptionData: function getNewOptionData(inputValue, optionLabel) {
return {
label: optionLabel,
value: inputValue,
__isNew__: true
};
}
};
var defaultProps = _objectSpread({
allowCreateWhileLoading: false,
createOptionPosition: 'last'
}, builtins);
var makeCreatableSelect = function makeCreatableSelect(SelectComponent) {
var _class, _temp;
return _temp = _class = /*#__PURE__*/function (_Component) {
_inherits(Creatable, _Component);
var _super = _createSuper(Creatable);
function Creatable(props) {
var _this;
_classCallCheck(this, Creatable);
_this = _super.call(this, props);
_this.select = void 0;
_this.onChange = function (newValue, actionMeta) {
var _this$props = _this.props,
getNewOptionData = _this$props.getNewOptionData,
inputValue = _this$props.inputValue,
isMulti = _this$props.isMulti,
onChange = _this$props.onChange,
onCreateOption = _this$props.onCreateOption,
value = _this$props.value,
name = _this$props.name;
if (actionMeta.action !== 'select-option') {
return onChange(newValue, actionMeta);
}
var newOption = _this.state.newOption;
var valueArray = Array.isArray(newValue) ? newValue : [newValue];
if (valueArray[valueArray.length - 1] === newOption) {
if (onCreateOption) onCreateOption(inputValue);else {
var newOptionData = getNewOptionData(inputValue, inputValue);
var newActionMeta = {
action: 'create-option',
name: name
};
if (isMulti) {
onChange([].concat(_toConsumableArray(cleanValue(value)), [newOptionData]), newActionMeta);
} else {
onChange(newOptionData, newActionMeta);
}
}
return;
}
onChange(newValue, actionMeta);
};
var options = props.options || [];
_this.state = {
newOption: undefined,
options: options
};
return _this;
}
_createClass(Creatable, [{
key: "UNSAFE_componentWillReceiveProps",
value: function UNSAFE_componentWillReceiveProps(nextProps) {
var allowCreateWhileLoading = nextProps.allowCreateWhileLoading,
createOptionPosition = nextProps.createOptionPosition,
formatCreateLabel = nextProps.formatCreateLabel,
getNewOptionData = nextProps.getNewOptionData,
inputValue = nextProps.inputValue,
isLoading = nextProps.isLoading,
isValidNewOption = nextProps.isValidNewOption,
value = nextProps.value;
var options = nextProps.options || [];
var newOption = this.state.newOption;
if (isValidNewOption(inputValue, cleanValue(value), options)) {
newOption = getNewOptionData(inputValue, formatCreateLabel(inputValue));
} else {
newOption = undefined;
}
this.setState({
newOption: newOption,
options: (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(options)) : [].concat(_toConsumableArray(options), [newOption]) : options
});
}
}, {
key: "focus",
value: function focus() {
this.select.focus();
}
}, {
key: "blur",
value: function blur() {
this.select.blur();
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var options = this.state.options;
return /*#__PURE__*/React.createElement(SelectComponent, _extends({}, this.props, {
ref: function ref(_ref) {
_this2.select = _ref;
},
options: options,
onChange: this.onChange
}));
}
}]);
return Creatable;
}(Component), _class.defaultProps = defaultProps, _temp;
}; // TODO: do this in package entrypoint
var SelectCreatable = makeCreatableSelect(Select);
var Creatable = manageState(SelectCreatable);
export default Creatable;
export { defaultProps, makeCreatableSelect };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/Creatable.js")

@@ -1,78 +0,15 @@

'use strict';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/extends');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/toConsumableArray');
require('@babel/runtime/helpers/defineProperty');
var _classCallCheck = _interopDefault(require('@babel/runtime/helpers/classCallCheck'));
var _createClass = _interopDefault(require('@babel/runtime/helpers/createClass'));
require('@babel/runtime/helpers/assertThisInitialized');
var _inherits = _interopDefault(require('@babel/runtime/helpers/inherits'));
var _possibleConstructorReturn = _interopDefault(require('@babel/runtime/helpers/possibleConstructorReturn'));
var _getPrototypeOf = _interopDefault(require('@babel/runtime/helpers/getPrototypeOf'));
var React = require('react');
var React__default = _interopDefault(React);
var memoizeOne = _interopDefault(require('memoize-one'));
var core = require('@emotion/core');
require('react-dom');
require('@babel/runtime/helpers/typeof');
var index$1 = require('./index-3f7cd5d8.browser.cjs.js');
var reactSelect = require('./Select-059b9809.browser.cjs.js');
require('@emotion/css');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('react-input-autosize');
var stateManager = require('./stateManager-8478caa9.browser.cjs.js');
var createCache = _interopDefault(require('@emotion/cache'));
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var NonceProvider = /*#__PURE__*/function (_Component) {
_inherits(NonceProvider, _Component);
var _super = _createSuper(NonceProvider);
function NonceProvider(props) {
var _this;
_classCallCheck(this, NonceProvider);
_this = _super.call(this, props);
_this.createEmotionCache = function (nonce) {
return createCache({
nonce: nonce
});
};
_this.createEmotionCache = memoizeOne(_this.createEmotionCache);
return _this;
}
_createClass(NonceProvider, [{
key: "render",
value: function render() {
var emotionCache = this.createEmotionCache(this.props.nonce);
return /*#__PURE__*/React__default.createElement(core.CacheProvider, {
value: emotionCache
}, this.props.children);
}
}]);
return NonceProvider;
}(React.Component);
var index = stateManager.manageState(reactSelect.Select);
exports.components = index$1.components;
exports.createFilter = reactSelect.createFilter;
exports.defaultTheme = reactSelect.defaultTheme;
exports.mergeStyles = reactSelect.mergeStyles;
exports.NonceProvider = NonceProvider;
exports.default = index;
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/index.js")

@@ -1,68 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import memoizeOne from 'memoize-one';
import { CacheProvider } from '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
export { F as components } from './index-75b02bac.browser.esm.js';
import { S as Select } from './Select-e1cf49ae.browser.esm.js';
export { c as createFilter, a as defaultTheme, m as mergeStyles } from './Select-e1cf49ae.browser.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from './stateManager-2f2b6f5b.browser.esm.js';
import createCache from '@emotion/cache';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var NonceProvider = /*#__PURE__*/function (_Component) {
_inherits(NonceProvider, _Component);
var _super = _createSuper(NonceProvider);
function NonceProvider(props) {
var _this;
_classCallCheck(this, NonceProvider);
_this = _super.call(this, props);
_this.createEmotionCache = function (nonce) {
return createCache({
nonce: nonce
});
};
_this.createEmotionCache = memoizeOne(_this.createEmotionCache);
return _this;
}
_createClass(NonceProvider, [{
key: "render",
value: function render() {
var emotionCache = this.createEmotionCache(this.props.nonce);
return /*#__PURE__*/React.createElement(CacheProvider, {
value: emotionCache
}, this.props.children);
}
}]);
return NonceProvider;
}(Component);
var index = manageState(Select);
export default index;
export { NonceProvider };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/index.js")

@@ -1,7 +0,19 @@

'use strict';
"use strict";
// this file might look strange and you might be wondering what it's for
// it's lets you import your source files by importing this entrypoint
// as you would import it if it was built with preconstruct build
// this file is slightly different to some others though
// it has a require hook which compiles your code with Babel
// this means that you don't have to set up @babel/register or anything like that
// but you can still require this module and it'll be compiled
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}
// this bit of code imports the require hook and registers it
let unregister = require("/Users/talko/Development/react-select/node_modules/@preconstruct/hook/dist/hook.cjs.js").___internalHook("/Users/talko/Development/react-select");
// this re-exports the source file
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/index.js");
// this unregisters the require hook so that any modules required after this one
// aren't compiled with the require hook in case you have some other require hook
// or something that should be used on other modules
unregister();

@@ -1,68 +0,15 @@

import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/defineProperty';
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
import _createClass from '@babel/runtime/helpers/esm/createClass';
import '@babel/runtime/helpers/assertThisInitialized';
import _inherits from '@babel/runtime/helpers/esm/inherits';
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
import React, { Component } from 'react';
import memoizeOne from 'memoize-one';
import { CacheProvider } from '@emotion/core';
import 'react-dom';
import '@babel/runtime/helpers/typeof';
export { F as components } from './index-fa0d9f94.esm.js';
import { S as Select } from './Select-e132d453.esm.js';
export { c as createFilter, a as defaultTheme, m as mergeStyles } from './Select-e132d453.esm.js';
import '@emotion/css';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import 'react-input-autosize';
import { m as manageState } from './stateManager-4518fdaa.esm.js';
import createCache from '@emotion/cache';
// 👋 hey!!
// you might be reading this and seeing .esm in the filename
// and being confused why there is commonjs below this filename
// DON'T WORRY!
// this is intentional
// it's only commonjs with `preconstruct dev`
// when you run `preconstruct build`, it will be ESM
// why is it commonjs?
// we need to re-export every export from the source file
// but we can't do that with ESM without knowing what the exports are (because default exports aren't included in export/import *)
// and they could change after running `preconstruct dev` so we can't look at the file without forcing people to
// run preconstruct dev again which wouldn't be ideal
// this solution could change but for now, it's working
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var NonceProvider = /*#__PURE__*/function (_Component) {
_inherits(NonceProvider, _Component);
var _super = _createSuper(NonceProvider);
function NonceProvider(props) {
var _this;
_classCallCheck(this, NonceProvider);
_this = _super.call(this, props);
_this.createEmotionCache = function (nonce) {
return createCache({
nonce: nonce
});
};
_this.createEmotionCache = memoizeOne(_this.createEmotionCache);
return _this;
}
_createClass(NonceProvider, [{
key: "render",
value: function render() {
var emotionCache = this.createEmotionCache(this.props.nonce);
return /*#__PURE__*/React.createElement(CacheProvider, {
value: emotionCache
}, this.props.children);
}
}]);
return NonceProvider;
}(Component);
var index = manageState(Select);
export default index;
export { NonceProvider };
module.exports = require("/Users/talko/Development/react-select/packages/react-select/src/index.js")
{
"name": "react-select-module",
"version": "3.2.0",
"version": "3.2.1",
"description": "A Select control built with and for ReactJS",
"main": "dist/react-select.cjs.js",
"module": "dist/react-select.esm.js",
"type": "module",
"sideEffects": false,

@@ -8,0 +9,0 @@ "author": "Jed Watson",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc