Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@filerobot/core

Package Overview
Dependencies
Maintainers
1
Versions
1492
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@filerobot/core - npm Package Compare versions

Comparing version 0.0.0-beta.33 to 0.0.0-beta.34

6

package.json
{
"name": "@filerobot/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.",
"version": "0.0.0-beta.33",
"version": "0.0.0-beta.34",
"license": "MIT",

@@ -15,4 +15,4 @@ "main": "lib/index.js",

"dependencies": {
"@filerobot/store-default": "0.0.0-beta.33",
"@filerobot/utils": "0.0.0-beta.33",
"@filerobot/store-default": "0.0.0-beta.34",
"@filerobot/utils": "0.0.0-beta.34",
"@scaleflex/icons": "^1.0.0-beta.5",

@@ -19,0 +19,0 @@ "@scaleflex/ui": "^1.0.0-beta.14",

@@ -35,3 +35,3 @@ # `@filerobot/core`

### Plugin's styles
### Module's styles

@@ -74,3 +74,3 @@ ```

**`id: string` *(optional)***
#### `id: string` *(optional)*

@@ -81,3 +81,3 @@ *default:* `'filerobot'`

**`autoProceed: boolean` *(optional)***
#### `autoProceed: boolean` *(optional)*

@@ -88,3 +88,3 @@ *default:* `false`

**`allowMultipleUploads: boolean` *(optional)***
#### `allowMultipleUploads: boolean` *(optional)*

@@ -95,3 +95,3 @@ *default:* `true`

**`debug: boolean` *(optional)***
#### `debug: boolean` *(optional)*

@@ -102,3 +102,3 @@ *default:* `false`

**`logger: object` *(optional)***
#### `logger: object` *(optional)*

@@ -117,3 +117,3 @@ *default:* `errors only logger`

**`restrictions: object` *(optional)***
#### `restrictions: object` *(optional)*

@@ -136,3 +136,3 @@ *default:*

**`onBeforeFileAdded: (currentFile, files) => ...` *(optional)***
#### `onBeforeFileAdded: (currentFile, files) => ...` *(optional)*

@@ -147,3 +147,3 @@ *default:* `(currentFile, files) => currentFile`

**`onBeforeUpload: (files) => ...` *(optional)***
#### `onBeforeUpload: (files) => ...` *(optional)*

@@ -158,6 +158,5 @@ *default:* `onBeforeUpload: (files) => files`

**`locale: object` *(optional)***
#### `locale: object` *(optional)*
<!-- TODO: Adding all the locales or adding a link to them -->
*default:* default locales
*default:* [default locales](src/index.js#L40)

@@ -168,7 +167,7 @@ Customizing some of the translations or the language's strings and replace the default locale.

**`filerobot.getID()`**
#### `filerobot.getID()`
Gets the filerobot widget instance ID.
**`filerobot.use(plugin, pluignOptions)`**
#### `filerobot.use(plugin, pluignOptions)`

@@ -187,14 +186,13 @@ Adds a filerobot's plugin to the filerobot widget's instance with possibility to pass the pluign's options.

**`filerobot.getPlugin(pluginId)`**
#### `filerobot.getPlugin(pluginId)`
Returns the pluign instance with the provided id for accessing its methods & state.
**`filerobot.removePluign(pluginInstance)`**
#### `filerobot.removePluign(pluginInstance)`
Removes a current installed pluign by passing the pluign's instance that possible to be retrieved from `getPluign` method.
**`filerobot.setOptions(options)`**
#### `filerobot.setOptions(options)`
<!-- TODO: Add link -->
Changes the options of the widget so if you have specified some option at the instance of the widget and wants to change it after that, you could use this function to do that, also it is available to be called from [`getPlugin`](TBD) method to be utilized in changing some option of installed plugin.
Changes the options of the widget so if you have specified some option at the instance of the widget and wants to change it after that, you could use this function to do that, also it is available to be called from [`getPlugin`](#filerobotgetpluginpluginid) method to be utilized in changing some option of installed plugin.

@@ -225,22 +223,21 @@ example

**`filerobot.addFile(fileObject)`**
#### `filerobot.addFile(fileObject)`
Adds a file into the widget's state and returns the temp generated id for that file.
<!-- TODO: Add link -->
> Note: [restrictions](TBD) are checked & [onBeforeFileAdded](TBD) is called before adding the file.
> Note: [restrictions](#restrictions-object-optional) are checked & [onBeforeFileAdded](#onbeforefileadded-currentfile-files-optional) is called before adding the file.
**`filerobot.getFile(fileID)`**
#### `filerobot.getFile(fileID)`
Gets the file object using its ID.
**`filerobot.removeFile(fileID)`**
#### `filerobot.removeFile(fileID)`
Removes a file from the widget's state through its ID.
**`filerobot.getFiles()`**
#### `filerobot.getFiles()`
Returns all the files object of the widget.
**`filerobot.upload()`**
#### `filerobot.upload()`

@@ -251,48 +248,47 @@ An async function that starts uploading the files process, returns a promise resolved with an object `result: { successful, failed }` that contains:

**`filerobot.retryAll()`**
#### `filerobot.retryAll()`
Retries all the failed uploads to start re-uploading.
**`filerobot.retryUpload(fileID)`**
#### `filerobot.retryUpload(fileID)`
Retries a failed upload by the file ID.
**`filerobot.cancelAll()`**
#### `filerobot.cancelAll()`
Cancels all the uploads by removing all of theme and resetting the progress.
**`filerobot.setState(object)`**
#### `filerobot.setState(object)`
updates the internal state of the widget (not very useful for you).
**`filerobot.getState()`**
#### `filerobot.getState()`
Returns the internal state of the widget.
**`filerobot.setFileState(fileID, state)`**
#### `filerobot.setFileState(fileID, state)`
Adds a state into the file's object that's inside the files object of the internal widget's state.
**`filerobot.reset()`**
#### `filerobot.reset()`
Returns everything to the initial state of the widget ex. stops all the files uploading, reset their progress and removes all of them.
**`filerobot.close()`**
#### `filerobot.close()`
Removes all the installed plugins & closes the current widget's instance.
**`filerobot.on('event', handler)`**
#### `filerobot.on('event', handler)`
<!-- TODO: Add the link -->
Adds/Subscribe a handler/callback function to be called on emitting/firing the specified `filerobot event`, [full list of available events](TBD).
Adds/Subscribe a handler/callback function to be called on emitting/firing the specified `filerobot event`, [full list of available events](#events).
**`filerobot.once('event', handler)`**
#### `filerobot.once('event', handler)`
Same as `filerobot.on` but the handler is removed after being called once.
**`filerobot.off('event', handler)`**
#### `filerobot.off('event', handler)`
Un-subscribe/Removes the specified handler for filerobot's event.
**`filerobot.info(message, type, timeout)`**
#### `filerobot.info(message, type, timeout)`

@@ -305,6 +301,5 @@ Shows an informer with the specified message to the user:

**`filerobot.log(message, type)`**
#### `filerobot.log(message, type)`
<!-- TODO: add the link -->
Logs a message in the [`logger`](TBD):
Logs a message in the [`logger`](#logger-object-optional):
- **message** (*string* - required): the message would be logged/added/shown in the logger.

@@ -317,64 +312,64 @@ - **type** (*string* - optional): the type of that logged message whether `debug/info, warning or error`, default is `debug`.

**`files-added`**
#### `files-added`
TBD
**`file-added`**
#### `file-added`
TBD
**`file-removed`**
#### `file-removed`
TBD
**`upload`**
#### `upload`
TBD
**`restriction-failed`**
#### `restriction-failed`
TBD
**`upload-progress`**
#### `upload-progress`
TBD
**`upload-success`**
#### `upload-success`
TBD
**`upload-error`**
#### `upload-error`
TBD
**`upload-retry`**
#### `upload-retry`
TBD
**`progress`**
#### `progress`
TBD
**`cancel-all`**
#### `cancel-all`
TBD
**`complete`**
#### `complete`
TBD
**`error`**
#### `error`
TBD
**`reset-progress`**
#### `reset-progress`
TBD
**`info-visible`**
#### `info-visible`
TBD
**`info-hidden`**
#### `info-hidden`
TBD
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