github transloadit/uppy @uppy/components@2.1.0

3 hours ago

Minor Changes

  • 54d543c: Experimental manager mode is now headless: a file library renders it with useS3Manager. In manager mode the plugin no longer mounts into the Dashboard (no tab, no file drops, no reopenAfterUpload panel), and closing a Dashboard panel no longer resets its state or aborts its requests. useS3Manager warns when given a plugin in picker mode. Removed: the item detail dialog (opened by a click on a file) and S3's getPreviewUrl; the "Select multiple" toggle and the bulk-actions footer, with the selectionActive plugin state and ProviderView.toggleSelectionMode(); the core strings openFileNamed, itemsSelected, selectMultiple, cancelSelection, close, detailSize, detailType and detailModified; and the --uppy-color-secondary theming variable. useS3Manager and createS3ManagerController no longer have state.selectionActive or toggleSelectionMode(): a headless UI keeps its own selection mode and clears the selection with cancelSelection().

    The standalone option is removed: the Dashboard shows its "Import from …" bar with Cancel, and the panel its Log out row, again. TransloaditStorage plugins that relied on standalone for manager mode now start in picker mode: pass mode: 'manager'.

    With the panel gone, so is what only it needed: the progress screen's Stop button (and the stopOperation string), and the busy state that disabled the header, filter and breadcrumbs during a long operation. Long operations, their progress text and cancelLongOperation() remain for useS3Manager. Picker mode is unchanged, including the item menu, toolbar actions and dialogs that Transloadit Storage's picker actions use.

    If an app runs manager mode inside a Dashboard with @uppy/s3 0.1.x or @uppy/transloadit-storage 0.1.x, the panel will be empty once its ^6.2.0 range picks up @uppy/core 6.3. Those plugins stay on 0.1.x, because a caret range on a 0.x version doesn't cross minors. Nothing throws. Render manager mode with useS3Manager, or keep @uppy/core on 6.2 until then. Picker mode is unaffected.

  • a7a7997: Add an experimental useS3Manager hook and createS3ManagerController for @uppy/s3 (and @uppy/transloadit-storage) in manager mode, so apps can render their own file manager instead of the ProviderView UI. ProviderView now exposes submitDialog, cancelDialog, cancelLongOperation, canCancelOperation and getDetailItem for headless UIs, and toggleCheckbox takes the rows in the order the UI shows them for shift-click ranges. A range can span folders: each folder's checked state is recomputed.

    The hook and the controller are experimental: they can change incompatibly in a minor release of @uppy/react or @uppy/components. Pin them with ~ if you depend on them.

    In manager mode, selecting every loaded item of a folder no longer marks the folder as fully selected while it has more pages, so the next page doesn't come in selected and a bulk action can't reach files nobody saw.

Patch Changes

  • 715eb80: Move the source map of the minified CSS into a separate file. The .min.css files, and image-editor.css in @uppy/components, @uppy/react, @uppy/vue and @uppy/svelte, embedded it inline and were larger than the unminified CSS. They now link to an external .css.map instead, at about half the gzipped size.
  • 78970b1: Add a README, so the npm page is no longer empty.

Don't miss a new uppy release

NewReleases is sending notifications on new releases.