react-dropdown-select
Advanced tools
Comparing version 1.3.4 to 1.4.0
@@ -1,42 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Clear = function Clear(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return parentProps.clearRenderer ? parentProps.clearRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(ClearComponent, { | ||
tabIndex: "-1", | ||
onClick: function onClick() { | ||
return parentMethods.clearAll(); | ||
}, | ||
onKeyPress: function onKeyPress() { | ||
return parentMethods.clearAll(); | ||
} | ||
}, "\xD7"); | ||
}; | ||
Clear.propTypes = {}; | ||
var ClearComponent = (0, _styledBase.default)("div", { | ||
target: "e11qlq5e0", | ||
label: "ClearComponent" | ||
})(process.env.NODE_ENV === "production" ? { | ||
name: "992gsg", | ||
styles: "line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}" | ||
} : { | ||
name: "992gsg", | ||
styles: "line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}", | ||
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0NsZWFyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCaUMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvQ2xlYXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBDbGVhciA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcyB9KSA9PlxuICBwYXJlbnRQcm9wcy5jbGVhclJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmNsZWFyUmVuZGVyZXIocGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzKVxuICApIDogKFxuICAgIDxDbGVhckNvbXBvbmVudFxuICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmNsZWFyQWxsKCl9XG4gICAgICBvbktleVByZXNzPXsoKSA9PiBwYXJlbnRNZXRob2RzLmNsZWFyQWxsKCl9PlxuICAgICAgJnRpbWVzO1xuICAgIDwvQ2xlYXJDb21wb25lbnQ+XG4gICk7XG5cbkNsZWFyLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBDbGVhckNvbXBvbmVudCA9IHN0eWxlZC5kaXZgXG4gIGxpbmUtaGVpZ2h0OiAyNXB4O1xuICBtYXJnaW46IDAgMTBweDtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBcbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG5cbiAgOmhvdmVyIHtcbiAgICBjb2xvcjogdG9tYXRvO1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBDbGVhcjtcbiJdfQ== */" | ||
}); | ||
var _default = Clear; | ||
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 Clear=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return b.clearRenderer?b.clearRenderer(b,c,d):_react.default.createElement(ClearComponent,{tabIndex:"-1",onClick:function a(){return d.clearAll()},onKeyPress:function a(){return d.clearAll()}},"\xD7")};Clear.propTypes={};var ClearComponent=(0,_styledBase.default)("div",{target:"e11qlq5e0",label:"ClearComponent"})("production"===process.env.NODE_ENV?{name:"992gsg",styles:"line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}"}:{name:"992gsg",styles:"line-height:25px;margin:0 10px;cursor:pointer;:focus{outline:none;}:hover{color:tomato;}",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0NsZWFyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCaUMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvQ2xlYXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBDbGVhciA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcyB9KSA9PlxuICBwYXJlbnRQcm9wcy5jbGVhclJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmNsZWFyUmVuZGVyZXIocGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzKVxuICApIDogKFxuICAgIDxDbGVhckNvbXBvbmVudFxuICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmNsZWFyQWxsKCl9XG4gICAgICBvbktleVByZXNzPXsoKSA9PiBwYXJlbnRNZXRob2RzLmNsZWFyQWxsKCl9PlxuICAgICAgJnRpbWVzO1xuICAgIDwvQ2xlYXJDb21wb25lbnQ+XG4gICk7XG5cbkNsZWFyLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBDbGVhckNvbXBvbmVudCA9IHN0eWxlZC5kaXZgXG4gIGxpbmUtaGVpZ2h0OiAyNXB4O1xuICBtYXJnaW46IDAgMTBweDtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBcbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG5cbiAgOmhvdmVyIHtcbiAgICBjb2xvcjogdG9tYXRvO1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBDbGVhcjtcbiJdfQ== */"}),_default=Clear;exports.default=_default; |
@@ -1,55 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _Option = _interopRequireDefault(require("./Option")); | ||
var _Input = _interopRequireDefault(require("./Input")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Content = function Content(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return _react.default.createElement(ContentComponent, { | ||
className: "react-dropdown-select-content ".concat(parentProps.multi ? 'react-dropdown-select-type-multi' : 'react-dropdown-select-type-single'), | ||
onClick: function onClick() { | ||
return parentMethods.dropDown('open'); | ||
} | ||
}, parentProps.contentRenderer ? parentProps.contentRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(_react.default.Fragment, null, parentProps.multi ? parentState.values && parentState.values.map(function (item) { | ||
return _react.default.createElement(_Option.default, { | ||
key: "".concat(item[parentProps.valueField]).concat(item[parentProps.labelField]), | ||
parentItem: item, | ||
parentState: parentState, | ||
parentProps: parentProps, | ||
parentMethods: parentMethods | ||
}); | ||
}) : parentState.values && parentState.values.length > 0 && _react.default.createElement("span", null, parentState.values[0][parentProps.labelField]), _react.default.createElement(_Input.default, { | ||
parentProps: parentProps, | ||
parentMethods: parentMethods, | ||
parentState: parentState | ||
}))); | ||
}; | ||
var ContentComponent = (0, _styledBase.default)("div", { | ||
target: "e1gn6jc30", | ||
label: "ContentComponent" | ||
})(process.env.NODE_ENV === "production" ? { | ||
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:"1rr4qq7",styles:"flex:1;"}:{name:"1rr4qq7",styles:"flex:1;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0NvbnRlbnQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBeUNtQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG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dWVGaWVsZF19JHtpdGVtW3BhcmVudFByb3BzLmxhYmVsRmllbGRdfWB9XG4gICAgICAgICAgICAgICAgICBwYXJlbnRJdGVtPXtpdGVtfVxuICAgICAgICAgICAgICAgICAgcGFyZW50U3RhdGU9e3BhcmVudFN0YXRlfVxuICAgICAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17cGFyZW50TWV0aG9kc31cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKVxuICAgICAgICAgICAgOiBwYXJlbnRTdGF0ZS52YWx1ZXMgJiZcbiAgICAgICAgICAgICAgcGFyZW50U3RhdGUudmFsdWVzLmxlbmd0aCA+IDAgJiYgPHNwYW4+e3BhcmVudFN0YXRlLnZhbHVlc1swXVtwYXJlbnRQcm9wcy5sYWJlbEZpZWxkXX08L3NwYW4+fVxuICAgICAgICAgIDxJbnB1dFxuICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17cGFyZW50TWV0aG9kc31cbiAgICAgICAgICAgIHBhcmVudFN0YXRlPXtwYXJlbnRTdGF0ZX1cbiAgICAgICAgICAvPlxuICAgICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICAgKX1cbiAgICA8L0NvbnRlbnRDb21wb25lbnQ+XG4gICk7XG59O1xuXG5jb25zdCBDb250ZW50Q29tcG9uZW50ID0gc3R5bGVkLmRpdmBcbiAgZmxleDogMTtcbmA7XG5cbkNvbnRlbnQucHJvcFR5cGVzID0ge307XG5cbmV4cG9ydCBkZWZhdWx0IENvbnRlbnQ7XG4iXX0= */"});Content.propTypes={};var _default=Content;exports.default=_default; |
@@ -1,65 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _NoData = _interopRequireDefault(require("./NoData")); | ||
var _Item = _interopRequireDefault(require("./Item")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Dropdown = function Dropdown(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return _react.default.createElement(DropDown, { | ||
tabIndex: "-1", | ||
"aria-expanded": "true", | ||
role: "list", | ||
openOnTop: parentProps.openOnTop, | ||
selectBounds: parentState.selectBounds, | ||
dropdownGap: parentProps.dropdownGap, | ||
dropdownHeight: parentProps.dropdownHeight, | ||
className: "react-dropdown-select-dropdown" | ||
}, parentProps.dropdownRenderer ? parentProps.dropdownRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(_react.default.Fragment, null, parentMethods.searchResults().length === 0 ? _react.default.createElement(_NoData.default, { | ||
className: "react-dropdown-select-no-data", | ||
parentState: parentState, | ||
parentProps: parentProps, | ||
parentMethods: parentMethods | ||
}) : parentMethods.searchResults().map(function (item, itemIndex) { | ||
return _react.default.createElement(_Item.default, { | ||
key: item[parentProps.valueField], | ||
item: item, | ||
itemIndex: itemIndex, | ||
parentState: parentState, | ||
parentProps: parentProps, | ||
parentMethods: parentMethods | ||
}); | ||
}))); | ||
}; | ||
Dropdown.propTypes = {}; | ||
var DropDown = (0, _styledBase.default)("div", { | ||
target: "e1qjn9k90", | ||
label: "DropDown" | ||
})("position:absolute;", function (_ref2) { | ||
var selectBounds = _ref2.selectBounds, | ||
dropdownGap = _ref2.dropdownGap, | ||
openOnTop = _ref2.openOnTop; | ||
return openOnTop ? "bottom: ".concat(selectBounds.height + 2 + dropdownGap, "px") : "top: ".concat(selectBounds.height + 2 + dropdownGap, "px"); | ||
}, ";left:0;border:1px solid #ccc;width:", function (_ref3) { | ||
var selectBounds = _ref3.selectBounds; | ||
return selectBounds.width; | ||
}, "px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 #0000003b;max-height:", function (_ref4) { | ||
var dropdownHeight = _ref4.dropdownHeight; | ||
return dropdownHeight; | ||
}, ";overflow:auto;:focus{outline:none;}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWdEMkIiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5pbXBvcnQgTm9EYXRhIGZyb20gJy4vTm9EYXRhJztcbmltcG9ydCBJdGVtIGZyb20gJy4vSXRlbSc7XG5cbmNvbnN0IERyb3Bkb3duID0gKHsgcGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzIH0pID0+IChcbiAgPERyb3BEb3duXG4gICAgdGFiSW5kZXg9XCItMVwiXG4gICAgYXJpYS1leHBhbmRlZD1cInRydWVcIlxuICAgIHJvbGU9XCJsaXN0XCJcbiAgICBvcGVuT25Ub3A9e3BhcmVudFByb3BzLm9wZW5PblRvcH1cbiAgICBzZWxlY3RCb3VuZHM9e3BhcmVudFN0YXRlLnNlbGVjdEJvdW5kc31cbiAgICBkcm9wZG93bkdhcD17cGFyZW50UHJvcHMuZHJvcGRvd25HYXB9XG4gICAgZHJvcGRvd25IZWlnaHQ9e3BhcmVudFByb3BzLmRyb3Bkb3duSGVpZ2h0fVxuICAgIGNsYXNzTmFtZT1cInJlYWN0LWRyb3Bkb3duLXNlbGVjdC1kcm9wZG93blwiPlxuICAgIHtwYXJlbnRQcm9wcy5kcm9wZG93blJlbmRlcmVyID8gKFxuICAgICAgcGFyZW50UHJvcHMuZHJvcGRvd25SZW5kZXJlcihwYXJlbnRQcm9wcywgcGFyZW50U3RhdGUsIHBhcmVudE1ldGhvZHMpXG4gICAgKSA6IChcbiAgICAgIDxSZWFjdC5GcmFnbWVudD5cbiAgICAgICAge3BhcmVudE1ldGhvZHMuc2VhcmNoUmVzdWx0cygpLmxlbmd0aCA9PT0gMCA/IChcbiAgICAgICAgICA8Tm9EYXRhXG4gICAgICAgICAgICBjbGFzc05hbWU9XCJyZWFjdC1kcm9wZG93bi1zZWxlY3Qtbm8tZGF0YVwiXG4gICAgICAgICAgICBwYXJlbnRTdGF0ZT17cGFyZW50U3RhdGV9XG4gICAgICAgICAgICBwYXJlbnRQcm9wcz17cGFyZW50UHJvcHN9XG4gICAgICAgICAgICBwYXJlbnRNZXRob2RzPXtwYXJlbnRNZXRob2RzfVxuICAgICAgICAgIC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgcGFyZW50TWV0aG9kc1xuICAgICAgICAgICAgLnNlYXJjaFJlc3VsdHMoKVxuICAgICAgICAgICAgLm1hcCgoaXRlbSwgaXRlbUluZGV4KSA9PiAoXG4gICAgICAgICAgICAgIDxJdGVtXG4gICAgICAgICAgICAgICAga2V5PXtpdGVtW3BhcmVudFByb3BzLnZhbHVlRmllbGRdfVxuICAgICAgICAgICAgICAgIGl0ZW09e2l0ZW19XG4gICAgICAgICAgICAgICAgaXRlbUluZGV4PXtpdGVtSW5kZXh9XG4gICAgICAgICAgICAgICAgcGFyZW50U3RhdGU9e3BhcmVudFN0YXRlfVxuICAgICAgICAgICAgICAgIHBhcmVudFByb3BzPXtwYXJlbnRQcm9wc31cbiAgICAgICAgICAgICAgICBwYXJlbnRNZXRob2RzPXtwYXJlbnRNZXRob2RzfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKSlcbiAgICAgICAgKX1cbiAgICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gICAgKX1cbiAgPC9Ecm9wRG93bj5cbik7XG5cbkRyb3Bkb3duLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBEcm9wRG93biA9IHN0eWxlZC5kaXZgXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgJHsoeyBzZWxlY3RCb3VuZHMsIGRyb3Bkb3duR2FwLCBvcGVuT25Ub3B9KSA9PiBvcGVuT25Ub3AgXG4gID8gYGJvdHRvbTogJHtzZWxlY3RCb3VuZHMuaGVpZ2h0ICsgMiArIGRyb3Bkb3duR2FwfXB4YCBcbiAgOiBgdG9wOiAke3NlbGVjdEJvdW5kcy5oZWlnaHQgKyAyICsgZHJvcGRvd25HYXB9cHhgfTtcbiAgbGVmdDogMDtcbiAgYm9yZGVyOiAxcHggc29saWQgI2NjYztcbiAgd2lkdGg6ICR7KHsgc2VsZWN0Qm91bmRzIH0pID0+IHNlbGVjdEJvdW5kcy53aWR0aH1weDtcbiAgcGFkZGluZzogMDtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgYmFja2dyb3VuZDogI2ZmZjtcbiAgYm9yZGVyLXJhZGl1czogMnB4O1xuICBib3gtc2hhZG93OiAwIDAgMTBweCAwICMwMDAwMDAzYjtcbiAgbWF4LWhlaWdodDogJHsoeyBkcm9wZG93bkhlaWdodCB9KSA9PiBkcm9wZG93bkhlaWdodH07XG4gIG92ZXJmbG93OiBhdXRvO1xuICBcbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG59XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBEcm9wZG93bjtcbiJdfQ== */")); | ||
var _default = Dropdown; | ||
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")),_NoData=_interopRequireDefault(require("./NoData")),_Item=_interopRequireDefault(require("./Item")),_index=require("../index");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var Dropdown=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return _react.default.createElement(DropDown,{tabIndex:"-1","aria-expanded":"true",role:"list",openOnTop:b.openOnTop,selectBounds:c.selectBounds,portal:b.portal,dropdownGap:b.dropdownGap,dropdownHeight:b.dropdownHeight,className:"react-dropdown-select-dropdown"},b.dropdownRenderer?b.dropdownRenderer(b,c,d):_react.default.createElement(_react.default.Fragment,null,0===d.searchResults().length?_react.default.createElement(_NoData.default,{className:"react-dropdown-select-no-data",parentState:c,parentProps:b,parentMethods:d}):d.searchResults().map(function(a,e){return _react.default.createElement(_Item.default,{key:a[b.valueField],item:a,itemIndex:e,parentState:c,parentProps:b,parentMethods:d})})))};Dropdown.propTypes={};var DropDown=(0,_styledBase.default)("div",{target:"e1qjn9k90",label:"DropDown"})("position:absolute;",function(a){var b=a.selectBounds,c=a.dropdownGap,d=a.openOnTop;return d?"bottom: ".concat(b.height+2+c,"px"):"top: ".concat(b.height+2+c,"px")},";",function(a){var b=a.selectBounds,c=a.dropdownGap,d=a.portal;return d?"\n position: fixed;\n top: ".concat(b.bottom+c,"px;\n left: ").concat(b.left-1,"px;"):"left: -1px;"},";border:1px solid #ccc;width:",function(a){var b=a.selectBounds;return b.width},"px;padding:0;display:flex;flex-direction:column;background:#fff;border-radius:2px;box-shadow:0 0 10px 0 ",function(){return(0,_index.hexToRGBA)("#000000",.2)},";max-height:",function(a){var b=a.dropdownHeight;return b},";overflow:auto;:focus{outline:none;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1EMkIiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd24uanMiLCJzb3VyY2V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ICAgICAgIGNsYXNzTmFtZT1cInJlYWN0LWRyb3Bkb3duLXNlbGVjdC1uby1kYXRhXCJcbiAgICAgICAgICAgIHBhcmVudFN0YXRlPXtwYXJlbnRTdGF0ZX1cbiAgICAgICAgICAgIHBhcmVudFByb3BzPXtwYXJlbnRQcm9wc31cbiAgICAgICAgICAgIHBhcmVudE1ldGhvZHM9e3BhcmVudE1ldGhvZHN9XG4gICAgICAgICAgLz5cbiAgICAgICAgKSA6IChcbiAgICAgICAgICBwYXJlbnRNZXRob2RzXG4gICAgICAgICAgICAuc2VhcmNoUmVzdWx0cygpXG4gICAgICAgICAgICAubWFwKChpdGVtLCBpdGVtSW5kZXgpID0+IChcbiAgICAgICAgICAgICAgPEl0ZW1cbiAgICAgICAgICAgICAgICBrZXk9e2l0ZW1bcGFyZW50UHJvcHMudmFsdWVGaWVsZF19XG4gICAgICAgICAgICAgICAgaXRlbT17aXRlbX1cbiAgICAgICAgICAgICAgICBpdGVtSW5kZXg9e2l0ZW1JbmRleH1cbiAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZT17cGFyZW50U3RhdGV9XG4gICAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3BhcmVudFByb3BzfVxuICAgICAgICAgICAgICAgIHBhcmVudE1ldGhvZHM9e3BhcmVudE1ldGhvZHN9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApKVxuICAgICAgICApfVxuICAgICAgPC9SZWFjdC5GcmFnbWVudD5cbiAgICApfVxuICA8L0Ryb3BEb3duPlxuKTtcblxuRHJvcGRvd24ucHJvcFR5cGVzID0ge307XG5cbmNvbnN0IERyb3BEb3duID0gc3R5bGVkLmRpdmBcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICAkeyh7IHNlbGVjdEJvdW5kcywgZHJvcGRvd25HYXAsIG9wZW5PblRvcH0pID0+IG9wZW5PblRvcCBcbiAgICA/IGBib3R0b206ICR7c2VsZWN0Qm91bmRzLmhlaWdodCArIDIgKyBkcm9wZG93bkdhcH1weGAgXG4gICAgOiBgdG9wOiAke3NlbGVjdEJvdW5kcy5oZWlnaHQgKyAyICsgZHJvcGRvd25HYXB9cHhgfTtcbiAgXG4gICR7KHsgc2VsZWN0Qm91bmRzLCBkcm9wZG93bkdhcCwgcG9ydGFsfSkgPT4gcG9ydGFsIFxuICAgID8gYFxuICAgICAgcG9zaXRpb246IGZpeGVkO1xuICAgICAgdG9wOiAke3NlbGVjdEJvdW5kcy5ib3R0b20gKyBkcm9wZG93bkdhcH1weDtcbiAgICAgIGxlZnQ6ICR7c2VsZWN0Qm91bmRzLmxlZnQgLSAxfXB4O2AgXG4gICAgOiBgbGVmdDogLTFweDtgfTtcbiAgYm9yZGVyOiAxcHggc29saWQgI2NjYztcbiAgd2lkdGg6ICR7KHsgc2VsZWN0Qm91bmRzIH0pID0+IHNlbGVjdEJvdW5kcy53aWR0aH1weDtcbiAgcGFkZGluZzogMDtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgYmFja2dyb3VuZDogI2ZmZjtcbiAgYm9yZGVyLXJhZGl1czogMnB4O1xuICBib3gtc2hhZG93OiAwIDAgMTBweCAwICR7KCkgPT4gaGV4VG9SR0JBKCcjMDAwMDAwJywgMC4yKX07XG4gIG1heC1oZWlnaHQ6ICR7KHsgZHJvcGRvd25IZWlnaHQgfSkgPT4gZHJvcGRvd25IZWlnaHR9O1xuICBvdmVyZmxvdzogYXV0bztcbiAgXG4gIDpmb2N1cyB7XG4gICAgb3V0bGluZTogbm9uZTtcbiAgfVxufVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgRHJvcGRvd247XG4iXX0= */")),_default=Dropdown;exports.default=_default; |
@@ -1,56 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var dropdownHandle = function dropdownHandle(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return parentProps.dropdownHandleRenderer ? parentProps.dropdownHandleRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(DropdownHandleComponent, { | ||
tabIndex: "-1", | ||
onClick: function onClick() { | ||
return parentMethods.dropDown(); | ||
}, | ||
dropdownOpen: parentState.dropdown, | ||
onKeyPress: function onKeyPress() { | ||
return parentMethods.dropDown(); | ||
}, | ||
onKeyDown: function onKeyDown() { | ||
return parentMethods.dropDown(); | ||
}, | ||
className: "react-dropdown-select-dropdown-handle", | ||
color: parentProps.color | ||
}, _react.default.createElement("svg", { | ||
fill: "currentColor", | ||
preserveAspectRatio: "xMidYMid meet", | ||
viewBox: "0 0 40 40" | ||
}, _react.default.createElement("g", null, _react.default.createElement("path", { | ||
d: "m31 26.4q0 0.3-0.2 0.5l-1.1 1.2q-0.3 0.2-0.6 0.2t-0.5-0.2l-8.7-8.8-8.8 8.8q-0.2 0.2-0.5 0.2t-0.5-0.2l-1.2-1.2q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.6-0.2t0.5 0.2l10.4 10.4q0.2 0.2 0.2 0.5z" | ||
})))); | ||
}; | ||
dropdownHandle.propTypes = {}; | ||
var DropdownHandleComponent = (0, _styledBase.default)("div", { | ||
target: "e1vudypg0", | ||
label: "DropdownHandleComponent" | ||
})("text-align:center;", function (_ref2) { | ||
var dropdownOpen = _ref2.dropdownOpen; | ||
return dropdownOpen ? "\n transform: rotate(0deg);\n margin: 0px 0 -3px 5px;\n " : "\n margin: 0 0 0 5px;\n transform: rotate(180deg);\n "; | ||
}, ";cursor:pointer;svg{width:16px;height:16px;}:hover{path{stroke:", function (_ref3) { | ||
var color = _ref3.color; | ||
return color; | ||
}, ";}}:focus{outline:none;path{stroke:", function (_ref4) { | ||
var color = _ref4.color; | ||
return color; | ||
}, ";}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duSGFuZGxlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCMEMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd25IYW5kbGUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBkcm9wZG93bkhhbmRsZSA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcyB9KSA9PlxuICBwYXJlbnRQcm9wcy5kcm9wZG93bkhhbmRsZVJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmRyb3Bkb3duSGFuZGxlUmVuZGVyZXIocGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzKVxuICApIDogKFxuICAgIDxEcm9wZG93bkhhbmRsZUNvbXBvbmVudFxuICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3duKCl9XG4gICAgICBkcm9wZG93bk9wZW49e3BhcmVudFN0YXRlLmRyb3Bkb3dufVxuICAgICAgb25LZXlQcmVzcz17KCkgPT4gcGFyZW50TWV0aG9kcy5kcm9wRG93bigpfVxuICAgICAgb25LZXlEb3duPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3duKCl9XG4gICAgICBjbGFzc05hbWU9XCJyZWFjdC1kcm9wZG93bi1zZWxlY3QtZHJvcGRvd24taGFuZGxlXCJcbiAgICAgIGNvbG9yPX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IHtcbiAgICBwYXRoIHtcbiAgICAgIHN0cm9rZTogJHsoeyBjb2xvciB9KSA9PiBjb2xvcn07XG4gICAgfVxuICB9XG5cbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuXG4gICAgcGF0aCB7XG4gICAgICBzdHJva2U6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9O1xuICAgIH1cbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgZHJvcGRvd25IYW5kbGU7XG4iXX0= */")); | ||
var _default = dropdownHandle; | ||
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 DropdownHandle=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return b.dropdownHandleRenderer?b.dropdownHandleRenderer(b,c,d):_react.default.createElement(DropdownHandleComponent,{tabIndex:"-1",onClick:function a(){return d.dropDown()},dropdownOpen:c.dropdown,onKeyPress:function a(){return d.dropDown()},onKeyDown:function a(){return d.dropDown()},className:"react-dropdown-select-dropdown-handle",color:b.color},_react.default.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 40 40"},_react.default.createElement("g",null,_react.default.createElement("path",{d:"m31 26.4q0 0.3-0.2 0.5l-1.1 1.2q-0.3 0.2-0.6 0.2t-0.5-0.2l-8.7-8.8-8.8 8.8q-0.2 0.2-0.5 0.2t-0.5-0.2l-1.2-1.2q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.6-0.2t0.5 0.2l10.4 10.4q0.2 0.2 0.2 0.5z"}))))};DropdownHandle.propTypes={};var DropdownHandleComponent=(0,_styledBase.default)("div",{target:"e1vudypg0",label:"DropdownHandleComponent"})("text-align:center;",function(a){var b=a.dropdownOpen;return b?"\n transform: rotate(0deg);\n margin: 0px 0 -3px 5px;\n ":"\n margin: 0 0 0 5px;\n transform: rotate(180deg);\n "},";cursor:pointer;svg{width:16px;height:16px;}:hover{path{stroke:",function(a){var b=a.color;return b},";}}:focus{outline:none;path{stroke:",function(a){var b=a.color;return b},";}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0Ryb3Bkb3duSGFuZGxlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCMEMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvRHJvcGRvd25IYW5kbGUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBEcm9wZG93bkhhbmRsZSA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcyB9KSA9PlxuICBwYXJlbnRQcm9wcy5kcm9wZG93bkhhbmRsZVJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmRyb3Bkb3duSGFuZGxlUmVuZGVyZXIocGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzKVxuICApIDogKFxuICAgIDxEcm9wZG93bkhhbmRsZUNvbXBvbmVudFxuICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3duKCl9XG4gICAgICBkcm9wZG93bk9wZW49e3BhcmVudFN0YXRlLmRyb3Bkb3dufVxuICAgICAgb25LZXlQcmVzcz17KCkgPT4gcGFyZW50TWV0aG9kcy5kcm9wRG93bigpfVxuICAgICAgb25LZXlEb3duPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3du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wb2ludGVyO1xuXG4gIHN2ZyB7XG4gICAgd2lkdGg6IDE2cHg7XG4gICAgaGVpZ2h0OiAxNnB4O1xuICB9XG5cbiAgOmhvdmVyIHtcbiAgICBwYXRoIHtcbiAgICAgIHN0cm9rZTogJHsoeyBjb2xvciB9KSA9PiBjb2xvcn07XG4gICAgfVxuICB9XG5cbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuXG4gICAgcGF0aCB7XG4gICAgICBzdHJva2U6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9O1xuICAgIH1cbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgRHJvcGRvd25IYW5kbGU7XG4iXX0= */")),_default=DropdownHandle;exports.default=_default; |
@@ -1,45 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Input = function Input(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
var placeHolder = parentState.values && parentState.values.length > 0 && parentProps.addPlaceholder || parentProps.placeholder; | ||
return parentProps.inputRenderer ? parentProps.inputRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(InputComponent, { | ||
tabIndex: "-1", | ||
className: "react-dropdown-select-input", | ||
size: parentMethods.getInputSize(), | ||
value: parentState.search, | ||
onClick: function onClick() { | ||
return parentMethods.dropDown('open'); | ||
}, | ||
onChange: parentMethods.setSearch, | ||
placeholder: placeHolder | ||
}); | ||
}; | ||
Input.propTypes = {}; | ||
var InputComponent = (0, _styledBase.default)("input", { | ||
target: "e11wid6y0", | ||
label: "InputComponent" | ||
})(process.env.NODE_ENV === "production" ? { | ||
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0lucHV0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCbUMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvSW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBJbnB1dCA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcyB9KSA9PiB7XG4gIGNvbnN0IHBsYWNlSG9sZGVyID1cbiAgICAocGFyZW50U3RhdGUudmFsdWVzICYmIHBhcmVudFN0YXRlLnZhbHVlcy5sZW5ndGggPiAwICYmIHBhcmVudFByb3BzLmFkZFBsYWNlaG9sZGVyKSB8fFxuICAgIHBhcmVudFByb3BzLnBsYWNlaG9sZGVyO1xuXG4gIHJldHVybiBwYXJlbnRQcm9wcy5pbnB1dFJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmlucHV0UmVuZGVyZXIocGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzKVxuICApIDogKFxuICAgIDxJbnB1dENvbXBvbmVudFxuICAgICAgdGFiSW5kZXg9XCItMVwiXG4gICAgICBjbGFzc05hbWU9XCJyZWFjdC1kcm9wZG93bi1zZWxlY3QtaW5wdXRcIlxuICAgICAgc2l6ZT17cGFyZW50TWV0aG9kcy5nZXRJbnB1dFNpemUoKX1cbiAgICAgIHZhbHVlPXtwYXJlbnRTdGF0ZS5zZWFyY2h9XG4gICAgICBvbkNsaWNrPXsoKSA9PiBwYXJlbnRNZXRob2RzLmRyb3BEb3duKCdvcGVuJyl9XG4gICAgICBvbkNoYW5nZT17cGFyZW50TWV0aG9kcy5zZXRTZWFyY2h9XG4gICAgICBwbGFjZWhvbGRlcj17cGxhY2VIb2xkZXJ9XG4gICAgLz5cbiAgKTtcbn07XG5cbklucHV0LnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBJbnB1dENvbXBvbmVudCA9IHN0eWxlZC5pbnB1dGBcbiAgd2lkdGg6IGF1dG87XG4gIGJvcmRlcjogbm9uZTtcbiAgbWFyZ2luLWxlZnQ6IDVweDtcbiAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG4gIGZvbnQtc2l6ZTogc21hbGxlcjtcbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBJbnB1dDtcbiJdfQ== */" | ||
}); | ||
var _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:"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: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yZW50TWV0aG9kcy5zZXRTZWFyY2h9XG4gICAgICBwbGFjZWhvbGRlcj17cGxhY2VIb2xkZXJ9XG4gICAgLz5cbiAgKTtcbn07XG5cbklucHV0LnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBJbnB1dENvbXBvbmVudCA9IHN0eWxlZC5pbnB1dGBcbiAgd2lkdGg6IGF1dG87XG4gIGJvcmRlcjogbm9uZTtcbiAgbWFyZ2luLWxlZnQ6IDVweDtcbiAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG4gIGZvbnQtc2l6ZTogc21hbGxlcjtcbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiBub25lO1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBJbnB1dDtcbiJdfQ== */"}),_default=Input;exports.default=_default; |
@@ -1,61 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Item = function Item(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods, | ||
item = _ref.item, | ||
itemIndex = _ref.itemIndex; | ||
if (!!parentProps.itemRenderer) { | ||
return parentProps.itemRenderer(item, itemIndex, parentProps, parentState, parentMethods); | ||
} | ||
if (!parentProps.keepSelectedInList && parentMethods.isSelected(item)) { | ||
return null; | ||
} | ||
return _react.default.createElement(ItemComponent, { | ||
role: "option", | ||
"aria-selected": parentMethods.isSelected(item), | ||
"aria-disabled": item.disabled, | ||
disabled: item.disabled, | ||
"aria-label": item[parentProps.labelField], | ||
key: "".concat(item[parentProps.valueField]).concat(item[parentProps.labelField]), | ||
tabIndex: "-1", | ||
className: "react-dropdown-select-item ".concat(parentMethods.isSelected(item) ? 'react-dropdown-select-item-selected' : '', " ").concat(parentState.cursor === itemIndex ? 'react-dropdown-select-item-active' : null), | ||
onClick: item.disabled ? undefined : function () { | ||
return parentMethods.addItem(item); | ||
}, | ||
onKeyPress: item.disabled ? undefined : function () { | ||
return parentMethods.addItem(item); | ||
}, | ||
color: parentProps.color | ||
}, item[parentProps.labelField], " ", item.disabled && _react.default.createElement("ins", null, "disabled")); | ||
}; | ||
Item.propTypes = {}; | ||
var ItemComponent = (0, _styledBase.default)("span", { | ||
target: "evc32pp0", | ||
label: "ItemComponent" | ||
})("padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.react-dropdown-select-item-active{border-left:5px solid #ccc;}:hover,:focus{background:#f2f2f2;outline:none;}&.react-dropdown-select-item-selected{", function (_ref2) { | ||
var disabled = _ref2.disabled, | ||
color = _ref2.color; | ||
return disabled ? "\n background: #f2f2f2;\n color: #ccc;\n " : "\n background: ".concat(color, ";\n color: #fff;\n border-bottom: 1px solid #fff;\n "); | ||
}, "}", function (_ref3) { | ||
var disabled = _ref3.disabled; | ||
return disabled ? "\n background: #f2f2f2;\n color: #ccc;\n \n ins {\n text-decoration: none;\n border:1px solid #ccc;\n border-radius: 2px;\n padding: 0px 3px;\n font-size: x-small;\n text-transform: uppercase;\n }\n " : ''; | ||
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0l0ZW0uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0NpQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9JdGVtLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgSXRlbSA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF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iAke2NvbG9yfTtcbiAgICBjb2xvcjogI2ZmZjtcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgI2ZmZjtcbiAgICBgfVxuICB9XG5cbiAgJHsoeyBkaXNhYmxlZCB9KSA9PlxuICAgIGRpc2FibGVkXG4gICAgICA/IGBcbiAgICBiYWNrZ3JvdW5kOiAjZjJmMmYyO1xuICAgIGNvbG9yOiAjY2NjO1xuICAgIFxuICAgIGlucyB7XG4gICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG4gICAgICBib3JkZXI6MXB4IHNvbGlkICNjY2M7XG4gICAgICBib3JkZXItcmFkaXVzOiAycHg7XG4gICAgICBwYWRkaW5nOiAwcHggM3B4O1xuICAgICAgZm9udC1zaXplOiB4LXNtYWxsO1xuICAgICAgdGV4dC10cmFuc2Zvcm06IHVwcGVyY2FzZTtcbiAgICB9XG4gICAgYFxuICAgICAgOiAnJ31cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IEl0ZW07XG4iXX0= */"); | ||
var _default = Item; | ||
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")),_index=require("../index");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var Item=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods,e=a.item,f=a.itemIndex;return!b.itemRenderer?!b.keepSelectedInList&&d.isSelected(e)?null:_react.default.createElement(ItemComponent,{role:"option","aria-selected":d.isSelected(e),"aria-disabled":e.disabled,disabled:e.disabled,"aria-label":e[b.labelField],key:"".concat(e[b.valueField]).concat(e[b.labelField]),tabIndex:"-1",className:"react-dropdown-select-item ".concat(d.isSelected(e)?"react-dropdown-select-item-selected":""," ").concat(c.cursor===f?"react-dropdown-select-item-active":null),onClick:e.disabled?void 0:function(){return d.addItem(e)},onKeyPress:e.disabled?void 0:function(){return d.addItem(e)},color:b.color},e[b.labelField]," ",e.disabled&&_react.default.createElement("ins",null,"disabled")):b.itemRenderer(e,f,b,c,d)};Item.propTypes={};var ItemComponent=(0,_styledBase.default)("span",{target:"evc32pp0",label:"ItemComponent"})("padding:5px 10px;cursor:pointer;border-bottom:1px solid #fff;&.react-dropdown-select-item-active{border-bottom:1px solid #fff;font-weight:bolder;",function(a){var b=a.disabled,c=a.color;return!b&&c&&"background: ".concat((0,_index.hexToRGBA)(c,.1),";")},"}:hover,:focus{background:",function(a){var b=a.color;return b&&(0,_index.hexToRGBA)(b,.1)},";outline:none;}&.react-dropdown-select-item-selected{",function(a){var b=a.disabled,c=a.color;return b?"\n background: #f2f2f2;\n color: #ccc;\n ":"\n background: ".concat(c,";\n color: #fff;\n border-bottom: 1px solid #fff;\n ")},"}",function(a){var b=a.disabled;return b?"\n background: #f2f2f2;\n color: #ccc;\n \n ins {\n text-decoration: none;\n border:1px solid #ccc;\n border-radius: 2px;\n padding: 0px 3px;\n font-size: x-small;\n text-transform: uppercase;\n }\n ":""},"production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0l0ZW0uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUNpQyIsImZpbGUiOiIuLi8uLi9zcmMvY29tcG9uZW50cy9JdGVtLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGhleFRvUkdCQSB9IGZyb20gJy4uL2luZGV4JztcblxuY29uc3QgSXRlbSA9ICh7IHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcywgaXRlbSwgaXRlbUluZGV4IH0pID0+IHtcbiAgaWYgKCEhcGFyZW50UHJvcHMuaXRlbVJlbmRl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gICAgICAgPyBgXG4gICAgYmFja2dyb3VuZDogI2YyZjJmMjtcbiAgICBjb2xvcjogI2NjYztcbiAgICBgXG4gICAgICAgIDogYFxuICAgIGJhY2tncm91bmQ6ICR7Y29sb3J9O1xuICAgIGNvbG9yOiAjZmZmO1xuICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCAjZmZmO1xuICAgIGB9XG4gIH1cblxuICAkeyh7IGRpc2FibGVkIH0pID0+XG4gICAgZGlzYWJsZWRcbiAgICAgID8gYFxuICAgIGJhY2tncm91bmQ6ICNmMmYyZjI7XG4gICAgY29sb3I6ICNjY2M7XG4gICAgXG4gICAgaW5zIHtcbiAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbiAgICAgIGJvcmRlcjoxcHggc29saWQgI2NjYztcbiAgICAgIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgICAgIHBhZGRpbmc6IDBweCAzcHg7XG4gICAgICBmb250LXNpemU6IHgtc21hbGw7XG4gICAgICB0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuICAgIH1cbiAgICBgXG4gICAgICA6ICcnfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgSXRlbTtcbiJdfQ== */"),_default=Item;exports.default=_default; |
@@ -1,31 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Loading = function Loading(_ref) { | ||
var parentProps = _ref.parentProps; | ||
return parentProps.loadingRenderer ? parentProps.loadingRenderer() : _react.default.createElement(LoadingComponent, { | ||
className: "react-dropdown-select-loading", | ||
color: parentProps.color | ||
}); | ||
}; | ||
Loading.propTypes = {}; | ||
var LoadingComponent = (0, _styledBase.default)("div", { | ||
target: "e1l5cpc30", | ||
label: "LoadingComponent" | ||
})("@keyframes dual-ring-spin{0%{transform:rotate(0deg);}100%{transform:rotate(180deg);}}padding:0 5px;display:block;width:auto;height:auto;:after{content:' ';display:block;width:16px;height:16px;border-radius:50%;border-width:1px;border-style:solid;border-color:", function (_ref2) { | ||
var color = _ref2.color; | ||
return color; | ||
}, " transparent;animation:dual-ring-spin 0.7s ease-in-out infinite;margin:0 0 0 -10px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0xvYWRpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWW1DIiwiZmlsZSI6Ii4uLy4uL3NyYy9jb21wb25lbnRzL0xvYWRpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBMb2FkaW5nID0gKHsgcGFyZW50UHJvcHMgfSkgPT5cbiAgcGFyZW50UHJvcHMubG9hZGluZ1JlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmxvYWRpbmdSZW5kZXJlcigpXG4gICkgOiAoXG4gICAgPExvYWRpbmdDb21wb25lbnQgY2xhc3NOYW1lPVwicmVhY3QtZHJvcGRvd24tc2VsZWN0LWxvYWRpbmdcIiBjb2xvcj17cGFyZW50UHJvcHMuY29sb3J9Lz5cbiAgKTtcblxuTG9hZGluZy5wcm9wVHlwZXMgPSB7fTtcblxuY29uc3QgTG9hZGluZ0NvbXBvbmVudCA9IHN0eWxlZC5kaXZgXG4gIEBrZXlmcmFtZXMgZHVhbC1yaW5nLXNwaW4ge1xuICAgIDAlIHtcbiAgICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xuICAgIH1cbiAgICAxMDAlIHtcbiAgICAgIHRyYW5zZm9ybTogcm90YXRlKDE4MGRlZyk7XG4gICAgfVxuICB9XG5cbiAgcGFkZGluZzogMCA1cHg7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICB3aWR0aDogYXV0bztcbiAgaGVpZ2h0OiBhdXRvO1xuXG4gIDphZnRlciB7XG4gICAgY29udGVudDogJyAnO1xuICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgIHdpZHRoOiAxNnB4O1xuICAgIGhlaWdodDogMTZweDtcbiAgICBib3JkZXItcmFkaXVzOiA1MCU7XG4gICAgYm9yZGVyLXdpZHRoOiAxcHg7XG4gICAgYm9yZGVyLXN0eWxlOiBzb2xpZDtcbiAgICBib3JkZXItY29sb3I6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9IHRyYW5zcGFyZW50O1xuICAgIGFuaW1hdGlvbjogZHVhbC1yaW5nLXNwaW4gMC43cyBlYXNlLWluLW91dCBpbmZpbml0ZTtcbiAgICBtYXJnaW46IDAgMCAwIC0xMHB4O1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBMb2FkaW5nO1xuIl19 */")); | ||
var _default = Loading; | ||
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 Loading=function(a){var b=a.parentProps;return b.loadingRenderer?b.loadingRenderer():_react.default.createElement(LoadingComponent,{className:"react-dropdown-select-loading",color:b.color})};Loading.propTypes={};var LoadingComponent=(0,_styledBase.default)("div",{target:"e1l5cpc30",label:"LoadingComponent"})("@keyframes dual-ring-spin{0%{transform:rotate(0deg);}100%{transform:rotate(180deg);}}padding:0 5px;display:block;width:auto;height:auto;:after{content:' ';display:block;width:16px;height:16px;border-radius:50%;border-width:1px;border-style:solid;border-color:",function(a){var b=a.color;return b}," transparent;animation:dual-ring-spin 0.7s ease-in-out infinite;margin:0 0 0 -10px;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0xvYWRpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWW1DIiwiZmlsZSI6Ii4uLy4uL3NyYy9jb21wb25lbnRzL0xvYWRpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG5jb25zdCBMb2FkaW5nID0gKHsgcGFyZW50UHJvcHMgfSkgPT5cbiAgcGFyZW50UHJvcHMubG9hZGluZ1JlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLmxvYWRpbmdSZW5kZXJlcigpXG4gICkgOiAoXG4gICAgPExvYWRpbmdDb21wb25lbnQgY2xhc3NOYW1lPVwicmVhY3QtZHJvcGRvd24tc2VsZWN0LWxvYWRpbmdcIiBjb2xvcj17cGFyZW50UHJvcHMuY29sb3J9Lz5cbiAgKTtcblxuTG9hZGluZy5wcm9wVHlwZXMgPSB7fTtcblxuY29uc3QgTG9hZGluZ0NvbXBvbmVudCA9IHN0eWxlZC5kaXZgXG4gIEBrZXlmcmFtZXMgZHVhbC1yaW5nLXNwaW4ge1xuICAgIDAlIHtcbiAgICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xuICAgIH1cbiAgICAxMDAlIHtcbiAgICAgIHRyYW5zZm9ybTogcm90YXRlKDE4MGRlZyk7XG4gICAgfVxuICB9XG5cbiAgcGFkZGluZzogMCA1cHg7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICB3aWR0aDogYXV0bztcbiAgaGVpZ2h0OiBhdXRvO1xuXG4gIDphZnRlciB7XG4gICAgY29udGVudDogJyAnO1xuICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgIHdpZHRoOiAxNnB4O1xuICAgIGhlaWdodDogMTZweDtcbiAgICBib3JkZXItcmFkaXVzOiA1MCU7XG4gICAgYm9yZGVyLXdpZHRoOiAxcHg7XG4gICAgYm9yZGVyLXN0eWxlOiBzb2xpZDtcbiAgICBib3JkZXItY29sb3I6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9IHRyYW5zcGFyZW50O1xuICAgIGFuaW1hdGlvbjogZHVhbC1yaW5nLXNwaW4gMC43cyBlYXNlLWluLW91dCBpbmZpbml0ZTtcbiAgICBtYXJnaW46IDAgMCAwIC0xMHB4O1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBMb2FkaW5nO1xuIl19 */")),_default=Loading;exports.default=_default; |
@@ -1,32 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var NoData = function NoData(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return parentProps.noDataRenderer ? parentProps.noDataRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(NoDataComponent, { | ||
color: parentProps.color | ||
}, parentProps.noDataLabel); | ||
}; | ||
NoData.propTypes = {}; | ||
var NoDataComponent = (0, _styledBase.default)("div", { | ||
target: "e1l5ho1t0", | ||
label: "NoDataComponent" | ||
})("padding:10px;text-align:center;color:", function (_ref2) { | ||
var color = _ref2.color; | ||
return color; | ||
}, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL05vRGF0YS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFja0MiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvTm9EYXRhLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgTm9EYXRhID0gKHsgcGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzIH0pID0+XG4gIHBhcmVudFByb3BzLm5vRGF0YVJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLm5vRGF0YVJlbmRlcmVyKHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcylcbiAgKSA6IChcbiAgICA8Tm9EYXRhQ29tcG9uZW50IGNvbG9yPXtwYXJlbnRQcm9wcy5jb2xvcn0+XG4gICAgICB7IHBhcmVudFByb3BzLm5vRGF0YUxhYmVsIH1cbiAgICA8L05vRGF0YUNvbXBvbmVudD5cbiAgKTtcblxuTm9EYXRhLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBOb0RhdGFDb21wb25lbnQgPSBzdHlsZWQuZGl2YFxuICBwYWRkaW5nOiAxMHB4O1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGNvbG9yOiAkeyh7IGNvbG9yIH0pID0+IGNvbG9yfTtcbmA7XG5cbmV4cG9ydCBkZWZhdWx0IE5vRGF0YTtcbiJdfQ== */")); | ||
var _default = NoData; | ||
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 NoData=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return b.noDataRenderer?b.noDataRenderer(b,c,d):_react.default.createElement(NoDataComponent,{color:b.color},b.noDataLabel)};NoData.propTypes={};var NoDataComponent=(0,_styledBase.default)("div",{target:"e1l5ho1t0",label:"NoDataComponent"})("padding:10px;text-align:center;color:",function(a){var b=a.color;return b},";"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL05vRGF0YS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFja0MiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvTm9EYXRhLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgTm9EYXRhID0gKHsgcGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzIH0pID0+XG4gIHBhcmVudFByb3BzLm5vRGF0YVJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLm5vRGF0YVJlbmRlcmVyKHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcylcbiAgKSA6IChcbiAgICA8Tm9EYXRhQ29tcG9uZW50IGNvbG9yPXtwYXJlbnRQcm9wcy5jb2xvcn0+XG4gICAgICB7IHBhcmVudFByb3BzLm5vRGF0YUxhYmVsIH1cbiAgICA8L05vRGF0YUNvbXBvbmVudD5cbiAgKTtcblxuTm9EYXRhLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBOb0RhdGFDb21wb25lbnQgPSBzdHlsZWQuZGl2YFxuICBwYWRkaW5nOiAxMHB4O1xuICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gIGNvbG9yOiAkeyh7IGNvbG9yIH0pID0+IGNvbG9yfTtcbmA7XG5cbmV4cG9ydCBkZWZhdWx0IE5vRGF0YTtcbiJdfQ== */")),_default=NoData;exports.default=_default; |
@@ -1,43 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Option = function Option(_ref) { | ||
var parentItem = _ref.parentItem, | ||
parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return parentItem && parentProps.optionRenderer ? parentProps.optionRenderer(parentItem, parentProps, parentState, parentMethods) : _react.default.createElement(OptionComponent, { | ||
role: "listitem", | ||
disabled: parentProps.disabled, | ||
className: "react-dropdown-select-option", | ||
color: parentProps.color | ||
}, _react.default.createElement("span", { | ||
className: "react-dropdown-select-option-label" | ||
}, parentItem[parentProps.labelField]), _react.default.createElement("span", { | ||
className: "react-dropdown-select-option-remove", | ||
onClick: function onClick(event) { | ||
return parentMethods.removeItem(event, parentItem, parentProps.closeOnSelect); | ||
} | ||
}, "\xD7")); | ||
}; | ||
Option.propTypes = {}; | ||
var OptionComponent = (0, _styledBase.default)("span", { | ||
target: "e1l4eby50", | ||
label: "OptionComponent" | ||
})("padding:0 5px;border-radius:2px;line-height:21px;margin:3px 0 3px 5px;background:", function (_ref2) { | ||
var color = _ref2.color; | ||
return color; | ||
}, ";color:#fff;display:inline-block;.react-dropdown-select-option-remove{cursor:pointer;width:22px;height:22px;display:inline-block;text-align:center;margin:0 -5px 0 0px;border-radius:0 3px 3px 0;:hover{color:tomato;}}:hover,:hover > span{opacity:0.9;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL09wdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Qm1DIiwiZmlsZSI6Ii4uLy4uL3Ny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3B0aW9uQ29tcG9uZW50PlxuICApO1xuXG5PcHRpb24ucHJvcFR5cGVzID0ge307XG5cbmNvbnN0IE9wdGlvbkNvbXBvbmVudCA9IHN0eWxlZC5zcGFuYFxuICBwYWRkaW5nOiAwIDVweDtcbiAgYm9yZGVyLXJhZGl1czogMnB4O1xuICBsaW5lLWhlaWdodDogMjFweDtcbiAgbWFyZ2luOiAzcHggMCAzcHggNXB4O1xuICBiYWNrZ3JvdW5kOiAkeyh7IGNvbG9yIH0pID0+IGNvbG9yfTtcbiAgY29sb3I6ICNmZmY7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcblxuICAucmVhY3QtZHJvcGRvd24tc2VsZWN0LW9wdGlvbi1yZW1vdmUge1xuICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICB3aWR0aDogMjJweDtcbiAgICBoZWlnaHQ6IDIycHg7XG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgICBtYXJnaW46IDAgLTVweCAwIDBweDtcbiAgICBib3JkZXItcmFkaXVzOiAwIDNweCAzcHggMDtcblxuICAgIDpob3ZlciB7XG4gICAgICBjb2xvcjogdG9tYXRvO1xuICAgIH1cbiAgfVxuXG4gIDpob3ZlcixcbiAgOmhvdmVyID4gc3BhbiB7XG4gICAgb3BhY2l0eTogMC45O1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBPcHRpb247XG4iXX0= */")); | ||
var _default = Option; | ||
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 Option=function(a){var b=a.parentItem,c=a.parentProps,d=a.parentState,e=a.parentMethods;return b&&c.optionRenderer?c.optionRenderer(b,c,d,e):_react.default.createElement(OptionComponent,{role:"listitem",disabled:c.disabled,className:"react-dropdown-select-option",color:c.color},_react.default.createElement("span",{className:"react-dropdown-select-option-label"},b[c.labelField]),_react.default.createElement("span",{className:"react-dropdown-select-option-remove",onClick:function d(a){return e.removeItem(a,b,c.closeOnSelect)}},"\xD7"))};Option.propTypes={};var OptionComponent=(0,_styledBase.default)("span",{target:"e1l4eby50",label:"OptionComponent"})("padding:0 5px;border-radius:2px;line-height:21px;margin:3px 0 3px 5px;background:",function(a){var b=a.color;return b},";color:#fff;display:inline-block;.react-dropdown-select-option-remove{cursor:pointer;width:22px;height:22px;display:inline-block;text-align:center;margin:0 -5px 0 0px;border-radius:0 3px 3px 0;:hover{color:tomato;}}:hover,:hover > span{opacity:0.9;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL09wdGlvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Qm1DIiwiZmlsZSI6Ii4uLy4uL3NyYy9jb21wb25lbnRzL09wdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmNvbnN0IE9wdGlvbiA9ICh7IHBhcmVudEl0ZW0sIHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcyB9KSA9PlxuICBwYXJlbnRJdGVtICYmIHBhcmVudFByb3BzLm9wdGlvblJlbmRlcmVyID8gKFxuICAgIHBhcmVudFByb3BzLm9wdGlvblJlbmRlcmVyKHBhcmVudEl0ZW0sIHBhcmVudFByb3BzLCBwYXJlbnRTdGF0ZSwgcGFyZW50TWV0aG9kcylcbiAgKSA6IChcbiAgICA8T3B0aW9uQ29tcG9uZW50XG4gICAgICByb2xlPVwibGlzdGl0ZW1cIlxuICAgICAgZGlzYWJs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gIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgICBtYXJnaW46IDAgLTVweCAwIDBweDtcbiAgICBib3JkZXItcmFkaXVzOiAwIDNweCAzcHggMDtcblxuICAgIDpob3ZlciB7XG4gICAgICBjb2xvcjogdG9tYXRvO1xuICAgIH1cbiAgfVxuXG4gIDpob3ZlcixcbiAgOmhvdmVyID4gc3BhbiB7XG4gICAgb3BhY2l0eTogMC45O1xuICB9XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBPcHRpb247XG4iXX0= */")),_default=Option;exports.default=_default; |
@@ -1,36 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Separator = function Separator(_ref) { | ||
var parentProps = _ref.parentProps, | ||
parentState = _ref.parentState, | ||
parentMethods = _ref.parentMethods; | ||
return parentProps.separatorRenderer ? parentProps.separatorRenderer(parentProps, parentState, parentMethods) : _react.default.createElement(SeparatorComponent, { | ||
className: "react-dropdown-select-separator" | ||
}); | ||
}; | ||
Separator.propTypes = {}; | ||
var SeparatorComponent = (0, _styledBase.default)("div", { | ||
target: "e19h5j1v0", | ||
label: "SeparatorComponent" | ||
})(process.env.NODE_ENV === "production" ? { | ||
name: "gjy0ue", | ||
styles: "border-left:1px solid #ccc;width:1px;height:25px;display:block;" | ||
} : { | ||
name: "gjy0ue", | ||
styles: "border-left:1px solid #ccc;width:1px;height:25px;display:block;", | ||
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL1NlcGFyYXRvci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXcUMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvU2VwYXJhdG9yLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgU2VwYXJhdG9yID0gKHsgcGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzIH0pID0+IHBhcmVudFByb3BzLnNlcGFyYXRvclJlbmRlcmVyID8gKFxuICBwYXJlbnRQcm9wcy5zZXBhcmF0b3JSZW5kZXJlcihwYXJlbnRQcm9wcywgcGFyZW50U3RhdGUsIHBhcmVudE1ldGhvZHMpXG4pIDogKFxuICA8U2VwYXJhdG9yQ29tcG9uZW50IGNsYXNzTmFtZT1cInJlYWN0LWRyb3Bkb3duLXNlbGVjdC1zZXBhcmF0b3JcIiAvPlxuKTtcblxuU2VwYXJhdG9yLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBTZXBhcmF0b3JDb21wb25lbnQgPSBzdHlsZWQuZGl2YFxuICBib3JkZXItbGVmdDogMXB4IHNvbGlkICNjY2M7XG4gIHdpZHRoOiAxcHg7XG4gIGhlaWdodDogMjVweDtcbiAgZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBTZXBhcmF0b3I7XG4iXX0= */" | ||
}); | ||
var _default = Separator; | ||
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 Separator=function(a){var b=a.parentProps,c=a.parentState,d=a.parentMethods;return b.separatorRenderer?b.separatorRenderer(b,c,d):_react.default.createElement(SeparatorComponent,{className:"react-dropdown-select-separator"})};Separator.propTypes={};var SeparatorComponent=(0,_styledBase.default)("div",{target:"e19h5j1v0",label:"SeparatorComponent"})("production"===process.env.NODE_ENV?{name:"gjy0ue",styles:"border-left:1px solid #ccc;width:1px;height:25px;display:block;"}:{name:"gjy0ue",styles:"border-left:1px solid #ccc;width:1px;height:25px;display:block;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL1NlcGFyYXRvci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXcUMiLCJmaWxlIjoiLi4vLi4vc3JjL2NvbXBvbmVudHMvU2VwYXJhdG9yLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuY29uc3QgU2VwYXJhdG9yID0gKHsgcGFyZW50UHJvcHMsIHBhcmVudFN0YXRlLCBwYXJlbnRNZXRob2RzIH0pID0+IHBhcmVudFByb3BzLnNlcGFyYXRvclJlbmRlcmVyID8gKFxuICBwYXJlbnRQcm9wcy5zZXBhcmF0b3JSZW5kZXJlcihwYXJlbnRQcm9wcywgcGFyZW50U3RhdGUsIHBhcmVudE1ldGhvZHMpXG4pIDogKFxuICA8U2VwYXJhdG9yQ29tcG9uZW50IGNsYXNzTmFtZT1cInJlYWN0LWRyb3Bkb3duLXNlbGVjdC1zZXBhcmF0b3JcIiAvPlxuKTtcblxuU2VwYXJhdG9yLnByb3BUeXBlcyA9IHt9O1xuXG5jb25zdCBTZXBhcmF0b3JDb21wb25lbnQgPSBzdHlsZWQuZGl2YFxuICBib3JkZXItbGVmdDogMXB4IHNvbGlkICNjY2M7XG4gIHdpZHRoOiAxcHg7XG4gIGhlaWdodDogMjVweDtcbiAgZGlzcGxheTogYmxvY2s7XG5gO1xuXG5leHBvcnQgZGVmYXVsdCBTZXBhcmF0b3I7XG4iXX0= */"}),_default=Separator;exports.default=_default; |
@@ -1,503 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = exports.Select = void 0; | ||
var _styledBase = _interopRequireDefault(require("@emotion/styled-base")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _reactOnclickout = _interopRequireDefault(require("react-onclickout")); | ||
var _Content = _interopRequireDefault(require("./components/Content")); | ||
var _Dropdown = _interopRequireDefault(require("./components/Dropdown")); | ||
var _Loading = _interopRequireDefault(require("./components/Loading")); | ||
var _Clear = _interopRequireDefault(require("./components/Clear")); | ||
var _Separator = _interopRequireDefault(require("./components/Separator")); | ||
var _DropdownHandle = _interopRequireDefault(require("./components/DropdownHandle")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var debounce = function debounce(fn) { | ||
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; | ||
var timerId; | ||
return function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
if (timerId) { | ||
clearTimeout(timerId); | ||
} | ||
timerId = setTimeout(function () { | ||
fn.apply(void 0, args); | ||
timerId = null; | ||
}, delay); | ||
}; | ||
}; | ||
var Select = | ||
/*#__PURE__*/ | ||
function (_React$Component) { | ||
_inherits(Select, _React$Component); | ||
function Select(props) { | ||
var _this; | ||
_classCallCheck(this, Select); | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(Select).call(this, props)); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onDropdownClose", function () { | ||
_this.setState({ | ||
cursor: 0 | ||
}); | ||
_this.props.onDropdownClose(); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "onScroll", function () { | ||
if (_this.props.closeOnScroll) { | ||
_this.dropDown('close'); | ||
} | ||
_this.updateSelectBounds(); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "updateSelectBounds", function () { | ||
return _this.select.current && _this.setState({ | ||
selectBounds: _this.select.current.getBoundingClientRect() | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getSelectBounds", function () { | ||
return _this.state.selectBounds; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "dropDown", function () { | ||
var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'toggle'; | ||
if (_this.props.keepOpen) { | ||
return _this.setState({ | ||
dropdown: true | ||
}); | ||
} | ||
if (action === 'close') { | ||
_this.select.current.blur(); | ||
return _this.setState({ | ||
dropdown: false, | ||
search: '' | ||
}); | ||
} | ||
if (action === 'open') { | ||
return _this.setState({ | ||
dropdown: true | ||
}); | ||
} | ||
if (action === 'toggle') { | ||
_this.select.current.focus(); | ||
return _this.setState({ | ||
dropdown: !_this.state.dropdown | ||
}); | ||
} | ||
return false; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getSelectRef", function () { | ||
return _this.select.current; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "addItem", function (item) { | ||
if (_this.props.multi) { | ||
if (_this.state.values.indexOf(item) !== -1) { | ||
return _this.removeItem(null, item, false); | ||
} | ||
_this.setState({ | ||
values: [].concat(_toConsumableArray(_this.state.values), [item]) | ||
}); | ||
} else { | ||
_this.setState({ | ||
values: [item], | ||
dropdown: false, | ||
search: '' | ||
}); | ||
} | ||
return true; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "removeItem", function (event, item) { | ||
var close = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; | ||
if (event && close) { | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
_this.dropDown('close'); | ||
} | ||
_this.setState({ | ||
values: _this.state.values.filter(function (values) { | ||
return values[_this.props.valueField] !== item[_this.props.valueField]; | ||
}) | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "setSearch", function (event) { | ||
_this.setState({ | ||
cursor: null | ||
}); | ||
_this.setState({ | ||
search: event.target.value | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "getInputSize", function () { | ||
if (_this.state.search) { | ||
return _this.state.search.length; | ||
} | ||
if (_this.state.values.length > 0) { | ||
return _this.props.addPlaceholder.length; | ||
} | ||
return _this.props.placeholder.length; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "toggleSelectAll", function () { | ||
return _this.setState({ | ||
values: _this.state.values.length === 0 ? _this.selectAll() : _this.clearAll() | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "clearAll", function () { | ||
_this.props.onClearAll(); | ||
_this.setState({ | ||
values: [] | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "selectAll", function () { | ||
_this.props.onSelectAll(); | ||
return _this.setState({ | ||
values: _this.props.options.filter(function (option) { | ||
return !option.disabled; | ||
}) | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "isSelected", function (option) { | ||
return _this.state.values.indexOf(option) !== -1; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "areAllSelected", function () { | ||
return _this.state.values.length === _this.props.options.filter(function (option) { | ||
return !option.disabled; | ||
}).length; | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "searchResults", function () { | ||
var regexp = new RegExp(_this.state.search, 'i'); | ||
return _this.props.options.filter(function (item) { | ||
return regexp.test(item[_this.props.searchBy] || item[[_this.props.labelField]]); | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "activeCursorItem", function (activeCursorItem) { | ||
return _this.setState({ | ||
activeCursorItem: activeCursorItem | ||
}); | ||
}); | ||
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleKeyDown", function (event) { | ||
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { | ||
event.preventDefault(); | ||
} | ||
var cursor = _this.state.cursor; | ||
if (event.key === 'Escape') { | ||
_this.dropDown('close'); | ||
} | ||
if (event.key === 'Enter') { | ||
var currentItem = _this.searchResults()[cursor]; | ||
if (currentItem && !currentItem.disabled) { | ||
_this.addItem(currentItem); | ||
} | ||
} | ||
if (event.key === 'ArrowUp' && cursor >= 0) { | ||
_this.setState(function (prevState) { | ||
return { | ||
cursor: prevState.cursor - 1 | ||
}; | ||
}); | ||
} | ||
if (event.key === 'ArrowDown') { | ||
_this.setState(function (prevState) { | ||
return { | ||
cursor: prevState.cursor + 1 | ||
}; | ||
}); | ||
} | ||
}); | ||
_this.state = { | ||
dropdown: false, | ||
values: props.values, | ||
search: '', | ||
selectBounds: {}, | ||
cursor: 0 | ||
}; | ||
_this.methods = { | ||
removeItem: _this.removeItem, | ||
dropDown: _this.dropDown, | ||
addItem: _this.addItem, | ||
setSearch: _this.setSearch, | ||
getInputSize: _this.getInputSize, | ||
toggleSelectAll: _this.toggleSelectAll, | ||
clearAll: _this.clearAll, | ||
selectAll: _this.selectAll, | ||
searchResults: _this.searchResults, | ||
getSelectRef: _this.getSelectRef, | ||
isSelected: _this.isSelected, | ||
getSelectBounds: _this.getSelectBounds, | ||
areAllSelected: _this.areAllSelected, | ||
handleKeyDown: _this.handleKeyDown, | ||
activeCursorItem: _this.activeCursorItem | ||
}; | ||
_this.select = _react.default.createRef(); | ||
return _this; | ||
} | ||
_createClass(Select, [{ | ||
key: "componentDidMount", | ||
value: function componentDidMount() { | ||
window.addEventListener('resize', debounce(this.updateSelectBounds)); | ||
window.addEventListener('scroll', debounce(this.onScroll)); | ||
this.props.onChange(this.state.values); | ||
this.dropDown('close'); | ||
if (this.select) { | ||
this.updateSelectBounds(); | ||
} | ||
} | ||
}, { | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate(prevProps, prevState) { | ||
if (prevState.values !== this.state.values) { | ||
this.props.onChange(this.state.values); | ||
this.updateSelectBounds(); | ||
} | ||
if (prevState.values !== this.state.values && this.props.closeOnSelect) { | ||
this.dropDown('close'); | ||
} | ||
if (prevProps.multi !== this.props.multi) { | ||
this.updateSelectBounds(); | ||
} | ||
if (prevState.dropdown && prevState.dropdown !== this.state.dropdown) { | ||
this.onDropdownClose(); | ||
} | ||
if (!prevState.dropdown && prevState.dropdown !== this.state.dropdown) { | ||
this.props.onDropdownOpen(); | ||
} | ||
} | ||
}, { | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
window.removeEventListener('resize', debounce(this.updateSelectBounds, this.props.debounceDelay)); | ||
window.removeEventListener('scroll', debounce(this.onScroll, this.props.debounceDelay)); | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
var _this2 = this; | ||
return _react.default.createElement(_reactOnclickout.default, { | ||
onClickOut: function onClickOut() { | ||
return _this2.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 onCLick() { | ||
return _this2.select.current.focus(); | ||
}, | ||
parentProps: this.props, | ||
parentState: this.state, | ||
parentMethods: this.methods | ||
}), this.state.dropdown && _react.default.createElement(_Dropdown.default, { | ||
parentProps: this.props, | ||
parentState: this.state, | ||
parentMethods: this.methods | ||
}))); | ||
} | ||
}]); | ||
return Select; | ||
}(_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: false, | ||
disabled: false, | ||
searchBy: 'label', | ||
clearable: true, | ||
dropdownHandle: true, | ||
separator: true, | ||
keepOpen: undefined, | ||
noDataLabel: 'No data', | ||
dropdownGap: 5, | ||
closeOnScroll: false, | ||
debounceDelay: 0, | ||
labelField: 'label', | ||
valueField: 'value', | ||
color: '#0074D9', | ||
keepSelectedInList: true, | ||
closeOnSelect: false, | ||
openOnTop: false, | ||
dropdownHeight: '300px', | ||
autoFocus: true, | ||
onDropdownOpen: function onDropdownOpen() { | ||
return undefined; | ||
}, | ||
onDropdownClose: function onDropdownClose() { | ||
return undefined; | ||
}, | ||
onClearAll: function onClearAll() { | ||
return undefined; | ||
}, | ||
onSelectAll: function onSelectAll() { | ||
return undefined; | ||
} | ||
}; | ||
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 (_ref) { | ||
var disabled = _ref.disabled; | ||
return disabled ? 'cursor: not-allowed;pointer-events: none;opacity: 0.3;' : 'pointer-events: all;'; | ||
}, ":hover,:focus-within{border-color:", function (_ref2) { | ||
var color = _ref2.color; | ||
return color; | ||
}, ";}:focus{outline:0;box-shadow:0 0 0 3px ", function (_ref3) { | ||
var color = _ref3.color; | ||
return color; | ||
}, "3c;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvWXNDIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuaW1wb3J0IHN0eWxlZCBmcm9t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lbnQgcGFyZW50UHJvcHM9e3RoaXMucHJvcHN9IHBhcmVudFN0YXRlPXt0aGlzLnN0YXRlfSBwYXJlbnRNZXRob2RzPXt0aGlzLm1ldGhvZHN9IC8+XG5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5sb2FkaW5nICYmIDxMb2FkaW5nIHBhcmVudFByb3BzPXt0aGlzLnByb3BzfSAvPn1cblxuICAgICAgICAgIHt0aGlzLnByb3BzLmNsZWFyYWJsZSAmJiAoXG4gICAgICAgICAgICA8Q2xlYXIgcGFyZW50UHJvcHM9e3RoaXMucHJvcHN9IHBhcmVudFN0YXRlPXt0aGlzLnN0YXRlfSBwYXJlbnRNZXRob2RzPXt0aGlzLm1ldGhvZHN9IC8+XG4gICAgICAgICAgKX1cblxuICAgICAgICAgIHt0aGlzLnByb3BzLnNlcGFyYXRvciAmJiAoXG4gICAgICAgICAgICA8U2VwYXJhdG9yXG4gICAgICAgICAgICAgIHBhcmVudFByb3BzPXt0aGlzLnByb3BzfVxuICAgICAgICAgICAgICBwYXJlbnRTdGF0ZT17dGhpcy5zdGF0ZX1cbiAgICAgICAgICAgICAgcGFyZW50TWV0aG9kcz17dGhpcy5tZXRob2RzfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICApfVxuXG4gICAgICAgICAge3RoaXMucHJvcHMuZHJvcGRvd25IYW5kbGUgJiYgKFxuICAgICAgICAgICAgPERyb3Bkb3duSGFuZGxlXG4gICAgICAgICAgICAgIG9uQ0xpY2s9eygpID0+IHRoaXMuc2VsZWN0LmN1cnJlbnQuZm9jdXMoKX1cbiAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3RoaXMucHJvcHN9XG4gICAgICAgICAgICAgIHBhcmVudFN0YXRlPXt0aGlzLnN0YXRlfVxuICAgICAgICAgICAgICBwYXJlbnRNZXRob2RzPXt0aGlzLm1ldGhvZHN9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICl9XG5cbiAgICAgICAgICB7dGhpcy5zdGF0ZS5k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gb25Ecm9wZG93bk9wZW46ICgpID0+IHVuZGVmaW5lZCxcbiAgb25Ecm9wZG93bkNsb3NlOiAoKSA9PiB1bmRlZmluZWQsXG4gIG9uQ2xlYXJBbGw6ICgpID0+IHVuZGVmaW5lZCxcbiAgb25TZWxlY3RBbGw6ICgpID0+IHVuZGVmaW5lZFxufTtcblxuY29uc3QgUmVhY3REcm9wZG93blNlbGVjdCA9IHN0eWxlZC5kaXZgXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgZGlzcGxheTogZmxleDtcbiAgYm9yZGVyOiAxcHggc29saWQgI2NjYztcbiAgd2lkdGg6IDEwMCU7XG4gIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgcGFkZGluZzogMnB4IDVweDtcbiAgZmxleC1kaXJlY3Rpb246IHJvdztcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgbWluLWhlaWdodDogMzZweDtcbiAgJHsoeyBkaXNhYmxlZCB9KSA9PlxuICAgIGRpc2FibGVkID8gJ2N1cnNvcjogbm90LWFsbG93ZWQ7cG9pbnRlci1ldmVudHM6IG5vbmU7b3BhY2l0eTogMC4zOycgOiAncG9pbnRlci1ldmVudHM6IGFsbDsnfVxuXG4gIDpob3ZlciwgXG4gIDpmb2N1cy13aXRoaW4ge1xuICAgIGJvcmRlci1jb2xvcjogJHsoeyBjb2xvciB9KSA9PiBjb2xvcn07XG4gIH1cblxuICA6Zm9jdXMge1xuICAgIG91dGxpbmU6IDA7XG4gICAgYm94LXNoYWRvdzogMCAwIDAgM3B4ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9M2M7XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IFNlbGVjdDtcbiJdfQ== */")); | ||
var _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=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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3WnNDIiwiZmlsZSI6Ii4uL3NyYy9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUmVhY3RET00gZnJvbSAncmVhY3QtZG9tJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc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H1cbiAgICAgICAgICBjbGFzc05hbWU9e3RoaXMucHJvcHMuY2xhc3NOYW1lfVxuICAgICAgICAgIGNvbG9yPXt0aGlzLnByb3BzLmNvbG9yfT5cbiAgICAgICAgICA8Q29udGVudCBwYXJlbnRQcm9wcz17dGhpcy5wcm9wc30gcGFyZW50U3RhdGU9e3RoaXMuc3RhdGV9IHBhcmVudE1ldGhvZHM9e3RoaXMubWV0aG9kc30gLz5cblxuICAgICAgICAgIHt0aGlzLnByb3BzLmxvYWRpbmcgJiYgPExvYWRpbmcgcGFyZW50UHJvcHM9e3RoaXMucHJvcHN9IC8+fVxuXG4gICAgICAgICAge3RoaXMucHJvcHMuY2xlYXJhYmxlICYmIChcbiAgICAgICAgICAgIDxDbGVhciBwYXJlbnRQcm9wcz17dGhpcy5wcm9wc30gcGFyZW50U3RhdGU9e3RoaXMuc3RhdGV9IHBhcmVudE1ldGhvZHM9e3RoaXMubWV0aG9kc30gLz5cbiAgICAgICAgICApfVxuXG4gICAgICAgICAge3RoaXMucHJvcHMuc2VwYXJhdG9yICYmIChcbiAgICAgICAgICAgIDxTZXBhcmF0b3JcbiAgICAgICAgICAgICAgcGFyZW50UHJvcHM9e3RoaXMucHJvcHN9XG4gICAgICAgICAgICAgIHBhcmVudFN0YXRlPXt0aGlzLnN0YXRlfVxuICAgICAgICAgICAgICBwYXJlbnRNZXRob2RzPXt0aGlzLm1ldGhvZHN9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICl9XG5cbiAgICAgICAgICB7dGhpcy5wcm9wcy5kcm9wZG93bkhhbmRsZSAmJiAoXG4gICAgICAgICAgICA8RHJvcGRvd25IYW5kbGVcbiAgICAgICAgICAgICAgb25DTGljaz17KCkgPT4gdGhpcy5zZWxlY3QuY3VycmVudC5mb2N1cygpfVxuICAgICAgICAgICAgICBwYXJlbnRQcm9wcz17dGhpcy5wcm9wc31cbiAgICAgICAgICAgICAgcGFyZW50U3RhdGU9e3RoaXMuc3RhdGV9XG4gICAgICAgICA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CkgPT4gdW5kZWZpbmVkLFxuICBvbkNsZWFyQWxsOiAoKSA9PiB1bmRlZmluZWQsXG4gIG9uU2VsZWN0QWxsOiAoKSA9PiB1bmRlZmluZWRcbn07XG5cbmNvbnN0IFJlYWN0RHJvcGRvd25TZWxlY3QgPSBzdHlsZWQuZGl2YFxuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIGJvcmRlcjogMXB4IHNvbGlkICNjY2M7XG4gIHdpZHRoOiAxMDAlO1xuICBib3JkZXItcmFkaXVzOiAycHg7XG4gIHBhZGRpbmc6IDJweCA1cHg7XG4gIGZsZXgtZGlyZWN0aW9uOiByb3c7XG4gIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gIG1pbi1oZWlnaHQ6IDM2cHg7XG4gICR7KHsgZGlzYWJsZWQgfSkgPT5cbiAgICBkaXNhYmxlZCA/ICdjdXJzb3I6IG5vdC1hbGxvd2VkO3BvaW50ZXItZXZlbnRzOiBub25lO29wYWNpdHk6IDAuMzsnIDogJ3BvaW50ZXItZXZlbnRzOiBhbGw7J31cblxuICA6aG92ZXIsIFxuICA6Zm9jdXMtd2l0aGluIHtcbiAgICBib3JkZXItY29sb3I6ICR7KHsgY29sb3IgfSkgPT4gY29sb3J9O1xuICB9XG5cbiAgOmZvY3VzIHtcbiAgICBvdXRsaW5lOiAwO1xuICAgIGJveC1zaGFkb3c6IDAgMCAwIDNweCAkeyh7IGNvbG9yIH0pID0+IGhleFRvUkdCQShjb2xvciwgMC4yKX07XG4gIH1cbmA7XG5cbmV4cG9ydCBkZWZhdWx0IFNlbGVjdDtcbiJdfQ== */")),_default=Select;exports.default=_default; |
{ | ||
"name": "react-dropdown-select", | ||
"version": "1.3.4", | ||
"version": "1.4.0", | ||
"description": "Customizable dropdown select for react", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "jest", | ||
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls", | ||
"start": "webpack-dev-server --mode development", | ||
@@ -34,3 +35,3 @@ "transpile": "BABEL_ENV=production rm -rf ./dist && babel src -d dist", | ||
"@babel/cli": "^7.0.0", | ||
"@babel/core": "^7.0.0", | ||
"@babel/core": "^7.2.2", | ||
"@babel/plugin-proposal-class-properties": "^7.0.0", | ||
@@ -41,8 +42,13 @@ "@babel/plugin-proposal-object-rest-spread": "^7.0.0", | ||
"@babel/preset-react": "^7.0.0", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "^23.6.0", | ||
"babel-loader": "^8.0.5", | ||
"babel-plugin-emotion": "^10.0.5", | ||
"babel-plugin-transform-dynamic-import": "^2.1.0", | ||
"babel-preset-minify": "^0.5.0", | ||
"coveralls": "^3.0.2", | ||
"css-loader": "^2.0.2", | ||
"gh-pages": "^2.0.1", | ||
"html-webpack-plugin": "^3.2.0", | ||
"jest": "^23.6.0", | ||
"prettier": "1.15.3", | ||
@@ -52,2 +58,3 @@ "prop-types": "^15.6.2", | ||
"react-dom": "^16.7.0", | ||
"react-test-renderer": "^16.7.0", | ||
"style-loader": "^0.23.1", | ||
@@ -63,3 +70,20 @@ "webpack": "^4.28.3", | ||
"react-onclickout": "^2.0.8" | ||
}, | ||
"jest": { | ||
"transform": { | ||
"^.+\\.(js)$": "babel-jest" | ||
}, | ||
"testURL": "http://localhost/", | ||
"collectCoverage": false, | ||
"bail": true, | ||
"roots": [ | ||
"<rootDir>/__tests__" | ||
], | ||
"collectCoverageFrom": [ | ||
"src/**/*.{js,jsx}", | ||
"!node_modules/**", | ||
"!docs/**", | ||
"!examples/**" | ||
] | ||
} | ||
} |
@@ -7,3 +7,4 @@ # react-dropdown-select | ||
![](https://img.shields.io/npm/v/react-dropdown-select.svg) | ||
[![Coverage Status](https://coveralls.io/repos/github/sanusart/react-dropdown-select/badge.svg?branch=master)](https://coveralls.io/github/sanusart/react-dropdown-select?branch=master) | ||
[![Build Status](https://travis-ci.org/Gisto/Gisto.svg?branch=master)](https://travis-ci.org/Gisto/Gisto) | ||
### Installation | ||
@@ -35,43 +36,44 @@ | ||
| Props | Type | Default | Description | | ||
| -------------------------------------------------------------------------------------------------------- | ------ | ----------- | ------------------------------------------------------------------------------------------- | | ||
| **Component props** | | | | | ||
| values | array | [] | Selected values | | ||
| options | array | [] | Available options, (option with key `disabled: true` will be disabled) | | ||
| keepOpen | bool | false | If true, dropdown will always stay open (good for debugging) | | ||
| dropdownGap | number | 5 | Gap between select element and dropdown | | ||
| multi | bool | false | If true - will act as multi-select, if false - only one option will be selected at the time | | ||
| placeholder | string | "Select..." | Placeholder shown where there are no selected values | | ||
| addPlaceholder | string | "+" | Secondary placeholder on search field if any value selected | | ||
| disabled | bool | false | Disable select and all interactions | | ||
| style | object | {} | style object to pass to sselect | | ||
| className | string | | CSS class attribute to pass to sselect | | ||
| loading | bool | false | loading indicator | | ||
| clearable | bool | true | Clear all indicator | | ||
| separator | bool | true | Separator line between close all and dropdown handle | | ||
| dropdownHandle | bool | true | dropdown handle to open/close dropdown | | ||
| dropdownHeight | string | "300px" | min-height of a dropdown | | ||
| searchBy | string | label | search by object property in values | | ||
| labelField | string | "label" | field in data to use for label | | ||
| valueField | string | "value" | field in data to use for value | | ||
| color | string | "#0074D9" | base color to use in component, also can be overwritten via CSS | | ||
| closeOnScroll | bool | false | If true, scrolling the page will close the dropdown | | ||
| closeOnSelect | bool | false | If true, selecting option will close the dropdown | | ||
| [openOnTop](https://sanusart.github.io/react-dropdown-select/prop/open-on-top) | bool | false | If true, dropdown will open on top of the select | | ||
| keepSelectedInList | bool | true | If false, selected item will not appear in a list | | ||
| **Callback props** | | | | | ||
| onChange | func | | On values change callback, returns array of values objects | | ||
| onDropdownClose | func | | fires upon dropdown close | | ||
| onDropdownOpen | func | | fires upon dropdown open | | ||
| onClearAll | func | | fires upon clearing all values (via custom renderers) | | ||
| onSelectAll | func | | fires upon selecting all values (via custom renderers) | | ||
| [contentRenderer](https://sanusart.github.io/react-dropdown-select/prop/content-renderer) | func | | Overrides internal content component (the contents of the select component) | | ||
| [itemRenderer](https://sanusart.github.io/react-dropdown-select/prop/item-renderer) | func | | Overrides internal item in a dropdown | | ||
| [noDataRenderer](https://sanusart.github.io/react-dropdown-select/prop/no-data-renderer) | func | | Overrides internal "no data" (shown where search has no results) | | ||
| [optionRenderer](https://sanusart.github.io/react-dropdown-select/prop/option-renderer) | func | | Overrides internal option (the pillow with an "x") on the select content | | ||
| [inputRenderer](https://sanusart.github.io/react-dropdown-select/prop/input-renderer) | func | | Overrides internal input text | | ||
| [loadingRenderer](https://sanusart.github.io/react-dropdown-select/prop/loading-renderer) | func | | Overrides internal loading | | ||
| [clearRenderer](https://sanusart.github.io/react-dropdown-select/prop/clear-renderer) | func | | Overrides internal clear button | | ||
| [separatorRenderer](https://sanusart.github.io/react-dropdown-select/prop/separator-renderer) | func | | Overrides internal separator | | ||
| [dropdownRenderer](https://sanusart.github.io/react-dropdown-select/prop/dropdown-renderer) | func | | Overrides internal dropdown component | | ||
| [dropdownHandleRenderer](https://sanusart.github.io/react-dropdown-select/prop/dropdown-handle-renderer) | func | | Overrides internal dropdown handle | | ||
| Props | Type | Default | Description | | ||
| -------------------------------------------------------------------------------------------------------- | ----------- | ----------- | ----------------------------------------------------------------------------------------------- | | ||
| **Component props** | | | | | ||
| values | array | [] | Selected values | | ||
| options | array | [] | Available options, (option with key `disabled: true` will be disabled) | | ||
| keepOpen | bool | false | If true, dropdown will always stay open (good for debugging) | | ||
| dropdownGap | number | 5 | Gap between select element and dropdown | | ||
| multi | bool | false | If true - will act as multi-select, if false - only one option will be selected at the time | | ||
| placeholder | string | "Select..." | Placeholder shown where there are no selected values | | ||
| addPlaceholder | string | "+" | Secondary placeholder on search field if any value selected | | ||
| disabled | bool | false | Disable select and all interactions | | ||
| style | object | {} | style object to pass to sselect | | ||
| className | string | | CSS class attribute to pass to sselect | | ||
| loading | bool | false | loading indicator | | ||
| clearable | bool | true | Clear all indicator | | ||
| separator | bool | true | Separator line between close all and dropdown handle | | ||
| dropdownHandle | bool | true | dropdown handle to open/close dropdown | | ||
| dropdownHeight | string | "300px" | min-height of a dropdown | | ||
| searchBy | string | label | search by object property in values | | ||
| labelField | string | "label" | field in data to use for label | | ||
| valueField | string | "value" | field in data to use for value | | ||
| color | string | "#0074D9" | base color to use in component, also can be overwritten via CSS | | ||
| closeOnScroll | bool | false | If true, scrolling the page will close the dropdown | | ||
| closeOnSelect | bool | false | If true, selecting option will close the dropdown | | ||
| [openOnTop](https://sanusart.github.io/react-dropdown-select/prop/open-on-top) | bool | false | If true, dropdown will open on top of the select | | ||
| keepSelectedInList | bool | true | If false, selected item will not appear in a list | | ||
| portal | DOM element | false | If valid dom element specified - dropdown will break out to render inside the specified element | | ||
| **Callback props** | | | | | ||
| onChange | func | | On values change callback, returns array of values objects | | ||
| onDropdownClose | func | | fires upon dropdown close | | ||
| onDropdownOpen | func | | fires upon dropdown open | | ||
| onClearAll | func | | fires upon clearing all values (via custom renderers) | | ||
| onSelectAll | func | | fires upon selecting all values (via custom renderers) | | ||
| [contentRenderer](https://sanusart.github.io/react-dropdown-select/prop/content-renderer) | func | | Overrides internal content component (the contents of the select component) | | ||
| [itemRenderer](https://sanusart.github.io/react-dropdown-select/prop/item-renderer) | func | | Overrides internal item in a dropdown | | ||
| [noDataRenderer](https://sanusart.github.io/react-dropdown-select/prop/no-data-renderer) | func | | Overrides internal "no data" (shown where search has no results) | | ||
| [optionRenderer](https://sanusart.github.io/react-dropdown-select/prop/option-renderer) | func | | Overrides internal option (the pillow with an "x") on the select content | | ||
| [inputRenderer](https://sanusart.github.io/react-dropdown-select/prop/input-renderer) | func | | Overrides internal input text | | ||
| [loadingRenderer](https://sanusart.github.io/react-dropdown-select/prop/loading-renderer) | func | | Overrides internal loading | | ||
| [clearRenderer](https://sanusart.github.io/react-dropdown-select/prop/clear-renderer) | func | | Overrides internal clear button | | ||
| [separatorRenderer](https://sanusart.github.io/react-dropdown-select/prop/separator-renderer) | func | | Overrides internal separator | | ||
| [dropdownRenderer](https://sanusart.github.io/react-dropdown-select/prop/dropdown-renderer) | func | | Overrides internal dropdown component | | ||
| [dropdownHandleRenderer](https://sanusart.github.io/react-dropdown-select/prop/dropdown-handle-renderer) | func | | Overrides internal dropdown handle | |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
306761
57
78
27
857
12
1