@uppy/react
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -88,3 +88,2 @@ "use strict"; | ||
DashboardModal.propTypes = { | ||
// Only check this prop type in the browser. | ||
target: typeof window !== 'undefined' ? PropTypes.instanceOf(window.HTMLElement) : PropTypes.any, | ||
@@ -97,3 +96,2 @@ open: PropTypes.bool, | ||
}; | ||
DashboardModal.defaultProps = {}; | ||
module.exports = DashboardModal; |
{ | ||
"name": "@uppy/react", | ||
"description": "React component wrappers around Uppy's official UI plugins.", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@uppy/dashboard": "^2.0.1", | ||
"@uppy/dashboard": "^2.0.2", | ||
"@uppy/drag-drop": "^2.0.1", | ||
@@ -45,3 +45,3 @@ "@uppy/file-input": "^2.0.1", | ||
}, | ||
"gitHead": "d69043aacc2c9d31813e0fabc4b0ca3f4a760d2a" | ||
"gitHead": "246eafc51a7ed6a1f534629454e1f78cd6f507c1" | ||
} |
@@ -9,3 +9,4 @@ import type { Uppy } from '@uppy/core' | ||
type OmitTarget<T> = Pick<T, Exclude<keyof T, 'target'>> | ||
type WithBaseUppyProps<T> = T & { uppy: Uppy } | ||
export type WithBaseUppyProps<T> = T & { uppy: Uppy } | ||
export type ToUppyProps<T> = WithBaseUppyProps<OmitTarget<T>> |
import * as React from 'react' | ||
import type { DashboardOptions } from '@uppy/dashboard' | ||
import { Omit, ToUppyProps } from './CommonTypes' | ||
import { Omit, WithBaseUppyProps } from './CommonTypes' | ||
// This type is mapped into `DashboardProps` below so IntelliSense doesn't display this big mess of nested types | ||
type DashboardPropsInner = Omit< | ||
ToUppyProps<DashboardOptions>, | ||
WithBaseUppyProps<DashboardOptions>, | ||
// Remove the modal-only props | ||
'animateOpenClose' | 'browserBackButtonClose' | 'inline' | 'onRequestCloseModal' | 'trigger' | ||
> & React.BaseHTMLAttributes<HTMLDivElement> | ||
| 'animateOpenClose' | ||
| 'browserBackButtonClose' | ||
| 'inline' | ||
| 'onRequestCloseModal' | ||
| 'trigger' | ||
> & | ||
React.BaseHTMLAttributes<HTMLDivElement> | ||
export type DashboardProps = { | ||
[K in keyof DashboardPropsInner]: DashboardPropsInner[K] | ||
[K in keyof DashboardPropsInner]: DashboardPropsInner[K] | ||
} | ||
@@ -15,0 +20,0 @@ |
@@ -77,3 +77,3 @@ const React = require('react') | ||
DashboardModal.propTypes = { // Only check this prop type in the browser. | ||
DashboardModal.propTypes = { | ||
target: typeof window !== 'undefined' ? PropTypes.instanceOf(window.HTMLElement) : PropTypes.any, | ||
@@ -87,5 +87,2 @@ open: PropTypes.bool, | ||
DashboardModal.defaultProps = { | ||
} | ||
module.exports = DashboardModal |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1610
85092
Updated@uppy/dashboard@^2.0.2