@ckeditor/ckeditor5-cloud-services 40.1.0 → 41.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -20
- package/LICENSE.md +1 -1
- package/build/cloud-services.js +1 -1
- package/package.json +3 -2
- package/src/augmentation.d.ts +2 -2
- package/src/augmentation.js +1 -1
- package/src/cloudservices.d.ts +5 -5
- package/src/cloudservices.js +4 -4
- package/src/cloudservicesconfig.d.ts +2 -2
- package/src/cloudservicesconfig.js +1 -1
- package/src/cloudservicescore.d.ts +5 -5
- package/src/cloudservicescore.js +4 -4
- package/src/index.d.ts +8 -8
- package/src/index.js +4 -4
- package/src/token/token.d.ts +4 -4
- package/src/token/token.js +2 -2
- package/src/uploadgateway/fileuploader.d.ts +5 -5
- package/src/uploadgateway/fileuploader.js +2 -2
- package/src/uploadgateway/uploadgateway.d.ts +3 -3
- package/src/uploadgateway/uploadgateway.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,90 +5,90 @@ All changes in the package are documented in the main repository. See: https://g
|
|
|
5
5
|
|
|
6
6
|
Changes for the past releases are available below.
|
|
7
7
|
|
|
8
|
-
## [19.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v18.0.0...v19.0.0) (2020
|
|
8
|
+
## [19.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v18.0.0...v19.0.0) (April 29, 2020)
|
|
9
9
|
|
|
10
10
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
## [18.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v17.0.0...v18.0.0) (2020
|
|
13
|
+
## [18.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v17.0.0...v18.0.0) (March 19, 2020)
|
|
14
14
|
|
|
15
15
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
## [17.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v16.0.0...v17.0.0) (2020
|
|
18
|
+
## [17.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v16.0.0...v17.0.0) (February 19, 2020)
|
|
19
19
|
|
|
20
20
|
### Other changes
|
|
21
21
|
|
|
22
22
|
* Changed the `CloudServices` plugin to a context plugin. Part of [ckeditor/ckeditor5#5891](https://github.com/ckeditor/ckeditor5/issues/5891). ([12ca96d](https://github.com/ckeditor/ckeditor5-cloud-services/commit/12ca96d))
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
## [16.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v15.0.0...v16.0.0) (2019
|
|
25
|
+
## [16.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v15.0.0...v16.0.0) (December 4, 2019)
|
|
26
26
|
|
|
27
27
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
## [15.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.5...v15.0.0) (2019
|
|
30
|
+
## [15.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.5...v15.0.0) (October 23, 2019)
|
|
31
31
|
|
|
32
32
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
## [11.0.5](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.4...v11.0.5) (2019
|
|
35
|
+
## [11.0.5](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.4...v11.0.5) (August 26, 2019)
|
|
36
36
|
|
|
37
37
|
### Other changes
|
|
38
38
|
|
|
39
39
|
* The issue tracker for this package was moved to https://github.com/ckeditor/ckeditor5/issues. See [ckeditor/ckeditor5#1988](https://github.com/ckeditor/ckeditor5/issues/1988). ([566b650](https://github.com/ckeditor/ckeditor5-cloud-services/commit/566b650))
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
## [11.0.4](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.3...v11.0.4) (2019
|
|
42
|
+
## [11.0.4](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.3...v11.0.4) (July 10, 2019)
|
|
43
43
|
|
|
44
44
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
## [11.0.3](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.2...v11.0.3) (2019
|
|
47
|
+
## [11.0.3](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.2...v11.0.3) (July 4, 2019)
|
|
48
48
|
|
|
49
49
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
## [11.0.2](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.1...v11.0.2) (2019
|
|
52
|
+
## [11.0.2](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.1...v11.0.2) (June 6, 2019)
|
|
53
53
|
|
|
54
54
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
## [11.0.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.0...v11.0.1) (2019
|
|
57
|
+
## [11.0.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v11.0.0...v11.0.1) (April 4, 2019)
|
|
58
58
|
|
|
59
59
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
## [11.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.1.1...v11.0.0) (2019
|
|
62
|
+
## [11.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.1.1...v11.0.0) (February 28, 2019)
|
|
63
63
|
|
|
64
64
|
### BREAKING CHANGES
|
|
65
65
|
|
|
66
66
|
* Upgraded minimal versions of Node to `8.0.0` and npm to `5.7.1`. See: [ckeditor/ckeditor5#1507](https://github.com/ckeditor/ckeditor5/issues/1507). ([612ea3c](https://github.com/ckeditor/ckeditor5-cloud-services/commit/612ea3c))
|
|
67
67
|
|
|
68
68
|
|
|
69
|
-
## [10.1.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.1.0...v10.1.1) (2018
|
|
69
|
+
## [10.1.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.1.0...v10.1.1) (December 5, 2018)
|
|
70
70
|
|
|
71
71
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
## [10.1.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.0.2...v10.1.0) (2018
|
|
74
|
+
## [10.1.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.0.2...v10.1.0) (October 8, 2018)
|
|
75
75
|
|
|
76
76
|
### Features
|
|
77
77
|
|
|
78
78
|
* The `config.cloudService.tokenUrl` will now accept a callback (in addition to accepting a string).
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
## [10.0.2](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.0.1...v10.0.2) (2018
|
|
81
|
+
## [10.0.2](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.0.1...v10.0.2) (July 18, 2018)
|
|
82
82
|
|
|
83
83
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
## [10.0.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.0.0...v10.0.1) (2018
|
|
86
|
+
## [10.0.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v10.0.0...v10.0.1) (June 21, 2018)
|
|
87
87
|
|
|
88
88
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
89
89
|
|
|
90
90
|
|
|
91
|
-
## [10.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-beta.4...v10.0.0) (2018
|
|
91
|
+
## [10.0.0](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-beta.4...v10.0.0) (April 25, 2018)
|
|
92
92
|
|
|
93
93
|
### Other changes
|
|
94
94
|
|
|
@@ -99,19 +99,19 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
99
99
|
* The license under which CKEditor 5 is released has been changed from a triple GPL, LGPL and MPL license to a GPL2+ only. See [ckeditor/ckeditor5#991](https://github.com/ckeditor/ckeditor5/issues/991) for more information.
|
|
100
100
|
|
|
101
101
|
|
|
102
|
-
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-beta.2...v1.0.0-beta.4) (2018
|
|
102
|
+
## [1.0.0-beta.4](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-beta.2...v1.0.0-beta.4) (April 19, 2018)
|
|
103
103
|
|
|
104
104
|
Internal changes only (updated dependencies, documentation, etc.).
|
|
105
105
|
|
|
106
106
|
|
|
107
|
-
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2018
|
|
107
|
+
## [1.0.0-beta.2](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-beta.1...v1.0.0-beta.2) (April 10, 2018)
|
|
108
108
|
|
|
109
109
|
### Other changes
|
|
110
110
|
|
|
111
111
|
* `@ckeditor/ckeditor5-cloudservices` was renamed to `@ckeditor/ckeditor5-cloud-services` and `@ckeditor/ckeditor-cloudservices-core` to `@ckeditor/ckeditor-cloud-services-core`. ([8182343](https://github.com/ckeditor/ckeditor5-cloud-services/commit/8182343))
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-alpha.1...v1.0.0-beta.1) (2018
|
|
114
|
+
## [1.0.0-beta.1](https://github.com/ckeditor/ckeditor5-cloud-services/compare/v1.0.0-alpha.1...v1.0.0-beta.1) (March 15, 2018)
|
|
115
115
|
|
|
116
116
|
### Other changes
|
|
117
117
|
|
|
@@ -122,7 +122,7 @@ Internal changes only (updated dependencies, documentation, etc.).
|
|
|
122
122
|
* The `config.cloudServices.uploadUrl` needs to be defined to your organization's CKEditor Cloud Services upload URL.
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
## 1.0.0-alpha.1 (2017
|
|
125
|
+
## 1.0.0-alpha.1 (November 14, 2017)
|
|
126
126
|
|
|
127
127
|
### Features
|
|
128
128
|
|
package/LICENSE.md
CHANGED
|
@@ -2,7 +2,7 @@ Software License Agreement
|
|
|
2
2
|
==========================
|
|
3
3
|
|
|
4
4
|
**CKEditor 5 Cloud Services integration** – https://github.com/ckeditor/ckeditor5-cloud-services <br>
|
|
5
|
-
Copyright (c) 2003–
|
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
|
6
6
|
|
|
7
7
|
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
|
8
8
|
|
package/build/cloud-services.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/(()=>{var e={704:(e,t,r)=>{e.exports=r(79)("./src/core.js")},209:(e,t,r)=>{e.exports=r(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(s){var o=t[s];if(void 0!==o)return o.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,r),n.exports}r.d=(e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{"use strict";r.r(s),r.d(s,{CloudServices:()=>d,CloudServicesCore:()=>h});var e=r(704),t=r(209);const o={autoRefresh:!0},n=36e5;class i extends((0,t.ObservableMixin)()){constructor(e,r={}){if(super(),!e)throw new t.CKEditorError("token-missing-token-url",this);r.initValue&&this._validateTokenValue(r.initValue),this.set("value",r.initValue),this._refresh="function"==typeof e?e:()=>{return r=e,new Promise(((e,s)=>{const o=new XMLHttpRequest;o.open("GET",r),o.addEventListener("load",(()=>{const r=o.status,n=o.response;return r<200||r>299?s(new t.CKEditorError("token-cannot-download-new-token",null)):e(n)})),o.addEventListener("error",(()=>s(new Error("Network Error")))),o.addEventListener("abort",(()=>s(new Error("Abort")))),o.send()}));var r},this._options={...o,...r}}init(){return new Promise(((e,t)=>{this.value?(this._options.autoRefresh&&this._registerRefreshTokenTimeout(),e(this)):this.refreshToken().then(e).catch(t)}))}refreshToken(){return this._refresh().then((e=>(this._validateTokenValue(e),this.set("value",e),this._options.autoRefresh&&this._registerRefreshTokenTimeout(),this)))}destroy(){clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(e){const r="string"==typeof e,s=!/^".*"$/.test(e),o=r&&3===e.split(".").length;if(!s||!o)throw new t.CKEditorError("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(){const e=this._getTokenRefreshTimeoutTime();clearTimeout(this._tokenRefreshTimeout),this._tokenRefreshTimeout=setTimeout((()=>{this.refreshToken()}),e)}_getTokenRefreshTimeoutTime(){try{const[,e]=this.value.split("."),{exp:t}=JSON.parse(atob(e));if(!t)return n;return Math.floor((1e3*t-Date.now())/2)}catch(e){return n}}static create(e,t={}){return new i(e,t).init()}}const a=/^data:(\S*?);base64,/;class u extends((0,t.EmitterMixin)()){constructor(e,r,s){if(super(),!e)throw new t.CKEditorError("fileuploader-missing-file",null);if(!r)throw new t.CKEditorError("fileuploader-missing-token",null);if(!s)throw new t.CKEditorError("fileuploader-missing-api-address",null);this.file=function(e){if("string"!=typeof e)return!1;const t=e.match(a);return!(!t||!t.length)}(e)?function(e,r=512){try{const t=e.match(a)[1],s=atob(e.replace(a,"")),o=[];for(let e=0;e<s.length;e+=r){const t=s.slice(e,e+r),n=new Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);o.push(new Uint8Array(n))}return new Blob(o,{type:t})}catch(e){throw new t.CKEditorError("fileuploader-decoding-image-data-error",null)}}(e):e,this._token=r,this._apiAddress=s}onProgress(e){return this.on("progress",((t,r)=>e(r))),this}onError(e){return this.once("error",((t,r)=>e(r))),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){const e=this.xhr,t=e=>()=>this.fire("error",e);e.addEventListener("error",t("Network Error")),e.addEventListener("abort",t("Abort")),e.upload&&e.upload.addEventListener("progress",(e=>{e.lengthComputable&&this.fire("progress",{total:e.total,uploaded:e.loaded})})),e.addEventListener("load",(()=>{const t=e.status,r=e.response;if(t<200||t>299)return this.fire("error",r.message||r.error)}))}_sendRequest(){const e=new FormData,r=this.xhr;return e.append("file",this.file),new Promise(((s,o)=>{r.addEventListener("load",(()=>{const e=r.status,n=r.response;return e<200||e>299?n.message?o(new t.CKEditorError("fileuploader-uploading-data-failed",this,{message:n.message})):o(n.error):s(n)})),r.addEventListener("error",(()=>o(new Error("Network Error")))),r.addEventListener("abort",(()=>o(new Error("Abort")))),r.send(e)}))}}class l{constructor(e,r){if(!e)throw new t.CKEditorError("uploadgateway-missing-token",null);if(!r)throw new t.CKEditorError("uploadgateway-missing-api-address",null);this._token=e,this._apiAddress=r}upload(e){return new u(e,this._token,this._apiAddress)}}class h extends e.ContextPlugin{static get pluginName(){return"CloudServicesCore"}createToken(e,t){return new i(e,t)}createUploadGateway(e,t){return new l(e,t)}}class d extends e.ContextPlugin{constructor(){super(...arguments),this.token=null,this._tokens=new Map}static get pluginName(){return"CloudServices"}static get requires(){return[h]}async init(){const e=this.context.config.get("cloudServices")||{};for(const[t,r]of Object.entries(e))this[t]=r;if(!this.tokenUrl)return void(this.token=null);const t=this.context.plugins.get("CloudServicesCore");this.token=await t.createToken(this.tokenUrl).init(),this._tokens.set(this.tokenUrl,this.token)}async registerTokenUrl(e){if(this._tokens.has(e))return this.getTokenFor(e);const t=this.context.plugins.get("CloudServicesCore"),r=await t.createToken(e).init();return this._tokens.set(e,r),r}getTokenFor(e){const r=this._tokens.get(e);if(!r)throw new t.CKEditorError("cloudservices-token-not-registered",this);return r}destroy(){super.destroy();for(const e of this._tokens.values())e.destroy()}}})(),(window.CKEditor5=window.CKEditor5||{}).cloudServices=s})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-cloud-services",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"description": "CKEditor 5's Cloud Services integration layer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
"ckeditor5-lib",
|
|
10
10
|
"ckeditor5-dll"
|
|
11
11
|
],
|
|
12
|
+
"type": "module",
|
|
12
13
|
"main": "src/index.js",
|
|
13
14
|
"dependencies": {
|
|
14
|
-
"ckeditor5": "
|
|
15
|
+
"ckeditor5": "41.0.0"
|
|
15
16
|
},
|
|
16
17
|
"author": "CKSource (http://cksource.com/)",
|
|
17
18
|
"license": "GPL-2.0-or-later",
|
package/src/augmentation.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { CloudServices, CloudServicesConfig, CloudServicesCore } from './index';
|
|
5
|
+
import type { CloudServices, CloudServicesConfig, CloudServicesCore } from './index.js';
|
|
6
6
|
declare module '@ckeditor/ckeditor5-core' {
|
|
7
7
|
interface EditorConfig {
|
|
8
8
|
/**
|
package/src/augmentation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
export {};
|
package/src/cloudservices.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/cloudservices
|
|
7
7
|
*/
|
|
8
|
-
import { ContextPlugin } from 'ckeditor5/src/core';
|
|
9
|
-
import CloudServicesCore from './cloudservicescore';
|
|
10
|
-
import type { CloudServicesConfig, TokenUrl } from './cloudservicesconfig';
|
|
11
|
-
import type { InitializedToken } from './token/token';
|
|
8
|
+
import { ContextPlugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import CloudServicesCore from './cloudservicescore.js';
|
|
10
|
+
import type { CloudServicesConfig, TokenUrl } from './cloudservicesconfig.js';
|
|
11
|
+
import type { InitializedToken } from './token/token.js';
|
|
12
12
|
/**
|
|
13
13
|
* Plugin introducing the integration between CKEditor 5 and CKEditor Cloud Services .
|
|
14
14
|
*
|
package/src/cloudservices.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/cloudservices
|
|
7
7
|
*/
|
|
8
|
-
import { ContextPlugin } from 'ckeditor5/src/core';
|
|
9
|
-
import { CKEditorError } from 'ckeditor5/src/utils';
|
|
10
|
-
import CloudServicesCore from './cloudservicescore';
|
|
8
|
+
import { ContextPlugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { CKEditorError } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import CloudServicesCore from './cloudservicescore.js';
|
|
11
11
|
/**
|
|
12
12
|
* Plugin introducing the integration between CKEditor 5 and CKEditor Cloud Services .
|
|
13
13
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -33,7 +33,7 @@ export interface CloudServicesConfig {
|
|
|
33
33
|
* As a string, it should be a URL to the security token endpoint in your application.
|
|
34
34
|
* The role of this endpoint is to securely authorize
|
|
35
35
|
* the end users of your application to use [CKEditor Cloud Services](https://ckeditor.com/ckeditor-cloud-services) only
|
|
36
|
-
* if they should have access e.g. to upload files with {@glink
|
|
36
|
+
* if they should have access e.g. to upload files with {@glink features/file-management/ckbox CKBox} or to use the
|
|
37
37
|
* {@glink @cs guides/collaboration/quick-start Collaboration} service.
|
|
38
38
|
*
|
|
39
39
|
* ```ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/cloudservicescore
|
|
7
7
|
*/
|
|
8
|
-
import { ContextPlugin } from 'ckeditor5/src/core';
|
|
9
|
-
import type { TokenUrl } from './cloudservicesconfig';
|
|
10
|
-
import Token, { type InitializedToken, type TokenOptions } from './token/token';
|
|
11
|
-
import UploadGateway from './uploadgateway/uploadgateway';
|
|
8
|
+
import { ContextPlugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import type { TokenUrl } from './cloudservicesconfig.js';
|
|
10
|
+
import Token, { type InitializedToken, type TokenOptions } from './token/token.js';
|
|
11
|
+
import UploadGateway from './uploadgateway/uploadgateway.js';
|
|
12
12
|
/**
|
|
13
13
|
* The `CloudServicesCore` plugin exposes the base API for communication with CKEditor Cloud Services.
|
|
14
14
|
*/
|
package/src/cloudservicescore.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/cloudservicescore
|
|
7
7
|
*/
|
|
8
|
-
import { ContextPlugin } from 'ckeditor5/src/core';
|
|
9
|
-
import Token from './token/token';
|
|
10
|
-
import UploadGateway from './uploadgateway/uploadgateway';
|
|
8
|
+
import { ContextPlugin } from 'ckeditor5/src/core.js';
|
|
9
|
+
import Token from './token/token.js';
|
|
10
|
+
import UploadGateway from './uploadgateway/uploadgateway.js';
|
|
11
11
|
/**
|
|
12
12
|
* The `CloudServicesCore` plugin exposes the base API for communication with CKEditor Cloud Services.
|
|
13
13
|
*/
|
package/src/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services
|
|
7
7
|
*/
|
|
8
|
-
export { default as CloudServices } from './cloudservices';
|
|
9
|
-
export { default as CloudServicesCore } from './cloudservicescore';
|
|
10
|
-
export { TokenUrl, type CloudServicesConfig } from './cloudservicesconfig';
|
|
11
|
-
export type { default as Token, InitializedToken } from './token/token';
|
|
12
|
-
export type { default as UploadGateway } from './uploadgateway/uploadgateway';
|
|
13
|
-
export type { default as FileUploader } from './uploadgateway/fileuploader';
|
|
14
|
-
import './augmentation';
|
|
8
|
+
export { default as CloudServices } from './cloudservices.js';
|
|
9
|
+
export { default as CloudServicesCore } from './cloudservicescore.js';
|
|
10
|
+
export { TokenUrl, type CloudServicesConfig } from './cloudservicesconfig.js';
|
|
11
|
+
export type { default as Token, InitializedToken } from './token/token.js';
|
|
12
|
+
export type { default as UploadGateway } from './uploadgateway/uploadgateway.js';
|
|
13
|
+
export type { default as FileUploader } from './uploadgateway/fileuploader.js';
|
|
14
|
+
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services
|
|
7
7
|
*/
|
|
8
|
-
export { default as CloudServices } from './cloudservices';
|
|
9
|
-
export { default as CloudServicesCore } from './cloudservicescore';
|
|
10
|
-
import './augmentation';
|
|
8
|
+
export { default as CloudServices } from './cloudservices.js';
|
|
9
|
+
export { default as CloudServicesCore } from './cloudservicescore.js';
|
|
10
|
+
import './augmentation.js';
|
package/src/token/token.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import type { TokenUrl } from '../cloudservicesconfig';
|
|
5
|
+
import type { TokenUrl } from '../cloudservicesconfig.js';
|
|
6
6
|
declare const Token_base: {
|
|
7
|
-
new (): import("ckeditor5/src/utils").Observable;
|
|
8
|
-
prototype: import("ckeditor5/src/utils").Observable;
|
|
7
|
+
new (): import("ckeditor5/src/utils.js").Observable;
|
|
8
|
+
prototype: import("ckeditor5/src/utils.js").Observable;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
11
|
* Class representing the token used for communication with CKEditor Cloud Services.
|
package/src/token/token.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/token/token
|
|
7
7
|
*/
|
|
8
8
|
/* globals XMLHttpRequest, setTimeout, clearTimeout, atob */
|
|
9
|
-
import { ObservableMixin, CKEditorError } from 'ckeditor5/src/utils';
|
|
9
|
+
import { ObservableMixin, CKEditorError } from 'ckeditor5/src/utils.js';
|
|
10
10
|
const DEFAULT_OPTIONS = { autoRefresh: true };
|
|
11
11
|
const DEFAULT_TOKEN_REFRESH_TIMEOUT_TIME = 3600000;
|
|
12
12
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/uploadgateway/fileuploader
|
|
7
7
|
*/
|
|
8
|
-
import type { UploadResponse } from 'ckeditor5/src/upload';
|
|
9
|
-
import type { InitializedToken } from '../token/token';
|
|
8
|
+
import type { UploadResponse } from 'ckeditor5/src/upload.js';
|
|
9
|
+
import type { InitializedToken } from '../token/token.js';
|
|
10
10
|
declare const FileUploader_base: {
|
|
11
|
-
new (): import("ckeditor5/src/utils").Emitter;
|
|
12
|
-
prototype: import("ckeditor5/src/utils").Emitter;
|
|
11
|
+
new (): import("ckeditor5/src/utils.js").Emitter;
|
|
12
|
+
prototype: import("ckeditor5/src/utils.js").Emitter;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* FileUploader class used to upload single file.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { EmitterMixin, CKEditorError } from 'ckeditor5/src/utils';
|
|
5
|
+
import { EmitterMixin, CKEditorError } from 'ckeditor5/src/utils.js';
|
|
6
6
|
const BASE64_HEADER_REG_EXP = /^data:(\S*?);base64,/;
|
|
7
7
|
/**
|
|
8
8
|
* FileUploader class used to upload single file.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/uploadgateway/uploadgateway
|
|
7
7
|
*/
|
|
8
|
-
import FileUploader from './fileuploader';
|
|
9
|
-
import type { InitializedToken } from '../token/token';
|
|
8
|
+
import FileUploader from './fileuploader.js';
|
|
9
|
+
import type { InitializedToken } from '../token/token.js';
|
|
10
10
|
/**
|
|
11
11
|
* UploadGateway abstracts file uploads to CKEditor Cloud Services.
|
|
12
12
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Copyright (c) 2003-
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @module cloud-services/uploadgateway/uploadgateway
|
|
7
7
|
*/
|
|
8
|
-
import FileUploader from './fileuploader';
|
|
9
|
-
import { CKEditorError } from 'ckeditor5/src/utils';
|
|
8
|
+
import FileUploader from './fileuploader.js';
|
|
9
|
+
import { CKEditorError } from 'ckeditor5/src/utils.js';
|
|
10
10
|
/**
|
|
11
11
|
* UploadGateway abstracts file uploads to CKEditor Cloud Services.
|
|
12
12
|
*/
|