@ckeditor/ckeditor5-editor-balloon 31.1.0 → 32.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE.md CHANGED
@@ -2,7 +2,7 @@ Software License Agreement
2
2
  ==========================
3
3
 
4
4
  **Balloon editor implementation** – https://github.com/ckeditor/ckeditor5-editor-balloon <br>
5
- Copyright (c) 2003-2021, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
5
+ Copyright (c) 2003-2022, [CKSource](http://cksource.com) Holding sp. z o.o. 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
 
@@ -14,4 +14,4 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi
14
14
  Trademarks
15
15
  ----------
16
16
 
17
- **CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
17
+ **CKEditor** is a trademark of [CKSource](http://cksource.com) Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.
@@ -1,5 +1,4 @@
1
1
  /*!
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource - Frederico Knabben. All rights reserved.
3
3
  * For licensing, see LICENSE.md.
4
- */
5
- window.CKEditor5=window.CKEditor5||{},window.CKEditor5.editorBalloon=function(t){var e={};function r(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,o){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(o,n,function(e){return t[e]}.bind(null,n));return o},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([function(t,e,r){t.exports=r(3)("./src/core.js")},function(t,e,r){t.exports=r(3)("./src/ui.js")},function(t,e,r){t.exports=r(3)("./src/utils.js")},function(t,e){t.exports=CKEditor5.dll},function(t,e,r){t.exports=r(3)("./src/engine.js")},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(6))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";r.r(e),r.d(e,"BalloonEditor",(function(){return k}));var o=r(0),n=r(1),i=r(2);var c=function(t){return null!=t&&"object"==typeof t},s=r(5),a="object"==typeof self&&self&&self.Object===Object&&self,l=(s.a||a||Function("return this")()).Symbol,u=Object.prototype,d=u.hasOwnProperty,f=u.toString,b=l?l.toStringTag:void 0;var h=function(t){var e=d.call(t,b),r=t[b];try{t[b]=void 0;var o=!0}catch(t){}var n=f.call(t);return o&&(e?t[b]=r:delete t[b]),n},p=Object.prototype.toString;var g=function(t){return p.call(t)},m=l?l.toStringTag:void 0;var y=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":m&&m in Object(t)?h(t):g(t)};var j=function(t,e){return function(r){return t(e(r))}}(Object.getPrototypeOf,Object),w=Function.prototype,v=Object.prototype,O=w.toString,E=v.hasOwnProperty,x=O.call(Object);var T=function(t){if(!c(t)||"[object Object]"!=y(t))return!1;var e=j(t);if(null===e)return!0;var r=E.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&O.call(r)==x};var P=function(t){return c(t)&&1===t.nodeType&&!T(t)},S=r(4);class D extends o.EditorUI{constructor(t,e){super(t),this.view=e}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,r=t.plugins.get("BalloonToolbar"),o=t.editing.view,i=e.editable,c=o.document.getRoot();i.name=c.rootName,e.render();const s=i.element;this.setEditableElement(i.name,s),this.focusTracker.add(s),i.bind("isFocused").to(this.focusTracker),o.attachDomRoot(s),Object(n.enableToolbarKeyboardFocus)({origin:o,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:r.toolbarView,beforeFocus(){r.show()},afterBlur(){r.hide()}}),this._initPlaceholder(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initPlaceholder(){const t=this.editor,e=t.editing.view,r=e.document.getRoot(),o=t.sourceElement,n=t.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");n&&Object(S.enablePlaceholder)({view:e,element:r,text:n,isDirectHost:!1,keepOnFocus:!0})}}class F extends n.EditorUIView{constructor(t,e,r){super(t),this.editable=new n.InlineEditableUIView(t,e,r)}render(){super.render(),this.registerChild(this.editable)}}class k extends o.Editor{constructor(t,e){super(e),P(t)&&(this.sourceElement=t,Object(o.secureSourceElement)(this));const r=this.config.get("plugins");r.push(n.BalloonToolbar),this.config.set("plugins",r),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const i=new F(this.locale,this.editing.view,this.sourceElement);this.ui=new D(this,i),Object(o.attachToForm)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then(()=>{this.sourceElement&&Object(i.setDataInElement)(this.sourceElement,t)})}static create(t,e={}){return new Promise(r=>{const o=P(t);if(o&&"TEXTAREA"===t.tagName)throw new i.CKEditorError("editor-wrong-element",null);const n=new this(t,e);r(n.initPlugins().then(()=>{n.ui.init()}).then(()=>{if(!o&&e.initialData)throw new i.CKEditorError("editor-create-initial-data",null);const r=void 0!==e.initialData?e.initialData:function(t){return P(t)?Object(i.getDataFromElement)(t):t}(t);return n.data.init(r)}).then(()=>n.fire("ready")).then(()=>n))})}}Object(i.mix)(k,o.DataApiMixin),Object(i.mix)(k,o.ElementApiMixin)}]);
4
+ */(()=>{var t={704:(t,e,o)=>{t.exports=o(79)("./src/core.js")},492:(t,e,o)=>{t.exports=o(79)("./src/engine.js")},273:(t,e,o)=>{t.exports=o(79)("./src/ui.js")},209:(t,e,o)=>{t.exports=o(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r),o.d(r,{BalloonEditor:()=>F});var t=o(704),e=o(273),i=o(209);const n=function(t){return null!=t&&"object"==typeof t};const s="object"==typeof global&&global&&global.Object===Object&&global;var c="object"==typeof self&&self&&self.Object===Object&&self;const a=(s||c||Function("return this")()).Symbol;var l=Object.prototype,u=l.hasOwnProperty,d=l.toString,h=a?a.toStringTag:void 0;const b=function(t){var e=u.call(t,h),o=t[h];try{t[h]=void 0;var r=!0}catch(t){}var i=d.call(t);return r&&(e?t[h]=o:delete t[h]),i};var g=Object.prototype.toString;const p=function(t){return g.call(t)};var f=a?a.toStringTag:void 0;const m=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":f&&f in Object(t)?b(t):p(t)};const v=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object);var y=Function.prototype,w=Object.prototype,j=y.toString,E=w.hasOwnProperty,O=j.call(Object);const x=function(t){if(!n(t)||"[object Object]"!=m(t))return!1;var e=v(t);if(null===e)return!0;var o=E.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&j.call(o)==O};const T=function(t){return n(t)&&1===t.nodeType&&!x(t)};var P=o(492);class S extends t.EditorUI{constructor(t,e){super(t),this.view=e}get element(){return this.view.editable.element}init(){const t=this.editor,o=this.view,r=t.plugins.get("BalloonToolbar"),i=t.editing.view,n=o.editable,s=i.document.getRoot();n.name=s.rootName,o.render();const c=n.element;this.setEditableElement(n.name,c),this.focusTracker.add(c),n.bind("isFocused").to(this.focusTracker),i.attachDomRoot(c),(0,e.enableToolbarKeyboardFocus)({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:r.toolbarView,beforeFocus(){r.show()},afterBlur(){r.hide()}}),this._initPlaceholder(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),r=t.sourceElement,i=t.config.get("placeholder")||r&&"textarea"===r.tagName.toLowerCase()&&r.getAttribute("placeholder");i&&(0,P.enablePlaceholder)({view:e,element:o,text:i,isDirectHost:!1,keepOnFocus:!0})}}class D extends e.EditorUIView{constructor(t,o,r){super(t),this.editable=new e.InlineEditableUIView(t,o,r)}render(){super.render(),this.registerChild(this.editable)}}class F extends t.Editor{constructor(o,r){super(r),T(o)&&(this.sourceElement=o,(0,t.secureSourceElement)(this));const i=this.config.get("plugins");i.push(e.BalloonToolbar),this.config.set("plugins",i),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const n=new D(this.locale,this.editing.view,this.sourceElement);this.ui=new S(this,n),(0,t.attachToForm)(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&(0,i.setDataInElement)(this.sourceElement,t)}))}static create(t,e={}){return new Promise((o=>{const r=T(t);if(r&&"TEXTAREA"===t.tagName)throw new i.CKEditorError("editor-wrong-element",null);const n=new this(t,e);o(n.initPlugins().then((()=>{n.ui.init()})).then((()=>{if(!r&&e.initialData)throw new i.CKEditorError("editor-create-initial-data",null);const o=void 0!==e.initialData?e.initialData:function(t){return T(t)?(0,i.getDataFromElement)(t):t}(t);return n.data.init(o)})).then((()=>n.fire("ready"))).then((()=>n)))}))}}(0,i.mix)(F,t.DataApiMixin),(0,i.mix)(F,t.ElementApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorBalloon=r})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-editor-balloon",
3
- "version": "31.1.0",
3
+ "version": "32.0.0",
4
4
  "description": "Balloon editor implementation for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -11,27 +11,27 @@
11
11
  ],
12
12
  "main": "src/index.js",
13
13
  "dependencies": {
14
- "ckeditor5": "^31.1.0",
14
+ "ckeditor5": "^32.0.0",
15
15
  "lodash-es": "^4.17.15"
16
16
  },
17
17
  "devDependencies": {
18
- "@ckeditor/ckeditor5-basic-styles": "^31.1.0",
19
- "@ckeditor/ckeditor5-core": "^31.1.0",
20
- "@ckeditor/ckeditor5-dev-utils": "^26.0.0",
21
- "@ckeditor/ckeditor5-engine": "^31.1.0",
22
- "@ckeditor/ckeditor5-enter": "^31.1.0",
23
- "@ckeditor/ckeditor5-heading": "^31.1.0",
24
- "@ckeditor/ckeditor5-paragraph": "^31.1.0",
25
- "@ckeditor/ckeditor5-theme-lark": "^31.1.0",
26
- "@ckeditor/ckeditor5-typing": "^31.1.0",
27
- "@ckeditor/ckeditor5-ui": "^31.1.0",
28
- "@ckeditor/ckeditor5-undo": "^31.1.0",
29
- "@ckeditor/ckeditor5-utils": "^31.1.0",
30
- "webpack": "^4.43.0",
31
- "webpack-cli": "^3.3.11"
18
+ "@ckeditor/ckeditor5-basic-styles": "^32.0.0",
19
+ "@ckeditor/ckeditor5-core": "^32.0.0",
20
+ "@ckeditor/ckeditor5-dev-utils": "^27.1.0",
21
+ "@ckeditor/ckeditor5-engine": "^32.0.0",
22
+ "@ckeditor/ckeditor5-enter": "^32.0.0",
23
+ "@ckeditor/ckeditor5-heading": "^32.0.0",
24
+ "@ckeditor/ckeditor5-paragraph": "^32.0.0",
25
+ "@ckeditor/ckeditor5-theme-lark": "^32.0.0",
26
+ "@ckeditor/ckeditor5-typing": "^32.0.0",
27
+ "@ckeditor/ckeditor5-ui": "^32.0.0",
28
+ "@ckeditor/ckeditor5-undo": "^32.0.0",
29
+ "@ckeditor/ckeditor5-utils": "^32.0.0",
30
+ "webpack": "^5.58.1",
31
+ "webpack-cli": "^4.9.0"
32
32
  },
33
33
  "engines": {
34
- "node": ">=12.0.0",
34
+ "node": ">=14.0.0",
35
35
  "npm": ">=5.7.1"
36
36
  },
37
37
  "author": "CKSource (http://cksource.com/)",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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
 
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, 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