react-dropdown-select
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _styledBase=_interopRequireDefault(require("@emotion/styled-base")),_react=_interopRequireDefault(require("react")),_Option=_interopRequireDefault(require("./Option")),_Input=_interopRequireDefault(require("./Input"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var Content=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return _react.default.createElement(ContentComponent,{className:"react-dropdown-select-content ".concat(b.multi?"react-dropdown-select-type-multi":"react-dropdown-select-type-single"),onClick:function a(){return d.dropDown("open")}},b.contentRenderer?b.contentRenderer(b,c,d):_react.default.createElement(_react.default.Fragment,null,b.multi?c.values&&c.values.map(function(a){return _react.default.createElement(_Option.default,{key:"".concat(a[b.valueField]).concat(a[b.labelField]),parentItem:a,parentState:c,parentProps:b,parentMethods:d})}):c.values&&0<c.values.length&&_react.default.createElement("span",null,c.values[0][b.labelField]),_react.default.createElement(_Input.default,{parentProps:b,parentMethods:d,parentState:c})))},ContentComponent=(0,_styledBase.default)("div",{target:"e1gn6jc30",label:"ContentComponent"})("production"===process.env.NODE_ENV?{name:"1rr4qq7",styles:"flex:1;"}:{name:"1rr4qq7",styles:"flex:1;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0NvbnRlbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNtQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9Db250ZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IE9wdGlvbiBmcm9tICcuL09wdGlvbic7XG5pbXBvcnQgSW5wdXQgZnJvbSAnLi9JbnB1dCc7XG5cbmNvbnN0IENvbnRlbnQgPSAoeyBwYXJlbnRQcm9wcywgcGFyZW50U3RhdGUsIHBhcmVudE1ldGhvZHMgfSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxDb250ZW50Q29tcG9uZW50XG4gICAgICBjbGFzc05hbWU9e2ByZWFjdC1kcm9wZG93bi1zZWxlY3QtY29udGVudCAke1xuICAgICAgICBwYXJlbnRQcm9wcy5tdWx0aSA/ICdyZWFjdC1kcm9wZG93bi1zZWxlY3QtdHlwZS1tdWx0aScgOiAncmVhY3QtZHJvcGRvd24tc2VsZWN0LXR5cGUtc2luZ2xlJ1xuICAgICAgfWB9XG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3duKCdvcGVuJyl9PlxuICAgICAge3BhcmVudFByb3BzLmNvbnRlbnRSZW5kZXJlciA/IChcbiAgICAgICAgcGFyZW50UHJvcHMuY29udGVudFJlbmRlcmVyKHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcylcbiAgICAgICkgOiAoXG4gICAgICAgIDxSZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICB7cGFyZW50UHJvcHMubXVsdGlcbiAgICAgICAgICAgID8gcGFyZW50U3RhdGUudmFsdWVzICYmXG4gICAgICAgICAgICAgIHBhcmVudFN0YXRlLnZhbHVlcy5tYXAoKGl0ZW0pID0+IChcbiAgICAgICAgICAgICAgICA8T3B0aW9uXG4gICAgICAgICAgICAgICAgICBrZXk9e2Ake2l0ZW1bcGFyZW50UHJvcHMudmFsdWVGaWVsZF19JHtpdGVtW3BhcmVudFByb3BzLmxhYmVsRmllbGRdfWB9XG4gICAgICAgICAgICAgICAgICBwYXJlbnRJdGVtPXtpdGVtfVxuICAgICAgICAgICAgICAgICAgcGFyZW50U3RhdGU9e3BhcmVudFN0YXRlfVxuICAgICAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17cGFyZW50TWV0aG9kc31cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICAgOiBwYXJlbnRTdGF0ZS52YWx1ZXMgJiZcbiAgICAgICAgICAgICAgcGFyZW50U3RhdGUudmFsdWVzLmxlbmd0aCA+IDAgJiYgPHNwYW4+e3BhcmVudFN0YXRlLnZhbHVlc1swXVtwYXJlbnRQcm9wcy5sYWJlbEZpZWxkXX08L3NwYW4+fVxuICAgICAgICAgIDxJbnB1dFxuICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17cGFyZW50TWV0aG9kc31cbiAgICAgICAgICAgIHBhcmVudFN0YXRlPXtwYXJlbnRTdGF0ZX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICAgKX1cbiAgICA8L0NvbnRlbnRDb21wb25lbnQ+XG4gICk7XG59O1xuXG5jb25zdCBDb250ZW50Q29tcG9uZW50ID0gc3R5bGVkLmRpdmBcbiAgZmxleDogMTtcbmA7XG5cbkNvbnRlbnQucHJvcFR5cGVzID0ge307XG5cbmV4cG9ydCBkZWZhdWx0IENvbnRlbnQ7XG4iXX0= */"});Content.propTypes={};var _default=Content;exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _styledBase=_interopRequireDefault(require("@emotion/styled-base")),_react=_interopRequireDefault(require("react")),_Option=_interopRequireDefault(require("./Option")),_Input=_interopRequireDefault(require("./Input"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var Content=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return _react.default.createElement(ContentComponent,{className:"react-dropdown-select-content ".concat(b.multi?"react-dropdown-select-type-multi":"react-dropdown-select-type-single"),onClick:function a(){return d.dropDown("open")}},b.contentRenderer?b.contentRenderer(b,c,d):_react.default.createElement(_react.default.Fragment,null,b.multi?c.values&&c.values.map(function(a){return _react.default.createElement(_Option.default,{key:"".concat(a[b.valueField]).concat(a[b.labelField]),parentItem:a,parentState:c,parentProps:b,parentMethods:d})}):c.values&&0<c.values.length&&_react.default.createElement("span",null,c.values[0][b.labelField]),_react.default.createElement(_Input.default,{parentProps:b,parentMethods:d,parentState:c})))},ContentComponent=(0,_styledBase.default)("div",{target:"e1gn6jc30",label:"ContentComponent"})("production"===process.env.NODE_ENV?{name:"1vw3e5y",styles:"display:flex;flex:1;flex-wrap:wrap;"}:{name:"1vw3e5y",styles:"display:flex;flex:1;flex-wrap:wrap;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0NvbnRlbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNtQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9Db250ZW50LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IE9wdGlvbiBmcm9tICcuL09wdGlvbic7XG5pbXBvcnQgSW5wdXQgZnJvbSAnLi9JbnB1dCc7XG5cbmNvbnN0IENvbnRlbnQgPSAoeyBwYXJlbnRQcm9wcywgcGFyZW50U3RhdGUsIHBhcmVudE1ldGhvZHMgfSkgPT4ge1xuICByZXR1cm4gKFxuICAgIDxDb250ZW50Q29tcG9uZW50XG4gICAgICBjbGFzc05hbWU9e2ByZWFjdC1kcm9wZG93bi1zZWxlY3QtY29udGVudCAke1xuICAgICAgICBwYXJlbnRQcm9wcy5tdWx0aSA/ICdyZWFjdC1kcm9wZG93bi1zZWxlY3QtdHlwZS1tdWx0aScgOiAncmVhY3QtZHJvcGRvd24tc2VsZWN0LXR5cGUtc2luZ2xlJ1xuICAgICAgfWB9XG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3duKCdvcGVuJyl9PlxuICAgICAge3BhcmVudFByb3BzLmNvbnRlbnRSZW5kZXJlciA/IChcbiAgICAgICAgcGFyZW50UHJvcHMuY29udGVudFJlbmRlcmVyKHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcylcbiAgICAgICkgOiAoXG4gICAgICAgIDxSZWFjdC5GcmFnbWVudD5cbiAgICAgICAgICB7cGFyZW50UHJvcHMubXVsdGlcbiAgICAgICAgICAgID8gcGFyZW50U3RhdGUudmFsdWVzICYmXG4gICAgICAgICAgICAgIHBhcmVudFN0YXRlLnZhbHVlcy5tYXAoKGl0ZW0pID0+IChcbiAgICAgICAgICAgICAgICA8T3B0aW9uXG4gICAgICAgICAgICAgICAgICBrZXk9e2Ake2l0ZW1bcGFyZW50UHJvcHMudmFsdWVGaWVsZF19JHtpdGVtW3BhcmVudFByb3BzLmxhYmVsRmllbGRdfWB9XG4gICAgICAgICAgICAgICAgICBwYXJlbnRJdGVtPXtpdGVtfVxuICAgICAgICAgICAgICAgICAgcGFyZW50U3RhdGU9e3BhcmVudFN0YXRlfVxuICAgICAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17cGFyZW50TWV0aG9kc31cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICAgOiBwYXJlbnRTdGF0ZS52YWx1ZXMgJiZcbiAgICAgICAgICAgICAgcGFyZW50U3RhdGUudmFsdWVzLmxlbmd0aCA+IDAgJiYgPHNwYW4+e3BhcmVudFN0YXRlLnZhbHVlc1swXVtwYXJlbnRQcm9wcy5sYWJlbEZpZWxkXX08L3NwYW4+fVxuICAgICAgICAgIDxJbnB1dFxuICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17cGFyZW50TWV0aG9kc31cbiAgICAgICAgICAgIHBhcmVudFN0YXRlPXtwYXJlbnRTdGF0ZX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICAgKX1cbiAgICA8L0NvbnRlbnRDb21wb25lbnQ+XG4gICk7XG59O1xuXG5jb25zdCBDb250ZW50Q29tcG9uZW50ID0gc3R5bGVkLmRpdmBcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleDogMTtcbiAgZmxleC13cmFwOiB3cmFwO1xuYDtcblxuQ29udGVudC5wcm9wVHlwZXMgPSB7fTtcblxuZXhwb3J0IGRlZmF1bHQgQ29udGVudDtcbiJdfQ== */"});Content.propTypes={};var _default=Content;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _styledBase=_interopRequireDefault(require("@emotion/styled-base")),_react=_interopRequireDefault(require("react"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var Input=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods,e=c.values&&0<c.values.length&&b.addPlaceholder||b.placeholder;return b.inputRenderer?b.inputRenderer(b,c,d):_react.default.createElement(InputComponent,{tabIndex:"-1",className:"react-dropdown-select-input",size:d.getInputSize(),value:c.search,onClick:function a(){return d.dropDown("open")},onChange:d.setSearch,placeholder:e})};Input.propTypes={};var InputComponent=(0,_styledBase.default)("input",{target:"e11wid6y0",label:"InputComponent"})("production"===process.env.NODE_ENV?{name:"12mid5e",styles:"width:auto;border:none;margin-left:5px;background:transparent;font-size:smaller;:focus{outline:none;}"}:{name:"12mid5e",styles:"width:auto;border:none;margin-left:5px;background:transparent;font-size:smaller;:focus{outline:none;}",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2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ICBwbGFjZWhvbGRlcj17cGxhY2VIb2xkZXJ9XG4gICAgLz5cbiAgKTtcbn07XG5cbklucHV0LnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBJbnB1dENvbXBvbmVudCA9IHN0eWxlZC5pbnB1dGBcbiAgd2lkdGg6IGF1dG87XG4gIGJvcmRlcjogbm9uZTtcbiAgbWFyZ2luLWxlZnQ6IDVweDtcbiAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG4gIGZvbnQtc2l6ZTogc21hbGxlcjtcbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBJbnB1dDtcbiJdfQ== */"}),_default=Input;exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _styledBase=_interopRequireDefault(require("@emotion/styled-base")),_react=_interopRequireDefault(require("react"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var Input=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods,e=c.values&&0<c.values.length&&b.addPlaceholder||b.placeholder;return b.inputRenderer?b.inputRenderer(b,c,d):_react.default.createElement(InputComponent,{tabIndex:"-1",className:"react-dropdown-select-input",size:d.getInputSize(),value:c.search,onClick:function a(){return d.dropDown("open")},onChange:d.setSearch,placeholder:e})};Input.propTypes={};var InputComponent=(0,_styledBase.default)("input",{target:"e11wid6y0",label:"InputComponent"})("production"===process.env.NODE_ENV?{name:"udxerm",styles:"flex:1;display:flex;line-height:inherit;width:auto;border:none;margin-left:5px;background:transparent;font-size:smaller;:focus{outline:none;}"}:{name:"udxerm",styles:"flex:1;display:flex;line-height:inherit;width:auto;border:none;margin-left:5px;background:transparent;font-size:smaller;:focus{outline:none;}",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0lucHV0LmpzIl0sIm5hbW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XBlcyA9IHt9O1xuXG5jb25zdCBJbnB1dENvbXBvbmVudCA9IHN0eWxlZC5pbnB1dGBcbiAgZmxleDogMTtcbiAgZGlzcGxheTogZmxleDtcbiAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7XG4gIHdpZHRoOiBhdXRvO1xuICBib3JkZXI6IG5vbmU7XG4gIG1hcmdpbi1sZWZ0OiA1cHg7XG4gIGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuICBmb250LXNpemU6IHNtYWxsZXI7XG4gIDpmb2N1cyB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgSW5wdXQ7XG4iXX0= */"}),_default=Input;exports.default=_default; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Select=exports.hexToRGBA=void 0;var _styledBase=_interopRequireDefault(require("@emotion/styled-base")),_react=_interopRequireDefault(require("react")),_reactDom=_interopRequireDefault(require("react-dom")),_propTypes=_interopRequireDefault(require("prop-types")),_reactOnclickout=_interopRequireDefault(require("react-onclickout")),_Content=_interopRequireDefault(require("./components/Content")),_Dropdown=_interopRequireDefault(require("./components/Dropdown")),_Loading=_interopRequireDefault(require("./components/Loading")),_Clear=_interopRequireDefault(require("./components/Clear")),_Separator=_interopRequireDefault(require("./components/Separator")),_DropdownHandle=_interopRequireDefault(require("./components/DropdownHandle"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(a){if(Symbol.iterator in Object(a)||"[object Arguments]"===Object.prototype.toString.call(a))return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}function _possibleConstructorReturn(a,b){return b&&("object"===_typeof(b)||"function"==typeof b)?b:_assertThisInitialized(a)}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(a)}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var hexToRGBA=function(a,c){var d=parseInt(a.slice(1,3),16),e=parseInt(a.slice(3,5),16),f=parseInt(a.slice(5,7),16);return"rgba(".concat(d,", ").concat(e,", ").concat(f).concat(c&&", ".concat(c),")")};exports.hexToRGBA=hexToRGBA;var debounce=function(a){var b,c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];b&&clearTimeout(b),b=setTimeout(function(){a.apply(void 0,e),b=null},c)}},Select=/*#__PURE__*/function(a){function b(a){var c;return _classCallCheck(this,b),c=_possibleConstructorReturn(this,_getPrototypeOf(b).call(this,a)),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"onDropdownClose",function(){c.setState({cursor:0}),c.props.onDropdownClose()}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"onScroll",function(){c.props.closeOnScroll&&c.dropDown("close"),c.updateSelectBounds()}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"updateSelectBounds",function(){return c.select.current&&c.setState({selectBounds:c.select.current.getBoundingClientRect()})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"getSelectBounds",function(){return c.state.selectBounds}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"dropDown",function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"toggle";return c.props.keepOpen?c.setState({dropdown:!0}):"close"===a?(c.select.current.blur(),c.setState({dropdown:!1,search:""})):"open"===a?c.setState({dropdown:!0}):"toggle"===a&&(c.select.current.focus(),c.setState({dropdown:!c.state.dropdown}))}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"getSelectRef",function(){return c.select.current}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"addItem",function(a){if(c.props.multi){if(-1!==c.state.values.indexOf(a))return c.removeItem(null,a,!1);c.setState({values:[].concat(_toConsumableArray(c.state.values),[a])})}else c.setState({values:[a],dropdown:!1,search:""});return!0}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"removeItem",function(a,b){var d=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];a&&d&&(a.preventDefault(),a.stopPropagation(),c.dropDown("close")),c.setState({values:c.state.values.filter(function(a){return a[c.props.valueField]!==b[c.props.valueField]})})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"setSearch",function(a){c.setState({cursor:null}),c.setState({search:a.target.value})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"getInputSize",function(){return c.state.search?c.state.search.length:0<c.state.values.length?c.props.addPlaceholder.length:c.props.placeholder.length}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"toggleSelectAll",function(){return c.setState({values:0===c.state.values.length?c.selectAll():c.clearAll()})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"clearAll",function(){c.props.onClearAll(),c.setState({values:[]})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"selectAll",function(){return c.props.onSelectAll(),c.setState({values:c.props.options.filter(function(a){return!a.disabled})})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"isSelected",function(a){return-1!==c.state.values.indexOf(a)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"areAllSelected",function(){return c.state.values.length===c.props.options.filter(function(a){return!a.disabled}).length}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"searchResults",function(){var a=new RegExp(c.state.search,"i");return c.props.options.filter(function(b){return a.test(b[c.props.searchBy]||b[[c.props.labelField]])})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"activeCursorItem",function(a){return c.setState({activeCursorItem:a})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"handleKeyDown",function(a){("ArrowUp"===a.key||"ArrowDown"===a.key)&&a.preventDefault();var b=c.state.cursor;if("Escape"===a.key&&c.dropDown("close"),"Enter"===a.key){var d=c.searchResults()[b];d&&!d.disabled&&c.addItem(d)}"ArrowUp"===a.key&&0<=b&&c.setState(function(a){return{cursor:a.cursor-1}}),"ArrowDown"===a.key&&c.setState(function(a){return{cursor:a.cursor+1}})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"renderDropdown",function(){return c.props.portal?_reactDom.default.createPortal(_react.default.createElement(_Dropdown.default,{parentProps:c.props,parentState:c.state,parentMethods:c.methods}),c.dropdownRoot):_react.default.createElement(_Dropdown.default,{parentProps:c.props,parentState:c.state,parentMethods:c.methods})}),c.state={dropdown:!1,values:a.values,search:"",selectBounds:{},cursor:0},c.methods={removeItem:c.removeItem,dropDown:c.dropDown,addItem:c.addItem,setSearch:c.setSearch,getInputSize:c.getInputSize,toggleSelectAll:c.toggleSelectAll,clearAll:c.clearAll,selectAll:c.selectAll,searchResults:c.searchResults,getSelectRef:c.getSelectRef,isSelected:c.isSelected,getSelectBounds:c.getSelectBounds,areAllSelected:c.areAllSelected,handleKeyDown:c.handleKeyDown,activeCursorItem:c.activeCursorItem},c.select=_react.default.createRef(),c.dropdownRoot=document.createElement("div"),c}return _inherits(b,a),_createClass(b,[{key:"componentDidMount",value:function a(){this.props.portal&&this.props.portal.appendChild(this.dropdownRoot),window.addEventListener("resize",debounce(this.updateSelectBounds)),window.addEventListener("scroll",debounce(this.onScroll)),this.props.onChange(this.state.values),this.dropDown("close"),this.select&&this.updateSelectBounds()}},{key:"componentDidUpdate",value:function c(a,b){b.values!==this.state.values&&(this.props.onChange(this.state.values),this.updateSelectBounds()),b.search!==this.state.search&&this.updateSelectBounds(),b.values!==this.state.values&&this.props.closeOnSelect&&this.dropDown("close"),a.multi!==this.props.multi&&this.updateSelectBounds(),b.dropdown&&b.dropdown!==this.state.dropdown&&this.onDropdownClose(),b.dropdown||b.dropdown===this.state.dropdown||this.props.onDropdownOpen()}},{key:"componentWillUnmount",value:function a(){this.props.portal&&this.props.portal.removeChild(this.dropdownRoot),window.removeEventListener("resize",debounce(this.updateSelectBounds,this.props.debounceDelay)),window.removeEventListener("scroll",debounce(this.onScroll,this.props.debounceDelay))}},{key:"render",value:function b(){var a=this;return _react.default.createElement(_reactOnclickout.default,{onClickOut:function b(){return a.dropDown("close")}},_react.default.createElement(ReactDropdownSelect,{onKeyDown:this.handleKeyDown,tabIndex:"0",style:this.props.style,ref:this.select,disabled:this.props.disabled,className:this.props.className,color:this.props.color},_react.default.createElement(_Content.default,{parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.props.loading&&_react.default.createElement(_Loading.default,{parentProps:this.props}),this.props.clearable&&_react.default.createElement(_Clear.default,{parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.props.separator&&_react.default.createElement(_Separator.default,{parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.props.dropdownHandle&&_react.default.createElement(_DropdownHandle.default,{onCLick:function b(){return a.select.current.focus()},parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.state.dropdown&&this.renderDropdown()))}}]),b}(_react.default.Component);exports.Select=Select,_defineProperty(Select,"propTypes",{onChange:_propTypes.default.func.isRequired,onDropdownClose:_propTypes.default.func,onDropdownOpen:_propTypes.default.func,onClearAll:_propTypes.default.func,onSelectAll:_propTypes.default.func,values:_propTypes.default.array,options:_propTypes.default.array.isRequired,keepOpen:_propTypes.default.bool,dropdownGap:_propTypes.default.number,multi:_propTypes.default.bool,placeholder:_propTypes.default.string,addPlaceholder:_propTypes.default.string,disabled:_propTypes.default.bool,className:_propTypes.default.string,loading:_propTypes.default.bool,clearable:_propTypes.default.bool,separator:_propTypes.default.bool,dropdownHandle:_propTypes.default.bool,searchBy:_propTypes.default.string,closeOnScroll:_propTypes.default.bool,openOnTop:_propTypes.default.bool,style:_propTypes.default.object,contentRenderer:_propTypes.default.func,dropdownRenderer:_propTypes.default.func,itemRenderer:_propTypes.default.func,noDataRenderer:_propTypes.default.func,optionRenderer:_propTypes.default.func,inputRenderer:_propTypes.default.func,loadingRenderer:_propTypes.default.func,clearRenderer:_propTypes.default.func,separatorRenderer:_propTypes.default.func,dropdownHandleRenderer:_propTypes.default.func}),Select.defaultProps={addPlaceholder:"+",placeholder:"Select...",values:[],options:[],multi:!1,disabled:!1,searchBy:"label",clearable:!0,dropdownHandle:!0,separator:!0,keepOpen:void 0,noDataLabel:"No data",dropdownGap:5,closeOnScroll:!1,debounceDelay:0,labelField:"label",valueField:"value",color:"#0074D9",keepSelectedInList:!0,closeOnSelect:!1,openOnTop:!1,dropdownHeight:"300px",autoFocus:!0,portal:null,onDropdownOpen:function a(){},onDropdownClose:function a(){},onClearAll:function a(){},onSelectAll:function a(){}};var ReactDropdownSelect=(0,_styledBase.default)("div",{target:"e1gzf2xs0",label:"ReactDropdownSelect"})("position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;align-items:center;min-height:36px;",function(a){var b=a.disabled;return b?"cursor: not-allowed;pointer-events: none;opacity: 0.3;":"pointer-events: all;"},":hover,:focus-within{border-color:",function(a){var b=a.color;return b},";}:focus{outline:0;box-shadow:0 0 0 3px ",function(a){var b=a.color;return hexToRGBA(b,.2)},";}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3WnNDIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUmVhY3RET00gZnJvbSAncmVhY3QtZG9tJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgQ2xpY2tPdXRIYW5kbGVyIGZyb20gJ3JlYWN0LW9uY2xpY2tvdXQnO1xuXG5pbXBvcnQgQ29udGVudCBmcm9tICcuL2NvbXBvbmVudHMvQ29udGVudCc7XG5pbXBvcnQgRHJvcGRvd24gZnJvbSAnLi9jb21wb25lbnRzL0Ryb3Bkb3duJztcbmltcG9ydCBMb2FkaW5nIGZyb20gJy4vY29tcG9uZW50cy9Mb2FkaW5nJztcbmltcG9ydCBDbGVhciBmcm9tICcuL2NvbXBvbmVudHMvQ2xlYXInO1xuaW1wb3J0IFNlcGFyYXRvciBmcm9tICcuL2NvbXBvbmVudHMvU2VwYXJhdG9yJztcbmltcG9ydCBEcm9wZG93bkhhbmRsZSBmcm9tICcuL2NvbXBvbmVudHMvRHJvcGRvd25IYW5kbGUnO1xuXG5leHBvcnQgY29uc3QgaGV4VG9SR0JBID0gKGhleCwg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3RoaXMucHJvcHMuc2VwYXJhdG9yICYmIChcbiAgICAgICAgICAgIDxTZXBhcmF0b3JcbiAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3RoaXMucHJvcHN9XG4gICAgICAgICAgICAgIHBhcmVudFN0YXRlPXt0aGlzLnN0YXRlfVxuICAgICAgICAgICAgICBwYXJlbnRNZXRob2RzPXt0aGlzLm1ldGhvZHN9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICl9XG5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5kcm9wZG93bkhhbmRsZSAmJiAoXG4gICAgICAgICAgICA8RHJvcGRvd25IYW5kbGVcbiAgICAgICAgICAgICAgb25DTGljaz17KCkgPT4gdGhpcy5zZWxlY3QuY3VycmVudC5mb2N1cygpfVxuICAgICAgICAgICAgICBwYXJlbnRQcm9wcz17dGhpcy5wcm9wc31cbiAgICAgICAgICAgICAgcGFyZW50U3RhdGU9e3RoaXMuc3RhdGV9XG4gICAgICAgICAgICAgIHBhcmVudE1ldGhvZHM9e3RoaXMubWV0aG9kc31cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgKX1cblxuICAgICAgICAgIHt0aGlzLnN0YXRlLmRyb3Bkb3duICYmIHRoaXMucmVuZGVyRHJvcGRvd24oKX1cbiAgICAgICAgPC9SZWFjdERyb3Bkb3duU2VsZWN0PlxuICAgICAgPC9DbGlja091dEhhbmRsZXI+XG4gICAgKTtcbiAgfVxufVxuXG5TZWxlY3QuZGVmYXVsdFByb3BzID0ge1xuICBhZGRQbGFjZWhvbGRlcjogJysnLFxuICBwbGFjZWhvbGRlcjogJ1NlbGVjdC4uLicsXG4gIHZhbHVlczogW10sXG4gIG9wdGlvbnM6IFtdLFxuICBtdWx0aTogZmFsc2UsXG4gIGRpc2FibGVkOiBmYWxzZSxcbiAgc2VhcmNoQnk6ICdsYWJlbCcsXG4gIGNsZWFyYWJsZTogdHJ1ZSxcbiAgZHJvcGRvd25IYW5kbGU6IHRydWUsXG4gIHNlcGF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lO29wYWNpdHk6IDAuMzsnIDogJ3BvaW50ZXItZXZlbnRzOiBhbGw7J31cblxuICA6aG92ZXIsIFxuICA6Zm9jdXMtd2l0aGluIHtcbiAgICBib3JkZXItY29sb3I6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9O1xuICB9XG5cbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiAwO1xuICAgIGJveC1zaGFkb3c6IDAgMCAwIDNweCAkeyh7IGNvbG9yIH0pID0+IGhleFRvUkdCQShjb2xvciwgMC4yKX07XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IFNlbGVjdDtcbiJdfQ== */")),_default=Select;exports.default=_default; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Select=exports.hexToRGBA=void 0;var _styledBase=_interopRequireDefault(require("@emotion/styled-base")),_react=_interopRequireDefault(require("react")),_reactDom=_interopRequireDefault(require("react-dom")),_propTypes=_interopRequireDefault(require("prop-types")),_reactOnclickout=_interopRequireDefault(require("react-onclickout")),_Content=_interopRequireDefault(require("./components/Content")),_Dropdown=_interopRequireDefault(require("./components/Dropdown")),_Loading=_interopRequireDefault(require("./components/Loading")),_Clear=_interopRequireDefault(require("./components/Clear")),_Separator=_interopRequireDefault(require("./components/Separator")),_DropdownHandle=_interopRequireDefault(require("./components/DropdownHandle"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _typeof(a){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(a)}function _toConsumableArray(a){return _arrayWithoutHoles(a)||_iterableToArray(a)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function _iterableToArray(a){if(Symbol.iterator in Object(a)||"[object Arguments]"===Object.prototype.toString.call(a))return Array.from(a)}function _arrayWithoutHoles(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b<a.length;b++)c[b]=a[b];return c}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}function _possibleConstructorReturn(a,b){return b&&("object"===_typeof(b)||"function"==typeof b)?b:_assertThisInitialized(a)}function _getPrototypeOf(a){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},_getPrototypeOf(a)}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),b&&_setPrototypeOf(a,b)}function _setPrototypeOf(a,b){return _setPrototypeOf=Object.setPrototypeOf||function(a,b){return a.__proto__=b,a},_setPrototypeOf(a,b)}function _assertThisInitialized(a){if(void 0===a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}var hexToRGBA=function(a,c){var d=parseInt(a.slice(1,3),16),e=parseInt(a.slice(3,5),16),f=parseInt(a.slice(5,7),16);return"rgba(".concat(d,", ").concat(e,", ").concat(f).concat(c&&", ".concat(c),")")};exports.hexToRGBA=hexToRGBA;var debounce=function(a){var b,c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0;return function(){for(var d=arguments.length,e=Array(d),f=0;f<d;f++)e[f]=arguments[f];b&&clearTimeout(b),b=setTimeout(function(){a.apply(void 0,e),b=null},c)}},Select=/*#__PURE__*/function(a){function b(a){var c;return _classCallCheck(this,b),c=_possibleConstructorReturn(this,_getPrototypeOf(b).call(this,a)),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"onDropdownClose",function(){c.setState({cursor:0}),c.props.onDropdownClose()}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"onScroll",function(){c.props.closeOnScroll&&c.dropDown("close"),c.updateSelectBounds()}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"updateSelectBounds",function(){return c.select.current&&c.setState({selectBounds:c.select.current.getBoundingClientRect()})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"getSelectBounds",function(){return c.state.selectBounds}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"dropDown",function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"toggle";return c.props.keepOpen?c.setState({dropdown:!0}):"close"===a?(c.select.current.blur(),c.setState({dropdown:!1,search:""})):"open"===a?c.setState({dropdown:!0}):"toggle"===a&&(c.select.current.focus(),c.setState({dropdown:!c.state.dropdown}))}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"getSelectRef",function(){return c.select.current}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"addItem",function(a){if(c.props.multi){if(-1!==c.state.values.indexOf(a))return c.removeItem(null,a,!1);c.setState({values:[].concat(_toConsumableArray(c.state.values),[a])})}else c.setState({values:[a],dropdown:!1,search:""});return!0}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"removeItem",function(a,b){var d=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];a&&d&&(a.preventDefault(),a.stopPropagation(),c.dropDown("close")),c.setState({values:c.state.values.filter(function(a){return a[c.props.valueField]!==b[c.props.valueField]})})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"setSearch",function(a){c.setState({cursor:null}),c.setState({search:a.target.value})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"getInputSize",function(){return c.state.search?c.state.search.length:0<c.state.values.length?c.props.addPlaceholder.length:c.props.placeholder.length}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"toggleSelectAll",function(){return c.setState({values:0===c.state.values.length?c.selectAll():c.clearAll()})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"clearAll",function(){c.props.onClearAll(),c.setState({values:[]})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"selectAll",function(){return c.props.onSelectAll(),c.setState({values:c.props.options.filter(function(a){return!a.disabled})})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"isSelected",function(a){return-1!==c.state.values.indexOf(a)}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"areAllSelected",function(){return c.state.values.length===c.props.options.filter(function(a){return!a.disabled}).length}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"searchResults",function(){var a=new RegExp(c.state.search,"i");return c.props.options.filter(function(b){return a.test(b[c.props.searchBy]||b[[c.props.labelField]])})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"activeCursorItem",function(a){return c.setState({activeCursorItem:a})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"handleKeyDown",function(a){("ArrowUp"===a.key||"ArrowDown"===a.key)&&a.preventDefault();var b=c.state.cursor;if("Escape"===a.key&&c.dropDown("close"),"Enter"===a.key){var d=c.searchResults()[b];d&&!d.disabled&&c.addItem(d)}"ArrowUp"===a.key&&0<=b&&c.setState(function(a){return{cursor:a.cursor-1}}),"ArrowDown"===a.key&&c.setState(function(a){return{cursor:a.cursor+1}})}),_defineProperty(_assertThisInitialized(_assertThisInitialized(c)),"renderDropdown",function(){return c.props.portal?_reactDom.default.createPortal(_react.default.createElement(_Dropdown.default,{parentProps:c.props,parentState:c.state,parentMethods:c.methods}),c.dropdownRoot):_react.default.createElement(_Dropdown.default,{parentProps:c.props,parentState:c.state,parentMethods:c.methods})}),c.state={dropdown:!1,values:a.values,search:"",selectBounds:{},cursor:0},c.methods={removeItem:c.removeItem,dropDown:c.dropDown,addItem:c.addItem,setSearch:c.setSearch,getInputSize:c.getInputSize,toggleSelectAll:c.toggleSelectAll,clearAll:c.clearAll,selectAll:c.selectAll,searchResults:c.searchResults,getSelectRef:c.getSelectRef,isSelected:c.isSelected,getSelectBounds:c.getSelectBounds,areAllSelected:c.areAllSelected,handleKeyDown:c.handleKeyDown,activeCursorItem:c.activeCursorItem},c.select=_react.default.createRef(),c.dropdownRoot="undefined"!=typeof document&&document.createElement("div"),c}return _inherits(b,a),_createClass(b,[{key:"componentDidMount",value:function a(){this.props.portal&&this.props.portal.appendChild(this.dropdownRoot),window.addEventListener("resize",debounce(this.updateSelectBounds)),window.addEventListener("scroll",debounce(this.onScroll)),this.props.onChange(this.state.values),this.dropDown("close"),this.select&&this.updateSelectBounds()}},{key:"componentDidUpdate",value:function c(a,b){b.values!==this.state.values&&(this.props.onChange(this.state.values),this.updateSelectBounds()),b.search!==this.state.search&&this.updateSelectBounds(),b.values!==this.state.values&&this.props.closeOnSelect&&this.dropDown("close"),a.multi!==this.props.multi&&this.updateSelectBounds(),b.dropdown&&b.dropdown!==this.state.dropdown&&this.onDropdownClose(),b.dropdown||b.dropdown===this.state.dropdown||this.props.onDropdownOpen()}},{key:"componentWillUnmount",value:function a(){this.props.portal&&this.props.portal.removeChild(this.dropdownRoot),window.removeEventListener("resize",debounce(this.updateSelectBounds,this.props.debounceDelay)),window.removeEventListener("scroll",debounce(this.onScroll,this.props.debounceDelay))}},{key:"render",value:function b(){var a=this;return _react.default.createElement(_reactOnclickout.default,{onClickOut:function b(){return a.dropDown("close")}},_react.default.createElement(ReactDropdownSelect,{onKeyDown:this.handleKeyDown,tabIndex:"0",style:this.props.style,ref:this.select,disabled:this.props.disabled,className:this.props.className,color:this.props.color},_react.default.createElement(_Content.default,{parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.props.loading&&_react.default.createElement(_Loading.default,{parentProps:this.props}),this.props.clearable&&_react.default.createElement(_Clear.default,{parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.props.separator&&_react.default.createElement(_Separator.default,{parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.props.dropdownHandle&&_react.default.createElement(_DropdownHandle.default,{onCLick:function b(){return a.select.current.focus()},parentProps:this.props,parentState:this.state,parentMethods:this.methods}),this.state.dropdown&&this.renderDropdown()))}}]),b}(_react.default.Component);exports.Select=Select,_defineProperty(Select,"propTypes",{onChange:_propTypes.default.func.isRequired,onDropdownClose:_propTypes.default.func,onDropdownOpen:_propTypes.default.func,onClearAll:_propTypes.default.func,onSelectAll:_propTypes.default.func,values:_propTypes.default.array,options:_propTypes.default.array.isRequired,keepOpen:_propTypes.default.bool,dropdownGap:_propTypes.default.number,multi:_propTypes.default.bool,placeholder:_propTypes.default.string,addPlaceholder:_propTypes.default.string,disabled:_propTypes.default.bool,className:_propTypes.default.string,loading:_propTypes.default.bool,clearable:_propTypes.default.bool,separator:_propTypes.default.bool,dropdownHandle:_propTypes.default.bool,searchBy:_propTypes.default.string,closeOnScroll:_propTypes.default.bool,openOnTop:_propTypes.default.bool,style:_propTypes.default.object,contentRenderer:_propTypes.default.func,dropdownRenderer:_propTypes.default.func,itemRenderer:_propTypes.default.func,noDataRenderer:_propTypes.default.func,optionRenderer:_propTypes.default.func,inputRenderer:_propTypes.default.func,loadingRenderer:_propTypes.default.func,clearRenderer:_propTypes.default.func,separatorRenderer:_propTypes.default.func,dropdownHandleRenderer:_propTypes.default.func}),Select.defaultProps={addPlaceholder:"+",placeholder:"Select...",values:[],options:[],multi:!1,disabled:!1,searchBy:"label",clearable:!0,dropdownHandle:!0,separator:!0,keepOpen:void 0,noDataLabel:"No data",dropdownGap:5,closeOnScroll:!1,debounceDelay:0,labelField:"label",valueField:"value",color:"#0074D9",keepSelectedInList:!0,closeOnSelect:!1,openOnTop:!1,dropdownHeight:"300px",autoFocus:!0,portal:null,onDropdownOpen:function a(){},onDropdownClose:function a(){},onClearAll:function a(){},onSelectAll:function a(){}};var ReactDropdownSelect=(0,_styledBase.default)("div",{target:"e1gzf2xs0",label:"ReactDropdownSelect"})("position:relative;display:flex;border:1px solid #ccc;width:100%;border-radius:2px;padding:2px 5px;flex-direction:row;align-items:center;min-height:36px;",function(a){var b=a.disabled;return b?"cursor: not-allowed;pointer-events: none;opacity: 0.3;":"pointer-events: all;"},":hover,:focus-within{border-color:",function(a){var b=a.color;return b},";}:focus{outline:0;box-shadow:0 0 0 3px ",function(a){var b=a.color;return hexToRGBA(b,.2)},";}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3WnNDIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUmVhY3RET00gZnJvbSAncmVhY3QtZG9tJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgQ2xpY2tPdXRIYW5kbGVyIGZyb20gJ3JlYWN0LW9uY2xpY2tvdXQnO1xuXG5pbXBvcnQgQ29udGVudCBmcm9tICcuL2NvbXBvbmVudHMvQ29udGVudCc7XG5pbXBvcnQgRHJvcGRvd24gZnJvbSAnLi9jb21wb25lbnRzL0Ryb3Bkb3duJztcbmltcG9ydCBMb2FkaW5nIGZyb20gJy4vY29tcG9uZW50cy9Mb2FkaW5nJztcbmltcG9ydCBDbGVhciBmcm9tICcuL2NvbXBvbmVudHMvQ2xlYXInO1xuaW1wb3J0IFNlcGFyYXRvciBmcm9tICcuL2NvbXBvbmVudHMvU2VwYXJhdG9yJztcbmltcG9ydCBEcm9wZG93bkhhbmRsZSBmcm9tICcuL2NvbXBvbmVudHMvRHJvcGRvd25IYW5kbGUnO1xuXG5leHBvcnQgY29uc3QgaGV4VG9SR0JBID0gKGhleCwgYWxwaGEpID0+IHtcbiAgY29uc3QgciA9IHBh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yZW50UHJvcHM9e3RoaXMucHJvcHN9IHBhcmVudFN0YXRlPXt0aGlzLnN0YXRlfSBwYXJlbnRNZXRob2RzPXt0aGlzLm1ldGhvZHN9IC8+XG4gICAgKTtcblxuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxDbGlja091dEhhbmRsZXIgb25DbGlja091dD17KCkgPT4gdGhpcy5kcm9wRG93bignY2xvc2UnKX0+XG4gICAgICAgIDxSZWFjdERyb3Bkb3duU2VsZWN0XG4gICAgICAgICAgb25LZXlEb3duPXt0aGlzLmhhbmRsZUtleURvd259XG4gICAgICAgICAgdGFiSW5kZXg9XCIwXCJcbiAgICAgICAgICBzdHlsZT17dGhpcy5wcm9wcy5zdHlsZX1cbiAgICAgICAgICByZWY9e3RoaXMuc2VsZWN0fVxuICAgICAgICAgIGRpc2FibGVkPXt0aGlzLnByb3BzLmRpc2FibGVkfVxuICAgICAgICAgIGNsYXNzTmFtZT17dGhpcy5wcm9wcy5jbGFzc05hbWV9XG4gICAgICAgICAgY29sb3I9e3RoaXMucHJvcHMuY29sb3J9PlxuICAgICAgICAgIDxDb250ZW50IHBhcmVudFByb3BzPXt0aGlzLnByb3BzfSBwYXJlbnRTdGF0ZT17dGhpcy5zdGF0ZX0gcGFyZW50TWV0aG9kcz17dGhpcy5tZXRob2RzfSAvPlxuXG4gICAgICAgICAge3RoaXMucHJvcHMubG9hZGluZyAmJiA8TG9hZGluZyBwYXJlbnRQcm9wcz17dGhpcy5wcm9wc30gLz59XG5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5jbGVhcmFibGUgJiYgKFxuICAgICAgICAgICAgPENsZWFyIHBhcmVudFByb3BzPXt0aGlzLnByb3BzfSBwYXJlbnRTdGF0ZT17dGhpcy5zdGF0ZX0gcGFyZW50TWV0aG9kcz17dGhpcy5tZXRob2RzfSAvPlxuICAgICAgICAgICl9XG5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5zZXBhcmF0b3IgJiYgKFxuICAg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DsnfVxuXG4gIDpob3ZlciwgXG4gIDpmb2N1cy13aXRoaW4ge1xuICAgIGJvcmRlci1jb2xvcjogJHsoeyBjb2xvciB9KSA9PiBjb2xvcn07XG4gIH1cblxuICA6Zm9jdXMge1xuICAgIG91dGxpbmU6IDA7XG4gICAgYm94LXNoYWRvdzogMCAwIDAgM3B4ICR7KHsgY29sb3IgfSkgPT4gaGV4VG9SR0JBKGNvbG9yLCAwLjIpfTtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgU2VsZWN0O1xuIl19 */")),_default=Select;exports.default=_default; |
{ | ||
"name": "react-dropdown-select", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Customizable dropdown select for react", | ||
@@ -84,3 +84,4 @@ "main": "dist/index.js", | ||
] | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
77062