@uppy/core
Advanced tools
Comparing version 4.0.0-beta.12 to 4.0.0
# @uppy/core | ||
## 4.0.0 | ||
Released: 2024-07-10 | ||
Included in: Uppy v4.0.0 | ||
- @uppy/core: bring back resetProgress (Merlijn Vos / #5320) | ||
- @uppy/core: export UppyOptions, UppyFile, Meta, Body (Merlijn Vos / #5319) | ||
## 4.0.0-beta.9 | ||
@@ -4,0 +12,0 @@ |
export { default } from './Uppy.ts'; | ||
export { default as Uppy, type State, type UnknownPlugin, type UnknownProviderPlugin, type UnknownSearchProviderPlugin, type UploadResult, type UppyEventMap, } from './Uppy.ts'; | ||
export { default as Uppy, type State, type UnknownPlugin, type UnknownProviderPlugin, type UnknownSearchProviderPlugin, type UploadResult, type UppyEventMap, type UppyOptions, } from './Uppy.ts'; | ||
export { default as UIPlugin } from './UIPlugin.ts'; | ||
@@ -7,2 +7,3 @@ export { default as BasePlugin } from './BasePlugin.ts'; | ||
export type { UIPluginOptions } from './UIPlugin.ts'; | ||
export type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -275,2 +275,3 @@ /// <reference types="lodash" /> | ||
setOptions(newOpts: MinimalRequiredOptions<M, B>): void; | ||
resetProgress(): void; | ||
clear(): void; | ||
@@ -277,0 +278,0 @@ addPreProcessor(fn: Processor): void; |
@@ -24,3 +24,3 @@ function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); return e; } | ||
const packageJson = { | ||
"version": "4.0.0-beta.12" | ||
"version": "4.0.0" | ||
}; | ||
@@ -419,2 +419,27 @@ import locale from "./locale.js"; | ||
} | ||
resetProgress() { | ||
const defaultProgress = { | ||
percentage: 0, | ||
bytesUploaded: false, | ||
uploadComplete: false, | ||
uploadStarted: null | ||
}; | ||
const files = { | ||
...this.getState().files | ||
}; | ||
const updatedFiles = Object.create(null); | ||
Object.keys(files).forEach(fileID => { | ||
updatedFiles[fileID] = { | ||
...files[fileID], | ||
progress: { | ||
...files[fileID].progress, | ||
...defaultProgress | ||
} | ||
}; | ||
}); | ||
this.setState({ | ||
files: updatedFiles, | ||
...defaultUploadState | ||
}); | ||
} | ||
clear() { | ||
@@ -421,0 +446,0 @@ const { |
{ | ||
"name": "@uppy/core", | ||
"description": "Core module for the extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", | ||
"version": "4.0.0-beta.12", | ||
"version": "4.0.0", | ||
"license": "MIT", | ||
@@ -27,4 +27,4 @@ "main": "lib/index.js", | ||
"@transloadit/prettier-bytes": "^0.3.4", | ||
"@uppy/store-default": "^4.0.0-beta.2", | ||
"@uppy/utils": "^6.0.0-beta.9", | ||
"@uppy/store-default": "^4.0.0", | ||
"@uppy/utils": "^6.0.0", | ||
"lodash": "^4.17.21", | ||
@@ -38,4 +38,3 @@ "mime-match": "^1.0.2", | ||
"vitest": "^1.2.1" | ||
}, | ||
"stableVersion": "3.10.0" | ||
} | ||
} |
@@ -10,2 +10,3 @@ export { default } from './Uppy.ts' | ||
type UppyEventMap, | ||
type UppyOptions, | ||
} from './Uppy.ts' | ||
@@ -17,1 +18,3 @@ export { default as UIPlugin } from './UIPlugin.ts' | ||
export type { UIPluginOptions } from './UIPlugin.ts' | ||
export type { UppyFile, Meta, Body } from '@uppy/utils/lib/UppyFile' |
import { expectTypeOf, test } from 'vitest' | ||
import type { Body, InternalMetadata, Meta } from '@uppy/utils/lib/UppyFile' | ||
import Uppy, { type UnknownPlugin } from './Uppy' | ||
import UIPlugin, { type UIPluginOptions } from './UIPlugin' | ||
import Uppy, { type UnknownPlugin } from './Uppy.ts' | ||
import UIPlugin, { type UIPluginOptions } from './UIPlugin.ts' | ||
@@ -7,0 +7,0 @@ interface Opts extends UIPluginOptions { |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
520599
8474
0
Updated@uppy/store-default@^4.0.0
Updated@uppy/utils@^6.0.0