Socket
Socket
Sign inDemoInstall

@uppy/react

Package Overview
Dependencies
Maintainers
5
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/react - npm Package Compare versions

Comparing version 1.4.4 to 1.4.5

types/index.test-d.tsx

14

package.json
{
"name": "@uppy/react",
"description": "React component wrappers around Uppy's official UI plugins.",
"version": "1.4.4",
"version": "1.4.5",
"license": "MIT",

@@ -25,7 +25,7 @@ "main": "index.js",

"dependencies": {
"@uppy/dashboard": "^1.6.1",
"@uppy/drag-drop": "^1.4.4",
"@uppy/progress-bar": "^1.3.6",
"@uppy/status-bar": "^1.5.1",
"@uppy/utils": "^2.2.1",
"@uppy/dashboard": "^1.6.2",
"@uppy/drag-drop": "^1.4.5",
"@uppy/progress-bar": "^1.3.7",
"@uppy/status-bar": "^1.5.2",
"@uppy/utils": "^2.2.2",
"prop-types": "^15.6.1"

@@ -36,3 +36,3 @@ },

},
"gitHead": "07e9909bfcca44505433c8bfc38a050314be64ce"
"gitHead": "2c98271103539fbe46b37b9f8c2746bc7188b9c8"
}
import UppyCore = require('@uppy/core');
export interface Uppy extends UppyCore.Uppy {}
export interface Locale extends UppyCore.Locale {}
export type Uppy = UppyCore.Uppy
export type Locale = UppyCore.Locale
// Helper to exclude a key
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
// If I use the helper it doesn't work, I think because 'target' is not a `keyof T` while
// the generic T is unknown, so will just use the expansion here
type OmitTarget<T> = Pick<T, Exclude<keyof T, 'target' | 'replaceTargetContent'>>
type WithBaseUppyProps<T> = T & { uppy: Uppy }
export type ToUppyProps<T> = WithBaseUppyProps<OmitTarget<T>>

@@ -1,32 +0,13 @@

import { Uppy, Locale } from './CommonTypes';
import { Omit, ToUppyProps } from './CommonTypes'
import Dashboard = require('@uppy/dashboard')
interface MetaField {
id: string;
name: string;
placeholder?: string;
}
// This type is mapped into `DashboardProps` below so IntelliSense doesn't display this big mess of nested types
type DashboardPropsInner = Omit<
ToUppyProps<Dashboard.DashboardOptions>,
// Remove the modal-only props
'animateOpenClose' | 'browserBackButtonClose' | 'inline' | 'onRequestCloseModal' | 'trigger'
>
export interface DashboardProps {
uppy: Uppy;
inline?: boolean;
plugins?: Array<string>;
trigger?: string;
width?: number;
height?: number;
showLinkToFileUploadResult?: boolean;
showProgressDetails?: boolean;
hideUploadButton?: boolean;
hideRetryButton?: boolean;
hidePauseResumeButton?: boolean;
hideCancelButton?: boolean;
hideProgressAfterFinish?: boolean;
showSelectedFiles?: boolean;
note?: string;
metaFields?: Array<MetaField>;
proudlyDisplayPoweredByUppy?: boolean;
disableStatusBar?: boolean;
disableInformer?: boolean;
disableThumbnailGenerator?: boolean;
thumbnailWidth?: number;
locale?: Locale;
export type DashboardProps = {
[K in keyof DashboardPropsInner]: DashboardPropsInner[K]
}

@@ -36,5 +17,5 @@

* React Component that renders a Dashboard for an Uppy instance. This component
* renders the Dashboard inline; so you can put it anywhere you want.
* renders the Dashboard inline so you can put it anywhere you want.
*/
declare const Dashboard: React.ComponentType<DashboardProps>;
export default Dashboard;
declare const DashboardComponent: React.ComponentType<DashboardProps>
export default DashboardComponent

@@ -1,11 +0,6 @@

import { DashboardProps } from './Dashboard';
import { DashboardProps } from './Dashboard'
export interface DashboardModalProps extends DashboardProps {
target?: string | HTMLElement;
open?: boolean;
onRequestClose?: VoidFunction;
closeAfterFinish?: boolean;
animateOpenClose?: boolean;
closeModalOnClickOutside?: boolean;
disablePageScrollWhenModalOpen?: boolean;
open?: boolean
onRequestClose?: VoidFunction
}

@@ -17,3 +12,3 @@

*/
declare const DashboardModal: React.ComponentType<DashboardModalProps>;
export default DashboardModal;
declare const DashboardModal: React.ComponentType<DashboardModalProps>
export default DashboardModal

@@ -1,7 +0,5 @@

import { Uppy, Locale } from './CommonTypes';
import { ToUppyProps } from './CommonTypes'
import DragDrop = require('@uppy/drag-drop')
export interface DragDropProps {
uppy: Uppy;
locale?: Locale;
}
export type DragDropProps = ToUppyProps<DragDrop.DragDropOptions>

@@ -12,3 +10,3 @@ /**

*/
declare const DragDrop: React.ComponentType<DragDropProps>;
export default DragDrop;
declare const DragDropComponent: React.ComponentType<DragDropProps>;
export default DragDropComponent;

@@ -1,8 +0,5 @@

import { Uppy } from './CommonTypes';
import { ToUppyProps } from './CommonTypes'
import ProgressBar = require('@uppy/progress-bar')
export interface ProgressBarProps {
uppy: Uppy;
fixed?: boolean;
hideAfterFinish?: boolean;
}
export type ProgressBarProps = ToUppyProps<ProgressBar.ProgressBarOptions>

@@ -12,3 +9,3 @@ /**

*/
declare const ProgressBar: React.ComponentType<ProgressBarProps>;
export default ProgressBar;
declare const ProgressBarComponent: React.ComponentType<ProgressBarProps>
export default ProgressBarComponent

@@ -1,8 +0,5 @@

import { Uppy } from './CommonTypes';
import { ToUppyProps } from './CommonTypes'
import StatusBar = require('@uppy/status-bar')
export interface StatusBarProps {
uppy: Uppy;
showProgressDetails?: boolean;
hideAfterFinish?: boolean;
}
export type StatusBarProps = ToUppyProps<StatusBar.StatusBarOptions>

@@ -13,3 +10,3 @@ /**

*/
declare const StatusBar: React.ComponentType<StatusBarProps>;
export default StatusBar;
declare const StatusBarComponent: React.ComponentType<StatusBarProps>
export default StatusBarComponent

@@ -1,7 +0,7 @@

import * as React from 'react';
import * as React from 'react'
export { default as Dashboard } from '../src/Dashboard';
export { default as DashboardModal } from '../src/DashboardModal';
export { default as DragDrop } from '../src/DragDrop';
export { default as ProgressBar } from '../src/ProgressBar';
export { default as StatusBar } from '../src/StatusBar';
export { default as Dashboard } from '../src/Dashboard'
export { default as DashboardModal } from '../src/DashboardModal'
export { default as DragDrop } from '../src/DragDrop'
export { default as ProgressBar } from '../src/ProgressBar'
export { default as StatusBar } from '../src/StatusBar'
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc