react-bootstrap-typeahead
Advanced tools
Comparing version 6.1.0 to 6.1.1
@@ -5,2 +5,4 @@ "use strict"; | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,2 +13,6 @@ value: true | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _async = require("../../behaviors/async"); | ||
@@ -16,5 +22,12 @@ | ||
// @ts-ignore | ||
var _default = (0, _async.withAsync)(_Typeahead["default"]); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var AsyncTypeahead = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) { | ||
return /*#__PURE__*/_react["default"].createElement(_Typeahead["default"], (0, _extends2["default"])({}, (0, _async.useAsync)(props), { | ||
ref: ref | ||
})); | ||
}); | ||
var _default = AsyncTypeahead; | ||
exports["default"] = _default; |
@@ -1,4 +0,10 @@ | ||
import { withAsync } from '../../behaviors/async'; | ||
import Typeahead from '../Typeahead'; // @ts-ignore | ||
export default withAsync(Typeahead); | ||
import _extends from "@babel/runtime/helpers/extends"; | ||
import React, { forwardRef } from 'react'; | ||
import { useAsync } from '../../behaviors/async'; | ||
import TypeaheadComponent from '../Typeahead'; | ||
var AsyncTypeahead = /*#__PURE__*/forwardRef(function (props, ref) { | ||
return /*#__PURE__*/React.createElement(TypeaheadComponent, _extends({}, useAsync(props), { | ||
ref: ref | ||
})); | ||
}); | ||
export default AsyncTypeahead; |
{ | ||
"name": "react-bootstrap-typeahead", | ||
"version": "6.1.0", | ||
"version": "6.1.1", | ||
"description": "React typeahead with Bootstrap styling", | ||
@@ -5,0 +5,0 @@ "homepage": "http://ericgio.github.io/react-bootstrap-typeahead/", |
@@ -1,3 +0,5 @@ | ||
/// <reference types="react" /> | ||
declare const _default: import("react").ForwardRefExoticComponent<import("../../behaviors/async").UseAsyncProps & import("react").RefAttributes<import("../../core/Typeahead").default>>; | ||
export default _default; | ||
import React from 'react'; | ||
import { UseAsyncProps } from '../../behaviors/async'; | ||
import Typeahead from '../../core/Typeahead'; | ||
declare const AsyncTypeahead: React.ForwardRefExoticComponent<UseAsyncProps & React.RefAttributes<Typeahead>>; | ||
export default AsyncTypeahead; |
@@ -1,3 +0,5 @@ | ||
import { withAsync } from '../../behaviors/async'; | ||
import Typeahead from '../Typeahead'; | ||
export default withAsync(Typeahead); | ||
import React, { forwardRef } from 'react'; | ||
import { useAsync } from '../../behaviors/async'; | ||
import TypeaheadComponent from '../Typeahead'; | ||
const AsyncTypeahead = forwardRef((props, ref) => (React.createElement(TypeaheadComponent, { ...useAsync(props), ref: ref }))); | ||
export default AsyncTypeahead; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
863701
17383