react-datalist-input
Advanced tools
Comparing version 1.1.35 to 1.1.36
@@ -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=u(n(1)),a=u(n(4));function u(e){return e&&e.__esModule?e:{default:e}}n(7);var l=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));c.call(n);var r=n.props.initialValue;return n.state={lastValidItem:void 0,currentInput:r,matchingItems:[],visible:!1,focusIndex:0,interactionHappened:!1},window.addEventListener("click",n.onClickCloseMenu,!1),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,a=this.props,u=a.placeholder,l=a.inputClassName,c=a.activeItemClassName,s=a.itemClassName,f=a.requiredInputLength,p=t.length>=f;return i.default.createElement("div",{className:"datalist-input"},this.renderInputField(u,t,l),p&&o&&this.renderItems(t,n,r,c,s))}}]),t}(),c=function(){var e=this;this.componentWillUnmount=function(){window.removeEventListener("click",e.onClickCloseMenu)},this.onClickCloseMenu=function(t){var n=document.getElementsByClassName("datalist-items");if(n&&n.length)if(e.state.interactionHappened)e.setState({interactionHappened:!1});else{var r=document.getElementsByClassName("autocomplete-input");if(r){for(var o=0;o<r.length;o+=1){var i=t.target===r[o],a=r[o].contains(t.target);if(i||a)return}for(var u=0;u<n.length;u+=1){var l=n[u].contains(t.target),c=t.target===n[u];if(l||c)return}e.state.visible&&e.setState({visible:!1,focusIndex:-1})}}},this.onClickInput=function(){var t=e.state,n=t.visible,o=t.lastValidItem,i=e.state.currentInput,a=e.props,u=a.requiredInputLength,l=a.dropDownLength,c=a.items,s=a.match,f=a.clearInputOnSelect,p=a.initialValue,d=i.length>=u;if(p&&i===p&&(e.setState({currentInput:""}),i=""),d&&!n){var h=c.filter(function(t){return(void 0===s?"undefined":r(s))===("undefined"==typeof Function?"undefined":r(Function))?s(i,t):e.match(i,t)}),m=!f&&o&&o.label===i,y=h.length&&!m?h.slice(0,l):c.slice(0,l),v=o&&!f?e.indexOfItem(o,y):0;v=v>0?v:0,e.setState({visible:!0,matchingItems:y,focusIndex:v})}},this.onHandleInput=function(t){var n=t.target.value,o=e.props,i=o.items,a=o.match,u=o.dropDownLength,l=i.filter(function(t){return(void 0===a?"undefined":r(a))===("undefined"==typeof Function?"undefined":r(Function))?a(n,t):e.match(n,t)}),c=l.slice(0,u);l.length>0?e.setState({currentInput:n,matchingItems:c,focusIndex:0,visible:!0}):e.setState({currentInput:n,matchingItems:c,visible:!1,focusIndex:-1})},this.match=function(e,t){return t.label.substr(0,e.length).toUpperCase()===e.toUpperCase()},this.indexOfMatch=function(e,t){return t.label.toUpperCase().indexOf(e.toUpperCase())},this.indexOfItem=function(e,t){return t.indexOf(t.find(function(t){return t.key===e.key}))},this.onHandleKeydown=function(t){var n=e.state,r=n.visible,o=n.focusIndex,i=n.matchingItems;if(r){var a=o;if(40===t.keyCode||9===t.keyCode)(a+=1)>=i.length&&(a=0),e.setState({focusIndex:a}),t.preventDefault();else if(38===t.keyCode)(a-=1)<=-1&&(a=i.length-1),e.setState({focusIndex:a});else if(13===t.keyCode&&o>-1){var u=i[a];e.onSelect(u)}}},this.onClickItem=function(t){for(var n=e.state.matchingItems,r=t.currentTarget.children,o=void 0,i=0;i<r.length;i+=1)if("INPUT"===r[i].tagName){o=r[i].value;break}var a=n.find(function(e){return e.key===o});e.onSelect(a)},this.onSelect=function(t){var n=e.props,r=n.suppressReselect,o=n.clearInputOnSelect,i=e.state.lastValidItem;r&&i&&t.key===i.key?e.setState({currentInput:o?"":t.label,visible:!1,focusIndex:-1,interactionHappened:!0}):(e.setState({currentInput:o?"":t.label,lastValidItem:t,visible:!1,focusIndex:-1,interactionHappened:!0}),(0,e.props.onSelect)(t))},this.renderMatchingLabel=function(e,t,n){return i.default.createElement(i.default.Fragment,null,t.label.substr(0,n),i.default.createElement("strong",null,t.label.substr(n,e.length)),t.label.substr(e.length,t.label.length))},this.renderItemLabel=function(t,n,r){return i.default.createElement(i.default.Fragment,null,r>=0&&t.length?e.renderMatchingLabel(t,n,r):n.label)},this.renderItems=function(t,n,r,o,a){return i.default.createElement("div",{className:"datalist-items"},n.map(function(n,u){var l=a+" "+(r===u?"datalist-active-item "+o:"")+";";return i.default.createElement("div",{onClick:e.onClickItem,className:l,key:n.key,tabIndex:0,role:"button",onKeyUp:function(e){return e.preventDefault()}},e.renderItemLabel(t,n,e.indexOfMatch(t,n)),i.default.createElement("input",{type:"hidden",value:n.key,readOnly:!0}))}))},this.renderInputField=function(t,n,r){return i.default.createElement("input",{onChange:e.onHandleInput,onClick:e.onClickInput,onKeyDown:e.onHandleKeydown,type:"text",className:"autocomplete-input "+r,placeholder:t,value:n})}};l.propTypes={items:a.default.arrayOf(a.default.shape({label:a.default.string.isRequired,key:a.default.oneOfType([a.default.string,a.default.number]).isRequired})).isRequired,placeholder:a.default.string,onSelect:a.default.func.isRequired,match:a.default.func,inputClassName:a.default.string,itemClassName:a.default.string,activeItemClassName:a.default.string,requiredInputLength:a.default.number,clearInputOnSelect:a.default.bool,suppressReselect:a.default.bool,dropDownLength:a.default.number,initialValue:a.default.string},l.defaultProps={placeholder:"",match:void 0,inputClassName:"",itemClassName:"",activeItemClassName:"",requiredInputLength:0,clearInputOnSelect:!1,suppressReselect:!0,dropDownLength:1/0,initialValue:""},t.default=l},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=u(n(1)),a=u(n(4));function u(e){return e&&e.__esModule?e:{default:e}}n(7);var l=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));c.call(n);var r=n.props.initialValue;return n.state={lastValidItem:void 0,currentInput:r,matchingItems:[],visible:!1,focusIndex:0,interactionHappened:!1},window.addEventListener("click",n.onClickCloseMenu,!1),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,a=this.props,u=a.placeholder,l=a.inputClassName,c=a.activeItemClassName,s=a.itemClassName,f=a.requiredInputLength,p=t.length>=f;return i.default.createElement("div",{className:"datalist-input"},this.renderInputField(u,t,l),p&&o&&this.renderItems(t,n,r,c,s))}}]),t}(),c=function(){var e=this;this.componentDidUpdate=function(){var t=e.state,n=t.currentInput,r=t.visible,o=e.props.initialValue;n||!o||r||e.setState({currentInput:o})},this.componentWillUnmount=function(){window.removeEventListener("click",e.onClickCloseMenu)},this.onClickCloseMenu=function(t){var n=document.getElementsByClassName("datalist-items");if(n&&n.length)if(e.state.interactionHappened)e.setState({interactionHappened:!1});else{var r=document.getElementsByClassName("autocomplete-input");if(r){for(var o=0;o<r.length;o+=1){var i=t.target===r[o],a=r[o].contains(t.target);if(i||a)return}for(var u=0;u<n.length;u+=1){var l=n[u].contains(t.target),c=t.target===n[u];if(l||c)return}e.state.visible&&e.setState({visible:!1,focusIndex:-1})}}},this.onClickInput=function(){var t=e.state,n=t.visible,o=t.lastValidItem,i=e.state.currentInput,a=e.props,u=a.requiredInputLength,l=a.dropDownLength,c=a.items,s=a.match,f=a.clearInputOnSelect,p=a.initialValue,d=i.length>=u;if(p&&i===p&&(e.setState({currentInput:""}),i=""),d&&!n){var h=c.filter(function(t){return(void 0===s?"undefined":r(s))===("undefined"==typeof Function?"undefined":r(Function))?s(i,t):e.match(i,t)}),m=!f&&o&&o.label===i,y=h.length&&!m?h.slice(0,l):c.slice(0,l),v=o&&!f?e.indexOfItem(o,y):0;v=v>0?v:0,e.setState({visible:!0,matchingItems:y,focusIndex:v})}},this.onHandleInput=function(t){var n=t.target.value,o=e.props,i=o.items,a=o.match,u=o.dropDownLength,l=i.filter(function(t){return(void 0===a?"undefined":r(a))===("undefined"==typeof Function?"undefined":r(Function))?a(n,t):e.match(n,t)}),c=l.slice(0,u);l.length>0?e.setState({currentInput:n,matchingItems:c,focusIndex:0,visible:!0}):e.setState({currentInput:n,matchingItems:c,visible:!1,focusIndex:-1})},this.match=function(e,t){return t.label.substr(0,e.length).toUpperCase()===e.toUpperCase()},this.indexOfMatch=function(e,t){return t.label.toUpperCase().indexOf(e.toUpperCase())},this.indexOfItem=function(e,t){return t.indexOf(t.find(function(t){return t.key===e.key}))},this.onHandleKeydown=function(t){var n=e.state,r=n.visible,o=n.focusIndex,i=n.matchingItems;if(r){var a=o;if(40===t.keyCode||9===t.keyCode)(a+=1)>=i.length&&(a=0),e.setState({focusIndex:a}),t.preventDefault();else if(38===t.keyCode)(a-=1)<=-1&&(a=i.length-1),e.setState({focusIndex:a});else if(13===t.keyCode&&o>-1){var u=i[a];e.onSelect(u)}}},this.onClickItem=function(t){for(var n=e.state.matchingItems,r=t.currentTarget.children,o=void 0,i=0;i<r.length;i+=1)if("INPUT"===r[i].tagName){o=r[i].value;break}var a=n.find(function(e){return e.key===o});e.onSelect(a)},this.onSelect=function(t){var n=e.props,r=n.suppressReselect,o=n.clearInputOnSelect,i=e.state.lastValidItem;r&&i&&t.key===i.key?e.setState({currentInput:o?"":t.label,visible:!1,focusIndex:-1,interactionHappened:!0}):(e.setState({currentInput:o?"":t.label,lastValidItem:t,visible:!1,focusIndex:-1,interactionHappened:!0}),(0,e.props.onSelect)(t))},this.renderMatchingLabel=function(e,t,n){return i.default.createElement(i.default.Fragment,null,t.label.substr(0,n),i.default.createElement("strong",null,t.label.substr(n,e.length)),t.label.substr(e.length,t.label.length))},this.renderItemLabel=function(t,n,r){return i.default.createElement(i.default.Fragment,null,r>=0&&t.length?e.renderMatchingLabel(t,n,r):n.label)},this.renderItems=function(t,n,r,o,a){return i.default.createElement("div",{className:"datalist-items"},n.map(function(n,u){var l=a+" "+(r===u?"datalist-active-item "+o:"")+";";return i.default.createElement("div",{onClick:e.onClickItem,className:l,key:n.key,tabIndex:0,role:"button",onKeyUp:function(e){return e.preventDefault()}},e.renderItemLabel(t,n,e.indexOfMatch(t,n)),i.default.createElement("input",{type:"hidden",value:n.key,readOnly:!0}))}))},this.renderInputField=function(t,n,r){return i.default.createElement("input",{onChange:e.onHandleInput,onClick:e.onClickInput,onKeyDown:e.onHandleKeydown,type:"text",className:"autocomplete-input "+r,placeholder:t,value:n})}};l.propTypes={items:a.default.arrayOf(a.default.shape({label:a.default.string.isRequired,key:a.default.oneOfType([a.default.string,a.default.number]).isRequired})).isRequired,placeholder:a.default.string,onSelect:a.default.func.isRequired,match:a.default.func,inputClassName:a.default.string,itemClassName:a.default.string,activeItemClassName:a.default.string,requiredInputLength:a.default.number,clearInputOnSelect:a.default.bool,suppressReselect:a.default.bool,dropDownLength:a.default.number,initialValue:a.default.string},l.defaultProps={placeholder:"",match:void 0,inputClassName:"",itemClassName:"",activeItemClassName:"",requiredInputLength:0,clearInputOnSelect:!1,suppressReselect:!0,dropDownLength:1/0,initialValue:""},t.default=l},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,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,c=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,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,y=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,a,u){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 l=[n,r,o,i,a,u],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).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(){}},w={};function S(e,t,n){this.props=e,this.context=t,this.refs=w,this.updater=n||g}function I(){}function O(e,t,n){this.props=e,this.context=t,this.refs=w,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")},I.prototype=S.prototype;var x=O.prototype=new I;x.constructor=O,r(x,S.prototype),x.isPureReactComponent=!0;var C={current:null},k={current:null},j=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r=void 0,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)j.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),s=0;s<l;s++)c[s]=arguments[s+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:k.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,L=[];function U(e,t,n,r){if(L.length){var o=L.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 T(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>L.length&&L.push(e)}function N(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return r(o,t,""===n?"."+M(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var s=n+M(u=t[c],c);l+=e(u,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),c=0;!(u=t.next()).done;)l+=e(u=u.value,s=n+M(u,c++),r,o);else"object"===u&&b("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return l}(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,"$&/")+"/"),N(e,A,t=U(t,i,r,o)),T(t)}function D(){var e=C.current;return null===e&&b("321"),e}var F={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;N(e,$,t=U(null,null,t,n)),T(t)},count:function(e){return N(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:O,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:y,_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 D().useCallback(e,t)},useContext:function(e,t){return D().useContext(e,t)},useEffect:function(e,t){return D().useEffect(e,t)},useImperativeHandle:function(e,t,n){return D().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return D().useLayoutEffect(e,t)},useMemo:function(e,t){return D().useMemo(e,t)},useReducer:function(e,t,n){return D().useReducer(e,t,n)},useRef:function(e){return D().useRef(e)},useState:function(e){return D().useState(e)},Fragment:u,StrictMode:l,Suspense:h,createElement:E,cloneElement:function(e,t,n){null==e&&b("267",e);var o=void 0,a=r({},e.props),u=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=k.current),void 0!==t.key&&(u=""+t.key);var s=void 0;for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)j.call(t,o)&&!_.hasOwnProperty(o)&&(a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o])}if(1===(o=arguments.length-2))a.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:i,type:e.type,key:u,ref:l,props:a,_owner:c}},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:c,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:C,ReactCurrentOwner:k,assign:r}},B={default:F},H=B&&F||B;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,a=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,l=o?Symbol.for("react.strict_mode"):60108,c=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,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,y=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,a,u){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 l=[n,r,o,i,a,u],c=0;(e=Error(t.replace(/%s/g,function(){return l[c++]}))).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(){}},w={};function S(e,t,n){this.props=e,this.context=t,this.refs=w,this.updater=n||g}function I(){}function O(e,t,n){this.props=e,this.context=t,this.refs=w,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")},I.prototype=S.prototype;var x=O.prototype=new I;x.constructor=O,r(x,S.prototype),x.isPureReactComponent=!0;var C={current:null},k={current:null},j=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var r=void 0,o={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)j.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),s=0;s<l;s++)c[s]=arguments[s+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:i,type:e,key:a,ref:u,props:o,_owner:k.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,L=[];function U(e,t,n,r){if(L.length){var o=L.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 T(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>L.length&&L.push(e)}function N(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var l=!1;if(null===t)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case i:case a:l=!0}}if(l)return r(o,t,""===n?"."+M(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var s=n+M(u=t[c],c);l+=e(u,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),c=0;!(u=t.next()).done;)l+=e(u=u.value,s=n+M(u,c++),r,o);else"object"===u&&b("31","[object Object]"==(r=""+t)?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return l}(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,"$&/")+"/"),N(e,A,t=U(t,i,r,o)),T(t)}function D(){var e=C.current;return null===e&&b("321"),e}var F={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;N(e,$,t=U(null,null,t,n)),T(t)},count:function(e){return N(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:O,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:y,_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 D().useCallback(e,t)},useContext:function(e,t){return D().useContext(e,t)},useEffect:function(e,t){return D().useEffect(e,t)},useImperativeHandle:function(e,t,n){return D().useImperativeHandle(e,t,n)},useDebugValue:function(){},useLayoutEffect:function(e,t){return D().useLayoutEffect(e,t)},useMemo:function(e,t){return D().useMemo(e,t)},useReducer:function(e,t,n){return D().useReducer(e,t,n)},useRef:function(e){return D().useRef(e)},useState:function(e){return D().useState(e)},Fragment:u,StrictMode:l,Suspense:h,createElement:E,cloneElement:function(e,t,n){null==e&&b("267",e);var o=void 0,a=r({},e.props),u=e.key,l=e.ref,c=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,c=k.current),void 0!==t.key&&(u=""+t.key);var s=void 0;for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)j.call(t,o)&&!_.hasOwnProperty(o)&&(a[o]=void 0===t[o]&&void 0!==s?s[o]:t[o])}if(1===(o=arguments.length-2))a.children=n;else if(1<o){s=Array(o);for(var f=0;f<o;f++)s[f]=arguments[f+2];a.children=s}return{$$typeof:i,type:e.type,key:u,ref:l,props:a,_owner:c}},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:c,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:C,ReactCurrentOwner:k,assign:r}},B={default:F},V=B&&F||B;e.exports=V.default||V},function(e,t,n){"use strict"; | ||
/* | ||
@@ -12,0 +12,0 @@ object-assign |
{ | ||
"name": "react-datalist-input", | ||
"version": "1.1.35", | ||
"version": "1.1.36", | ||
"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", |
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
30639
66