@ckeditor/ckeditor5-upload
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-beta.1
Changelog | ||
========= | ||
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-alpha.2...v1.0.0-beta.1) (2018-03-15) | ||
### Bug fixes | ||
* Fixed incorrect `ImageUploadButton` and `ImageUploadCommand` binding. Closes [#77](https://github.com/ckeditor/ckeditor5-upload/issues/77). Closes https://github.com/ckeditor/ckeditor5-ui/issues/357. ([d231ea6](https://github.com/ckeditor/ckeditor5-upload/commit/d231ea6)) | ||
### Other changes | ||
* Migrated package styles to PostCSS. Moved visual styles to `@ckeditor/ckeditor5-theme-lark` (see [ckeditor/ckeditor5-ui#144](https://github.com/ckeditor/ckeditor5-ui/issues/144)). ([faf6100](https://github.com/ckeditor/ckeditor5-upload/commit/faf6100)) | ||
* Moved the image upload plugins to the `@ckeditor/ckeditor5-image` package. Minor cleanup in the API. Closes [#22](https://github.com/ckeditor/ckeditor5-upload/issues/22). ([55697a9](https://github.com/ckeditor/ckeditor5-upload/commit/55697a9)) | ||
* Use post-fixer API. ([08e9d09](https://github.com/ckeditor/ckeditor5-upload/commit/08e9d09)) | ||
### BREAKING CHANGES | ||
* Renamed `Adapter` to `UploadAdapter`. | ||
* Removed `ImageUpload` plugin. It can be no found in ckeditor5-image repository. | ||
* Removed `ImageUploadEngine` plugin. It can be no found in ckeditor5-image repository. | ||
* Removed `ImageUploadProgress` plugin. It can be no found in ckeditor5-image repository. | ||
* Removed `ImageUploadButton` plugin. It can be no found in ckeditor5-image repository. | ||
* Renamed `FileRepository#createAdapter()` to `FileRepository#createUploadAdapter()`. | ||
* Renamed `filerepository-no-adapter` error to `filerepository-no-upload-adapter`. | ||
## [1.0.0-alpha.2](https://github.com/ckeditor/ckeditor5-upload/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2017-11-14) | ||
@@ -5,0 +28,0 @@ |
@@ -5,3 +5,3 @@ Software License Agreement | ||
**CKEditor 5 Upload Feature** – https://github.com/ckeditor/ckeditor5-upload <br> | ||
Copyright (c) 2003-2017, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved. | ||
@@ -8,0 +8,0 @@ Licensed under the terms of any of the following licenses at your choice: |
{ | ||
"name": "@ckeditor/ckeditor5-upload", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0-beta.1", | ||
"description": "Upload Feature for CKEditor 5.", | ||
@@ -10,22 +10,22 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-engine": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-ui": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-utils": "^1.0.0-alpha.2" | ||
"@ckeditor/ckeditor5-core": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-engine": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-ui": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-utils": "^1.0.0-beta.1" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-clipboard": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-editor-classic": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-enter": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-heading": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-image": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-list": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-paragraph": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-typing": "^1.0.0-alpha.2", | ||
"@ckeditor/ckeditor5-undo": "^1.0.0-alpha.2", | ||
"eslint": "^4.8.0", | ||
"eslint-config-ckeditor5": "^1.0.6", | ||
"@ckeditor/ckeditor5-basic-styles": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-clipboard": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-editor-classic": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-enter": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-heading": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-image": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-list": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-paragraph": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-typing": "^1.0.0-beta.1", | ||
"@ckeditor/ckeditor5-undo": "^1.0.0-beta.1", | ||
"eslint": "^4.15.0", | ||
"eslint-config-ckeditor5": "^1.0.7", | ||
"husky": "^0.14.3", | ||
"lint-staged": "^4.2.3" | ||
"lint-staged": "^6.0.0" | ||
}, | ||
@@ -32,0 +32,0 @@ "engines": { |
@@ -7,3 +7,5 @@ CKEditor 5 file upload utilities | ||
[![Build Status](https://travis-ci.org/ckeditor/ckeditor5-upload.svg)](https://travis-ci.org/ckeditor/ckeditor5-upload) | ||
[![Test Coverage](https://codeclimate.com/github/ckeditor/ckeditor5-upload/badges/coverage.svg)](https://codeclimate.com/github/ckeditor/ckeditor5-upload/coverage) | ||
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0)](https://www.browserstack.com/automate/public-build/d3hvenZqQVZERFQ5d09FWXdyT0ozVXhLaVltRFRjTTUyZGpvQWNmWVhUUT0tLUZqNlJ1YWRUd0RvdEVOaEptM1B2Q0E9PQ==--c9d3dee40b9b4471ff3fb516d9ecf8d09292c7e0) | ||
[![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5-upload/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5-upload?branch=master) | ||
<br> | ||
[![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-upload/status.svg)](https://david-dm.org/ckeditor/ckeditor5-upload) | ||
@@ -10,0 +12,0 @@ [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-upload/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-upload?type=dev) |
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
@@ -19,2 +19,5 @@ */ | ||
export default class FileReader { | ||
/** | ||
* Creates an instance of the FileReader. | ||
*/ | ||
constructor() { | ||
@@ -21,0 +24,0 @@ const reader = new window.FileReader(); |
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
@@ -29,4 +29,4 @@ */ | ||
* {@link module:adapter-ckfinder/uploadadapter~CKFinderUploadAdapter}) or write your own one | ||
* (which boils down to setting the {@link ~FileRepository#createAdapter} factory function – see | ||
* {@link module:upload/filerepository~Adapter `Adapter` interface} documentation). | ||
* (which boils down to setting the {@link ~FileRepository#createUploadAdapter} factory function – see | ||
* {@link module:upload/filerepository~UploadAdapter `UploadAdapter` interface} documentation). | ||
* | ||
@@ -60,9 +60,9 @@ * Then, you can use {@link module:upload/filerepository~FileRepository#createLoader `createLoader()`} and the returned | ||
* | ||
* It should return a new instance of {@link module:upload/filerepository~Adapter} that will be used to upload files. | ||
* It should return a new instance of {@link module:upload/filerepository~UploadAdapter} that will be used to upload files. | ||
* {@link module:upload/filerepository~FileLoader} instance associated with the adapter | ||
* will be passed to that function. | ||
* | ||
* For more information and example see {@link module:upload/filerepository~Adapter}. | ||
* For more information and example see {@link module:upload/filerepository~UploadAdapter}. | ||
* | ||
* @member {Function} #createAdapter | ||
* @member {Function} #createUploadAdapter | ||
*/ | ||
@@ -125,3 +125,3 @@ | ||
* | ||
* Requires {@link #createAdapter} factory to be defined. | ||
* Requires {@link #createUploadAdapter} factory to be defined. | ||
* | ||
@@ -132,3 +132,3 @@ * @param {File} file Native File object. | ||
createLoader( file ) { | ||
if ( !this.createAdapter ) { | ||
if ( !this.createUploadAdapter ) { | ||
/** | ||
@@ -138,3 +138,3 @@ * You need to enable an upload adapter in order to be able to upload files. | ||
* This warning shows up when {@link module:upload/filerepository~FileRepository} is being used | ||
* without {@link #createAdapter definining an upload adapter}. | ||
* without {@link #createUploadAdapter definining an upload adapter}. | ||
* | ||
@@ -151,4 +151,4 @@ * **If you see this warning when using one of the {@glink builds/index CKEditor 5 Builds}** | ||
* **If you see this warning when using a custom build** there is a chance that you enabled | ||
* a feature like {@link module:upload/imageupload~ImageUpload}, | ||
* or {@link module:upload/imageuploadbutton~ImageUploadButton} but you did not enable any upload adapter. | ||
* a feature like {@link module:image/imageupload~ImageUpload}, | ||
* or {@link module:image/imageupload/imageuploadui~ImageUploadUI} but you did not enable any upload adapter. | ||
* You can choose one of the existing upload adapters: | ||
@@ -162,7 +162,7 @@ * | ||
* You can also implement your own upload adapter (in which case, please refer | ||
* to the {@link ~Adapter `Adapter` interface} documentation). | ||
* to the {@link module:upload/filerepository~UploadAdapter `UploadAdapter` interface} documentation). | ||
* | ||
* @error filerepository-no-adapter | ||
* @error filerepository-no-upload-adapter | ||
*/ | ||
log.error( 'filerepository-no-adapter: Upload adapter is not defined.' ); | ||
log.error( 'filerepository-no-upload-adapter: Upload adapter is not defined.' ); | ||
@@ -173,3 +173,3 @@ return null; | ||
const loader = new FileLoader( file ); | ||
loader._adapter = this.createAdapter( loader ); | ||
loader._adapter = this.createUploadAdapter( loader ); | ||
@@ -229,3 +229,3 @@ this.loaders.add( loader ); | ||
* @param {File} file A native file instance. | ||
* @param {module:upload/filerepository~Adapter} adapter | ||
* @param {module:upload/filerepository~UploadAdapter} adapter | ||
*/ | ||
@@ -253,3 +253,3 @@ constructor( file, adapter ) { | ||
* @private | ||
* @member {module:upload/filerepository~Adapter} | ||
* @member {module:upload/filerepository~UploadAdapter} | ||
*/ | ||
@@ -378,3 +378,3 @@ this._adapter = adapter; | ||
/** | ||
* Reads file using the provided {@link module:upload/filerepository~Adapter}. | ||
* Reads file using the provided {@link module:upload/filerepository~UploadAdapter}. | ||
* | ||
@@ -457,3 +457,3 @@ * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `filerepository-upload-wrong-status` when status | ||
/** | ||
* Adapter interface used by FileRepository to handle file upload. Adapter is a bridge between the editor and server that | ||
* Upload adapter interface used by FileRepository to handle file upload. Upload adapter is a bridge between the editor and server that | ||
* handles file uploads. It should contain logic necessary to initiate upload process and monitor its progress. | ||
@@ -463,8 +463,8 @@ * | ||
* | ||
* * {@link module:upload/filerepository~Adapter#upload `upload()`}, | ||
* * {@link module:upload/filerepository~Adapter#abort `abort()`}. | ||
* * {@link module:upload/filerepository~UploadAdapter#upload `upload()`}, | ||
* * {@link module:upload/filerepository~UploadAdapter#abort `abort()`}. | ||
* | ||
* Example adapter implementation: | ||
* Example upload adapter implementation: | ||
* | ||
* class Adapter { | ||
* class UploadAdapter { | ||
* constructor( loader ) { | ||
@@ -492,9 +492,9 @@ * // Save Loader instance to update upload progress. | ||
* | ||
* Then adapter can be set to be used by {@link module:upload/filerepository~FileRepository FileRepository}: | ||
* Then upload adapter can be set to be used by {@link module:upload/filerepository~FileRepository FileRepository}: | ||
* | ||
* editor.plugins.get( 'FileRepository' ).createAdapter = function( loader ) { | ||
* return new Adapter( loader ); | ||
* editor.plugins.get( 'FileRepository' ).createUploadAdapter = function( loader ) { | ||
* return new UploadAdapter( loader ); | ||
* }; | ||
* | ||
* @interface Adapter | ||
* @interface UploadAdapter | ||
*/ | ||
@@ -525,6 +525,6 @@ | ||
* | ||
* Take a look at {@link module:upload/filerepository~Adapter example Adapter implementation} and | ||
* {@link module:upload/filerepository~FileRepository#createAdapter createAdapter method}. | ||
* Take a look at {@link module:upload/filerepository~UploadAdapter example Adapter implementation} and | ||
* {@link module:upload/filerepository~FileRepository#createUploadAdapter createUploadAdapter method}. | ||
* | ||
* @method module:upload/filerepository~Adapter#upload | ||
* @method module:upload/filerepository~UploadAdapter#upload | ||
* @returns {Promise} Promise that should be resolved when data is uploaded. | ||
@@ -537,6 +537,6 @@ */ | ||
* | ||
* Take a look at {@link module:upload/filerepository~Adapter example Adapter implementation} and | ||
* {@link module:upload/filerepository~FileRepository#createAdapter createAdapter method}. | ||
* Take a look at {@link module:upload/filerepository~UploadAdapter example Adapter implementation} and | ||
* {@link module:upload/filerepository~FileRepository#createUploadAdapter createUploadAdapter method}. | ||
* | ||
* @method module:upload/filerepository~Adapter#abort | ||
* @method module:upload/filerepository~UploadAdapter#abort | ||
*/ |
/** | ||
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
* @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved. | ||
* For licensing, see LICENSE.md. | ||
@@ -4,0 +4,0 @@ */ |
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
22
33253
7
712