@ckeditor/ckeditor5-ckfinder 41.1.0 → 41.2.1
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/build/ckfinder.js +1 -1
- package/lang/translations/he.po +1 -1
- package/package.json +2 -2
- package/src/ckfinderui.js +1 -2
package/build/ckfinder.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var e={
|
|
5
|
+
*/(()=>{var e={782:(e,i,t)=>{e.exports=t(237)("./src/core.js")},311:(e,i,t)=>{e.exports=t(237)("./src/ui.js")},584:(e,i,t)=>{e.exports=t(237)("./src/utils.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},i={};function t(n){var o=i[n];if(void 0!==o)return o.exports;var r=i[n]={exports:{}};return e[n](r,r.exports,t),r.exports}t.d=(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},t.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";t.r(n),t.d(n,{CKFinder:()=>c,CKFinderEditing:()=>d,CKFinderUI:()=>o});var e=t(782),i=t(311);class o extends e.Plugin{static get pluginName(){return"CKFinderUI"}init(){const t=this.editor,n=t.ui.componentFactory,o=t.t;if(n.add("ckfinder",(n=>{const r=t.commands.get("ckfinder"),s=new i.ButtonView(n);return s.set({label:o("Insert image or file"),icon:e.icons.browseFiles,tooltip:!0}),s.bind("isEnabled").to(r),s.on("execute",(()=>{t.execute("ckfinder"),t.editing.view.focus()})),s})),t.plugins.has("ImageInsertUI")){const i=t.plugins.get("ImageInsertUI");i.registerIntegration({name:"assetManager",observable:()=>t.commands.get("ckfinder"),buttonViewCreator:()=>{const t=this.editor.ui.componentFactory.create("ckfinder");return t.icon=e.icons.imageAssetManager,t.bind("label").to(i,"isImageSelected",(e=>o(e?"Replace image with file manager":"Insert image with file manager"))),t},formViewCreator:()=>{const t=this.editor.ui.componentFactory.create("ckfinder");return t.icon=e.icons.imageAssetManager,t.withText=!0,t.bind("label").to(i,"isImageSelected",(e=>o(e?"Replace with file manager":"Insert with file manager"))),t.on("execute",(()=>{i.dropdownView.isOpen=!1})),t}})}}}var r=t(584);class s extends e.Command{constructor(e){super(e),this.affectsData=!1,this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",(()=>this.refresh()),{priority:"low"})}refresh(){const e=this.editor.commands.get("insertImage"),i=this.editor.commands.get("link");this.isEnabled=e.isEnabled||i.isEnabled}execute(){const e=this.editor,i=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=i&&"modal"!=i)throw new r.CKEditorError("ckfinder-unknown-openermethod",e);const t=this.editor.config.get("ckfinder.options")||{};t.chooseFiles=!0;const n=t.onInit;t.language||(t.language=e.locale.uiLanguage),t.onInit=i=>{n&&n(i),i.on("files:choose",(t=>{const n=t.data.files.toArray(),o=n.filter((e=>!e.isImage())),r=n.filter((e=>e.isImage()));for(const i of o)e.execute("link",i.getUrl());const s=[];for(const e of r){const t=e.getUrl();s.push(t||i.request("file:getProxyUrl",{file:e}))}s.length&&a(e,s)})),i.on("file:choose:resizedImage",(i=>{const t=i.data.resizedUrl;if(t)a(e,[t]);else{const i=e.plugins.get("Notification"),t=e.locale.t;i.showWarning(t("Could not obtain resized image URL."),{title:t("Selecting resized image failed"),namespace:"ckfinder"})}}))},window.CKFinder[i](t)}}function a(e,i){if(e.commands.get("insertImage").isEnabled)e.execute("insertImage",{source:i});else{const i=e.plugins.get("Notification"),t=e.locale.t;i.showWarning(t("Could not insert image at the current position."),{title:t("Inserting image failed"),namespace:"ckfinder"})}}class d extends e.Plugin{static get pluginName(){return"CKFinderEditing"}static get requires(){return[i.Notification,"LinkEditing"]}init(){const e=this.editor;if(!e.plugins.has("ImageBlockEditing")&&!e.plugins.has("ImageInlineEditing"))throw new r.CKEditorError("ckfinder-missing-image-plugin",e);e.commands.add("ckfinder",new s(e))}}class c extends e.Plugin{static get pluginName(){return"CKFinder"}static get requires(){return["Link","CKFinderUploadAdapter",d,o]}}})(),(window.CKEditor5=window.CKEditor5||{}).ckfinder=n})();
|
package/lang/translations/he.po
CHANGED
|
@@ -14,7 +14,7 @@ msgid ""
|
|
|
14
14
|
msgstr ""
|
|
15
15
|
"Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
|
|
16
16
|
"Language: he\n"
|
|
17
|
-
"Plural-Forms: nplurals=
|
|
17
|
+
"Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
|
|
18
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
19
19
|
|
|
20
20
|
msgctxt "Toolbar button tooltip for inserting an image or file via a CKFinder file browser."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-ckfinder",
|
|
3
|
-
"version": "41.1
|
|
3
|
+
"version": "41.2.1",
|
|
4
4
|
"description": "CKFinder integration for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "src/index.js",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"ckeditor5": "41.1
|
|
16
|
+
"ckeditor5": "41.2.1"
|
|
17
17
|
},
|
|
18
18
|
"author": "CKSource (http://cksource.com/)",
|
|
19
19
|
"license": "GPL-2.0-or-later",
|
package/src/ckfinderui.js
CHANGED
|
@@ -41,10 +41,9 @@ export default class CKFinderUI extends Plugin {
|
|
|
41
41
|
});
|
|
42
42
|
if (editor.plugins.has('ImageInsertUI')) {
|
|
43
43
|
const imageInsertUI = editor.plugins.get('ImageInsertUI');
|
|
44
|
-
const command = editor.commands.get('ckfinder');
|
|
45
44
|
imageInsertUI.registerIntegration({
|
|
46
45
|
name: 'assetManager',
|
|
47
|
-
observable:
|
|
46
|
+
observable: () => editor.commands.get('ckfinder'),
|
|
48
47
|
buttonViewCreator: () => {
|
|
49
48
|
const button = this.editor.ui.componentFactory.create('ckfinder');
|
|
50
49
|
button.icon = icons.imageAssetManager;
|