New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

file-upload-with-preview

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-upload-with-preview - npm Package Compare versions

Comparing version 6.0.2 to 6.1.0

dist/index.cjs

107

dist/file-upload-with-preview.d.ts

@@ -1,107 +0,2 @@

export interface Text {
/**
* Browse button text
*
* @default "Browse"
*/
browse?: string;
/**
* Placeholder text
*
* @default "Choose file..."
*/
chooseFile?: string;
/**
* Main input label text
*
* @default "Upload"
*/
label?: string;
/**
* Count descriptor text. Defaults to `${ n } files selected`.
*
* @default "files selected"
*/
selectedCount?: string;
}
export interface Images {
/**
* Background image for image grid
*
* @default DEFAULT_BACKGROUND_IMAGE
*/
backgroundImage?: string;
/**
* Placeholder image
*
* @default DEFAULT_BASE_IMAGE
*/
baseImage?: string;
/**
* Alternate file upload image
*
* @default DEFAULT_SUCCESS_FILE_ALT_IMAGE
*/
successFileAltImage?: string;
/**
* PDF upload image
*
* @default DEFAULT_SUCCESS_PDF_IMAGE
*/
successPdfImage?: string;
/**
* Video upload image
*
* @default DEFAULT_SUCCESS_VIDEO_IMAGE
*/
successVideoImage?: string;
}
export type PresetFiles = string[];
/**
* Options to customize the library
*/
export interface Options {
/**
* Type of files to accept in your input
*
* @default '*'
*/
accept?: HTMLInputElement['accept'];
/**
* Configurable images for the library
*/
images?: Images;
/**
* Set a maximum number of files you'd like the component to deal with. Must be `> 0` if set. By default there is no limit.
*
* @default 0
*/
maxFileCount?: number;
/**
* Set to `true` if you want to allow the user to selected multiple images. Will use grid view in the image preview if set.
*
* @default false
*/
multiple?: boolean;
/**
* Provide an array of image paths to be automatically uploaded and displayed on page load (can be images hosted on server or URLs)
*
* @default []
*/
presetFiles?: PresetFiles;
/**
* Show a delete button on images in the grid
*
* @default true
*/
showDeleteButtonOnImages?: boolean;
/**
* Configurable text for the library
*/
text?: Text;
}
export type RequiredOptions = Required<Options> & {
images: Required<Images>;
text: Required<Text>;
};
import { Options, PresetFiles, RequiredOptions } from './types/options';
export declare class FileUploadWithPreview {

@@ -108,0 +3,0 @@ /**

export * from './constants/events';
export * from './constants/file';
export * from './constants/images';
export * from './constants/style';
export * from './constants/text';
export * from './types/events';
export * from './types/options';
export * from './file-upload-with-preview';
export * from './types/events';
//# sourceMappingURL=index.d.ts.map

@@ -27,6 +27,10 @@ {

},
"engines": {
"node": ">=10"
},
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/file-upload-with-preview.js",
"require": "./dist/file-upload-with-preview.cjs",
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"

@@ -48,3 +52,3 @@ },

"license": "MIT",
"main": "./dist/file-upload-with-preview.js",
"main": "./dist/index.js",
"name": "file-upload-with-preview",

@@ -73,3 +77,3 @@ "repository": {

"types": "./dist/index.d.ts",
"version": "6.0.2"
"version": "6.1.0"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc