@uppy/core
Advanced tools
Comparing version 4.1.2 to 4.2.0
# @uppy/core | ||
## 4.2.0 | ||
Released: 2024-08-29 | ||
Included in: Uppy v4.3.0 | ||
- @uppy/core,@uppy/dashboard: Pass container to `UIPlugin.render` for non-Preact integration (Merlijn Vos / #5437) | ||
## 4.1.0 | ||
@@ -4,0 +11,0 @@ |
@@ -1,2 +0,1 @@ | ||
import { type ComponentChild } from 'preact'; | ||
import type { Body, Meta } from '@uppy/utils/lib/UppyFile'; | ||
@@ -32,3 +31,3 @@ import BasePlugin from './BasePlugin.ts'; | ||
*/ | ||
render(state: Record<string, unknown>): ComponentChild; | ||
render(state: Record<string, unknown>, container: HTMLElement): any; | ||
update(state: Partial<State<M, B>>): void; | ||
@@ -35,0 +34,0 @@ unmount(): void; |
@@ -101,3 +101,3 @@ function _classPrivateFieldLooseBase(e, t) { if (!{}.hasOwnProperty.call(e, t)) throw new TypeError("attempted to use private field on non-instance"); return e; } | ||
if (!this.uppy.getPlugin(this.id)) return; | ||
render(this.render(state), uppyRootElement); | ||
render(this.render(state, uppyRootElement), uppyRootElement); | ||
this.afterUpdate(); | ||
@@ -112,3 +112,3 @@ }); | ||
} | ||
render(this.render(this.uppy.getState()), uppyRootElement); | ||
render(this.render(this.uppy.getState(), uppyRootElement), uppyRootElement); | ||
this.el = uppyRootElement; | ||
@@ -146,4 +146,7 @@ targetElement.appendChild(uppyRootElement); | ||
*/ | ||
render( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
render(state) { | ||
state, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
container) { | ||
throw new Error('Extend the render method to add your plugin to a DOM element'); | ||
@@ -150,0 +153,0 @@ } |
@@ -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.1.2" | ||
"version": "4.2.0" | ||
}; | ||
@@ -27,0 +27,0 @@ import locale from "./locale.js"; |
{ | ||
"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.1.2", | ||
"version": "4.2.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
/* eslint-disable class-methods-use-this */ | ||
import { render, type ComponentChild } from 'preact' | ||
import { render } from 'preact' | ||
import findDOMElement from '@uppy/utils/lib/findDOMElement' | ||
@@ -115,3 +115,3 @@ import getTextDirection from '@uppy/utils/lib/getTextDirection' | ||
if (!this.uppy.getPlugin(this.id)) return | ||
render(this.render(state), uppyRootElement) | ||
render(this.render(state, uppyRootElement), uppyRootElement) | ||
this.afterUpdate() | ||
@@ -131,3 +131,6 @@ }) | ||
render(this.render(this.uppy.getState()), uppyRootElement) | ||
render( | ||
this.render(this.uppy.getState(), uppyRootElement), | ||
uppyRootElement, | ||
) | ||
this.el = uppyRootElement | ||
@@ -181,4 +184,8 @@ targetElement.appendChild(uppyRootElement) | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
render(state: Record<string, unknown>): ComponentChild { | ||
render( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
state: Record<string, unknown>, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
container: HTMLElement, | ||
): any { | ||
throw new Error( | ||
@@ -185,0 +192,0 @@ 'Extend the render method to add your plugin to a DOM element', |
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
521527
8488