react-datalist-input
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(1)),u=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}n(7);var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onHandleInput=function(e){var t=e.target.value,o=n.props,i=o.items,u=o.match,a=i.filter(function(e){return(void 0===u?"undefined":r(u))===("undefined"==typeof Function?"undefined":r(Function))?u(t,e):n.match(t,e)});n.setState({currentInput:t,matchingItems:a,focusIndex:0,visible:!0})},n.match=function(e,t){return t.label.substr(0,e.length).toUpperCase()===e.toUpperCase()},n.indexOfMatch=function(e,t){return t.label.toUpperCase().indexOf(e.toUpperCase())},n.onHandleKeydown=function(e){var t=n.state,r=t.visible,o=t.focusIndex,i=t.matchingItems;if(r){var u=o;if(40===e.keyCode||9===e.keyCode)(u+=1)>=i.length&&(u=0),n.setState({focusIndex:u}),e.preventDefault();else if(38===e.keyCode)(u-=1)<=-1&&(u=i.length-1),n.setState({focusIndex:u});else if(13===e.keyCode&&o>-1){var a=i[u];n.onSelect(a)}}},n.onClickItem=function(e){for(var t=n.state.matchingItems,r=e.currentTarget.children,o=void 0,i=0;i<r.length;i+=1)if("INPUT"===r[i].tagName){o=Number(r[i].value);break}var u=t.find(function(e){return e.key===o});n.onSelect(u)},n.onSelect=function(e){var t=n.state.lastValidItem;t&&e.key===t.key?n.setState({currentInput:e.label,visible:!1,focusIndex:-1}):(n.setState({currentInput:e.label,lastValidItem:e,visible:!1,focusIndex:-1}),(0,n.props.onSelect)(e))},n.renderItemLabel=function(e,t){return i.default.createElement(i.default.Fragment,null,t.label.substr(0,n.indexOfMatch(e,t)),i.default.createElement("strong",null,t.label.substr(n.indexOfMatch(e,t),e.length)),t.label.substr(n.indexOfMatch(e,t)+e.length))},n.renderItems=function(e,t,r,o,u){return i.default.createElement("div",{className:"datalist-items"},t.map(function(t,a){var c=u+" "+(r===a?"datalist-active-item "+o:"")+";";return i.default.createElement("div",{onClick:n.onClickItem,className:c,key:t.key,tabIndex:0,role:"button",onKeyUp:function(e){return e.preventDefault()}},n.renderItemLabel(e,t),i.default.createElement("input",{type:"hidden",value:t.key,readOnly:!0}))}))},n.renderInputField=function(e,t,r){return i.default.createElement("input",{onChange:n.onHandleInput,onKeyDown:n.onHandleKeydown,type:"text",className:"autocomplete-input "+r,placeholder:e,value:t})},n.state={lastValidItem:void 0,currentInput:"",matchingItems:[],visible:!1,focusIndex:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.Component),o(t,[{key:"render",value:function(){var e=this.state,t=e.currentInput,n=e.matchingItems,r=e.focusIndex,o=e.visible,u=this.props,a=u.placeholder,c=u.inputClassName,l=u.activeItemClassName,s=u.itemClassName,f=u.requiredInputLength,p=t.length>=f;return i.default.createElement("div",{className:"datalist-input"},this.renderInputField(a,t,c),p&&o&&this.renderItems(t,n,r,l,s))}}]),t}();c.propTypes={items:u.default.arrayOf(u.default.shape({label:u.default.string.isRequired,key:u.default.number.isRequired})).isRequired,placeholder:u.default.string,onSelect:u.default.func.isRequired,match:u.default.func,inputClassName:u.default.string,itemClassName:u.default.string,activeItemClassName:u.default.string,requiredInputLength:u.default.number},c.defaultProps={placeholder:"",match:void 0,inputClassName:"",itemClassName:"",activeItemClassName:"",requiredInputLength:1},t.default=c},function(e,t,n){"use strict";e.exports=n(2)},function(e,t,n){"use strict"; | ||
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=a(n(1)),u=a(n(4));function a(e){return e&&e.__esModule?e:{default:e}}n(7);var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onHandleInput=function(e){var t=e.target.value,o=n.props,i=o.items,u=o.match,a=i.filter(function(e){return(void 0===u?"undefined":r(u))===("undefined"==typeof Function?"undefined":r(Function))?u(t,e):n.match(t,e)});n.setState({currentInput:t,matchingItems:a,focusIndex:0,visible:!0})},n.match=function(e,t){return t.label.substr(0,e.length).toUpperCase()===e.toUpperCase()},n.indexOfMatch=function(e,t){return t.label.toUpperCase().indexOf(e.toUpperCase())},n.onHandleKeydown=function(e){var t=n.state,r=t.visible,o=t.focusIndex,i=t.matchingItems;if(r){var u=o;if(40===e.keyCode||9===e.keyCode)(u+=1)>=i.length&&(u=0),n.setState({focusIndex:u}),e.preventDefault();else if(38===e.keyCode)(u-=1)<=-1&&(u=i.length-1),n.setState({focusIndex:u});else if(13===e.keyCode&&o>-1){var a=i[u];n.onSelect(a)}}},n.onClickItem=function(e){for(var t=n.state.matchingItems,r=e.currentTarget.children,o=void 0,i=0;i<r.length;i+=1)if("INPUT"===r[i].tagName){o=Number(r[i].value);break}var u=t.find(function(e){return e.key===o});n.onSelect(u)},n.onSelect=function(e){var t=n.props,r=t.suppressReselect,o=t.clearInputOnSelect,i=n.state.lastValidItem;r&&i&&e.key===i.key?n.setState({currentInput:o?e.label:"",visible:!1,focusIndex:-1}):(n.setState({currentInput:o?e.label:"",lastValidItem:e,visible:!1,focusIndex:-1}),(0,n.props.onSelect)(e))},n.renderItemLabel=function(e,t){return i.default.createElement(i.default.Fragment,null,t.label.substr(0,n.indexOfMatch(e,t)),i.default.createElement("strong",null,t.label.substr(n.indexOfMatch(e,t),e.length)),t.label.substr(n.indexOfMatch(e,t)+e.length))},n.renderItems=function(e,t,r,o,u){return i.default.createElement("div",{className:"datalist-items"},t.map(function(t,a){var c=u+" "+(r===a?"datalist-active-item "+o:"")+";";return i.default.createElement("div",{onClick:n.onClickItem,className:c,key:t.key,tabIndex:0,role:"button",onKeyUp:function(e){return e.preventDefault()}},n.renderItemLabel(e,t),i.default.createElement("input",{type:"hidden",value:t.key,readOnly:!0}))}))},n.renderInputField=function(e,t,r){return i.default.createElement("input",{onChange:n.onHandleInput,onKeyDown:n.onHandleKeydown,type:"text",className:"autocomplete-input "+r,placeholder:e,value:t})},n.state={lastValidItem:void 0,currentInput:"",matchingItems:[],visible:!1,focusIndex:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.Component),o(t,[{key:"render",value:function(){var e=this.state,t=e.currentInput,n=e.matchingItems,r=e.focusIndex,o=e.visible,u=this.props,a=u.placeholder,c=u.inputClassName,l=u.activeItemClassName,s=u.itemClassName,f=u.requiredInputLength,p=t.length>=f;return i.default.createElement("div",{className:"datalist-input"},this.renderInputField(a,t,c),p&&o&&this.renderItems(t,n,r,l,s))}}]),t}();c.propTypes={items:u.default.arrayOf(u.default.shape({label:u.default.string.isRequired,key:u.default.number.isRequired})).isRequired,placeholder:u.default.string,onSelect:u.default.func.isRequired,match:u.default.func,inputClassName:u.default.string,itemClassName:u.default.string,activeItemClassName:u.default.string,requiredInputLength:u.default.number,clearInputOnSelect:u.default.bool,suppressReselect:u.default.bool},c.defaultProps={placeholder:"",match:void 0,inputClassName:"",itemClassName:"",activeItemClassName:"",requiredInputLength:0,clearInputOnSelect:!1,suppressReselect:!0},t.default=c},function(e,t,n){"use strict";e.exports=n(2)},function(e,t,n){"use strict"; | ||
/** @license React v16.8.6 | ||
@@ -9,3 +9,3 @@ * react.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/var r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,u=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,u,a){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,u,a],l=0;(e=Error(t.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O={};function S(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||g}function w(){}function x(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||g}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b("85"),this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=S.prototype;var j=x.prototype=new w;j.constructor=x,r(j,S.prototype),j.isPureReactComponent=!0;var C={current:null},I={current:null},_=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r=void 0,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)_.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var l=Array(c),s=0;s<c;s++)l[s]=arguments[s+2];o.children=l}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:u,ref:a,props:o,_owner:I.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,U=[];function T(e,t,n,r){if(U.length){var o=U.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function N(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>U.length&&U.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,o){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var c=!1;if(null===t)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case u:c=!0}}if(c)return r(o,t,""===n?"."+M(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l<t.length;l++){var s=n+M(a=t[l],l);c+=e(a,s,r,o)}else if(s=null===t||"object"!=typeof t?null:"function"==typeof(s=v&&t[v]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),l=0;!(a=t.next()).done;)c+=e(a=a.value,s=n+M(a,l++),r,o);else"object"===a&&b("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return c}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function $(e,t){e.func.call(e.context,t,e.count++)}function A(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?q(e,r,n,function(e){return e}):null!=e&&(R(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),r.push(e))}function q(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(P,"$&/")+"/"),L(e,A,t=T(t,i,r,o)),N(t)}function B(){var e=C.current;return null===e&&b("321"),e}var D={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return q(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,$,t=T(null,null,t,n)),N(t)},count:function(e){return L(e,function(){return null},null)},toArray:function(e){var t=[];return q(e,t,null,function(e){return e}),t},only:function(e){return R(e)||b("143"),e}},createRef:function(){return{current:null}},Component:S,PureComponent:x,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:d,render:e}},lazy:function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return B().useCallback(e,t)},useContext:function(e,t){return B().useContext(e,t)},useEffect:function(e,t){return B().useEffect(e,t)},useImperativeHandle:function(e,t,n){return B().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return B().useLayoutEffect(e,t)},useMemo:function(e,t){return B().useMemo(e,t)},useReducer:function(e,t,n){return B().useReducer(e,t,n)},useRef:function(e){return B().useRef(e)},useState:function(e){return B().useState(e)},Fragment:a,StrictMode:c,Suspense:y,createElement:E,cloneElement:function(e,t,n){null==e&&b("267",e);var o=void 0,u=r({},e.props),a=e.key,c=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,l=I.current),void 0!==t.key&&(a=""+t.key);var s=void 0;for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)_.call(t,o)&&!k.hasOwnProperty(o)&&(u[o]=void 0===t[o]&&void 0!==s?s[o]:t[o])}if(1===(o=arguments.length-2))u.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];u.children=s}return{$$typeof:i,type:e.type,key:a,ref:c,props:u,_owner:l}},createFactory:function(e){var t=E.bind(null,e);return t.type=e,t},isValidElement:R,version:"16.8.6",unstable_ConcurrentMode:p,unstable_Profiler:l,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:C,ReactCurrentOwner:I,assign:r}},F={default:D},H=F&&D||F;e.exports=H.default||H},function(e,t,n){"use strict"; | ||
*/var r=n(3),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,u=o?Symbol.for("react.portal"):60106,a=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,l=o?Symbol.for("react.profiler"):60114,s=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,y=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);!function(e,t,n,r,o,i,u,a){if(!e){if(e=void 0,void 0===t)e=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,u,a],l=0;(e=Error(t.replace(/%s/g,function(){return c[l++]}))).name="Invariant Violation"}throw e.framesToPop=1,e}}(!1,"Minified React error #"+e+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",n)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O={};function S(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||g}function w(){}function x(e,t,n){this.props=e,this.context=t,this.refs=O,this.updater=n||g}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&b("85"),this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=S.prototype;var I=x.prototype=new w;I.constructor=x,r(I,S.prototype),I.isPureReactComponent=!0;var j={current:null},C={current:null},_=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var r=void 0,o={},u=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(u=""+t.key),t)_.call(t,r)&&!k.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var l=Array(c),s=0;s<c;s++)l[s]=arguments[s+2];o.children=l}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:i,type:e,key:u,ref:a,props:o,_owner:C.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,U=[];function T(e,t,n,r){if(U.length){var o=U.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function N(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>U.length&&U.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,o){var a=typeof t;"undefined"!==a&&"boolean"!==a||(t=null);var c=!1;if(null===t)c=!0;else switch(a){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case i:case u:c=!0}}if(c)return r(o,t,""===n?"."+M(t,0):n),1;if(c=0,n=""===n?".":n+":",Array.isArray(t))for(var l=0;l<t.length;l++){var s=n+M(a=t[l],l);c+=e(a,s,r,o)}else if(s=null===t||"object"!=typeof t?null:"function"==typeof(s=v&&t[v]||t["@@iterator"])?s:null,"function"==typeof s)for(t=s.call(t),l=0;!(a=t.next()).done;)c+=e(a=a.value,s=n+M(a,l++),r,o);else"object"===a&&b("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return c}(e,"",t,n)}function M(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function $(e,t){e.func.call(e.context,t,e.count++)}function A(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?q(e,r,n,function(e){return e}):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),r.push(e))}function q(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(P,"$&/")+"/"),L(e,A,t=T(t,i,r,o)),N(t)}function B(){var e=j.current;return null===e&&b("321"),e}var D={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return q(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,$,t=T(null,null,t,n)),N(t)},count:function(e){return L(e,function(){return null},null)},toArray:function(e){var t=[];return q(e,t,null,function(e){return e}),t},only:function(e){return E(e)||b("143"),e}},createRef:function(){return{current:null}},Component:S,PureComponent:x,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:d,render:e}},lazy:function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return B().useCallback(e,t)},useContext:function(e,t){return B().useContext(e,t)},useEffect:function(e,t){return B().useEffect(e,t)},useImperativeHandle:function(e,t,n){return B().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return B().useLayoutEffect(e,t)},useMemo:function(e,t){return B().useMemo(e,t)},useReducer:function(e,t,n){return B().useReducer(e,t,n)},useRef:function(e){return B().useRef(e)},useState:function(e){return B().useState(e)},Fragment:a,StrictMode:c,Suspense:y,createElement:R,cloneElement:function(e,t,n){null==e&&b("267",e);var o=void 0,u=r({},e.props),a=e.key,c=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,l=C.current),void 0!==t.key&&(a=""+t.key);var s=void 0;for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)_.call(t,o)&&!k.hasOwnProperty(o)&&(u[o]=void 0===t[o]&&void 0!==s?s[o]:t[o])}if(1===(o=arguments.length-2))u.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];u.children=s}return{$$typeof:i,type:e.type,key:a,ref:c,props:u,_owner:l}},createFactory:function(e){var t=R.bind(null,e);return t.type=e,t},isValidElement:E,version:"16.8.6",unstable_ConcurrentMode:p,unstable_Profiler:l,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:j,ReactCurrentOwner:C,assign:r}},F={default:D},H=F&&D||F;e.exports=H.default||H},function(e,t,n){"use strict"; | ||
/* | ||
@@ -12,0 +12,0 @@ object-assign |
{ | ||
"name": "react-datalist-input", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "This package provides a react component as follows: an input field with a drop down menu to pick a possible option based on the current input.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/DataListInput.js", |
@@ -149,2 +149,12 @@ ## Info | ||
***clearInputOnSelect*** | ||
- Should the input field be cleared on select on filled with selected item? | ||
- Default is false. | ||
***suppressReselect*** | ||
- If suppressReselect is set to false, selecting the same item again, it will trigger another onSelect callback call. | ||
- Default is true. | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28208
58
160