UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

1,127 lines (1,064 loc) 40.5 kB
/*! * jodit-pro - PRO Version of Jodit Editor * Author: Chupurnov Valerii <chupurnov@gmail.com> * Version: v4.9.27 * Url: https://xdsoft.net/jodit/pro/ * License(s): SEE LICENSE IN LICENSE.md */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } })(self, function() { return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[702],{ /***/ 10690: /***/ (function(module) { module.exports = "<svg viewBox=\"0 0 30 29\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M15 0.5L30 15.2625H22V24H8V15.2625H0L15 0.5Z\"/> <rect x=\"8\" y=\"26\" width=\"14\" height=\"3\"/> </svg>" /***/ }), /***/ 11699: /***/ (function(module) { module.exports = "<svg viewBox=\"0 0 30 29\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M15 0.5L30 15.2625H22V29H8V15.2625H0L15 0.5Z\"/> </svg>" /***/ }), /***/ 25241: /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ UIKeyboard: function() { return /* binding */ UIKeyboard; } /* harmony export */ }); /* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294); /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616); /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709); /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749); /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766); /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635); /* harmony import */ var jodit_esm_core_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(82758); /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65478); /* harmony import */ var jodit_esm_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43555); /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(67510); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_backspace_svg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27926); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_backspace_svg__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(jodit_pro_plugins_keyboard_ui_assets_backspace_svg__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_caps_svg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(10690); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_caps_svg__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(jodit_pro_plugins_keyboard_ui_assets_caps_svg__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_dots_svg__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(91997); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_dots_svg__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(jodit_pro_plugins_keyboard_ui_assets_dots_svg__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_shift_svg__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(11699); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_shift_svg__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(jodit_pro_plugins_keyboard_ui_assets_shift_svg__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_tab_svg__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(98126); /* harmony import */ var jodit_pro_plugins_keyboard_ui_assets_tab_svg__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(jodit_pro_plugins_keyboard_ui_assets_tab_svg__WEBPACK_IMPORTED_MODULE_14__); /*! * Jodit Editor PRO (https://xdsoft.net/jodit/) * See LICENSE.md in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/ */ var UIKeyboard = /*#__PURE__*/ function(UIElement) { "use strict"; (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(UIKeyboard, UIElement); function UIKeyboard(jodit) { (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, UIKeyboard); var _this; _this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UIKeyboard, [ jodit ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", { caps: false, shift: false, options: false, currentLayout: _this.j.o.keyboard.defaultLayoutSet }), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "_keys", _this.getElms('key')), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "pressed", false), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "reKeyDownTimeout", 0); _this.onStateChange(); return _this; } (0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UIKeyboard, [ { /** @override */ key: "className", value: function className() { return 'UIKeyboard'; } }, { key: "render", value: /** @override */ function render() { var _this_j_options_keyboard = this.j.options.keyboard, layout = _this_j_options_keyboard.layout, keySize = _this_j_options_keyboard.keySize, rowCount = layout.length; return "<div>".concat(function() { var rows = []; for(var i = 0; i < rowCount; i += 1){ var row = []; for(var j = 0; j < layout[i].length; j += 1){ row.push('<div style="width:'.concat(keySize * layout[i][j], "px;height:").concat(keySize, 'px;" class="&__key"></div>')); } rows.push("<div class='&__row'>".concat(row.join('\n'), "</div>")); } return rows.join('\n'); }(), "</div>"); } }, { key: "onStateChange", value: function onStateChange() { var _this_state = this.state, currentLayout = _this_state.currentLayout, options = _this_state.options, shift = _this_state.shift, caps = _this_state.caps, keys = this.j.o.keyboard.layoutList[currentLayout].keys; var index = 0; for(var i = 0; i < keys.length; i += 1){ for(var j = 0; j < keys[i].length; j += 1){ var values = keys[i][j].split(' '); var value = values[0]; if (shift) { value = values[1]; } if (!shift && caps && values[1] && UIKeyboard.isLetter(values[0])) { value = values[1]; } if (options) { value = values[2]; } this.setKeyValue(index, value !== null && value !== void 0 ? value : values[0]); index += 1; } } } }, { key: "setKeyValue", value: function setKeyValue(index, value) { var elm = this._keys[index]; if (!elm) { return; } var active = false; var _this_state = this.state, options = _this_state.options, shift = _this_state.shift, caps = _this_state.caps; switch(value){ case 'Caps': active = caps; break; case 'Options': active = options; break; case 'Shift': active = shift; break; } elm.innerHTML = UIKeyboard.decorate(value); elm.classList.toggle(this.getFullElName('key', 'active', true), active); (0,jodit_esm_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.attr)(elm, '-key', value); } }, { key: "onKeyUp", value: function onKeyUp() { if (this.pressed) { this.stopPress(); } } }, { key: "onReady", value: function onReady() { this.j.e.on(this.getElms('key'), 'mouseenter', this.stopPress); } }, { key: "stopPress", value: function stopPress() { var _this = this; if (this.pressed) { this.pressed = false; this.j.async.clearTimeout(this.reKeyDownTimeout); this._keys.forEach(function(elm) { elm.classList.remove(_this.getFullElName('key', 'pressed', true)); }); } } }, { key: "onKeyDown", value: function onKeyDown(e) { var _this = this; var timeout = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0; var target = e.target; if (!target || !target.classList.contains(this.getFullElName('key'))) { return false; } this.pressed = true; target.classList.add(this.getFullElName('key', 'pressed', true)); var key = (0,jodit_esm_core_helpers_utils__WEBPACK_IMPORTED_MODULE_8__.attr)(target, '-key'); switch(key){ case 'Caps': this.state.caps = !this.state.caps; break; case 'Shift': this.state.shift = !this.state.shift; break; case 'Options': this.state.options = !this.state.options; break; case 'Enter': case 'Backspace': this.j.e.fire('keydown', { key: key, preventDefault: function preventDefault() {} }); break; case 'Space': case 'Tab': this.j.s.insertNode(this.j.createInside.text(jodit_esm_core_constants__WEBPACK_IMPORTED_MODULE_6__.NBSP_SPACE)); break; default: if (this.state.shift) { this.state.shift = false; } key && this.j.s.insertNode(this.j.createInside.text(key)); } var _this_j_o_keyboard = this.j.o.keyboard, periodKeyRepeat = _this_j_o_keyboard.periodKeyRepeat, delayKeyRepeat = _this_j_o_keyboard.delayKeyRepeat; this.reKeyDownTimeout = this.j.async.setTimeout(function() { return _this.onKeyDown(e, periodKeyRepeat); }, timeout || delayKeyRepeat); return false; } } ], [ { key: "isLetter", value: function isLetter(c) { return c.toLowerCase() !== c.toUpperCase(); } }, { key: "decorate", value: function decorate(value) { switch(value){ case 'Space': return ''; case 'Enter': return jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_9__.Icon.get('enter'); case 'Backspace': return (jodit_pro_plugins_keyboard_ui_assets_backspace_svg__WEBPACK_IMPORTED_MODULE_10___default()); case 'Shift': return (jodit_pro_plugins_keyboard_ui_assets_shift_svg__WEBPACK_IMPORTED_MODULE_13___default()); case 'Caps': return (jodit_pro_plugins_keyboard_ui_assets_caps_svg__WEBPACK_IMPORTED_MODULE_11___default()); case 'Options': return (jodit_pro_plugins_keyboard_ui_assets_dots_svg__WEBPACK_IMPORTED_MODULE_12___default()); case 'Tab': return (jodit_pro_plugins_keyboard_ui_assets_tab_svg__WEBPACK_IMPORTED_MODULE_14___default()); default: return value; } } } ]); return UIKeyboard; }(jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_9__.UIElement); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.watch)([ 'state.currentLayout', 'state.options', 'state.shift', 'state.caps' ]) ], UIKeyboard.prototype, "onStateChange", null); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.watch)([ 'ow:mouseup' ]) ], UIKeyboard.prototype, "onKeyUp", null); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.hook)('ready') ], UIKeyboard.prototype, "onReady", null); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.autobind ], UIKeyboard.prototype, "stopPress", null); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.watch)([ 'container:mousedown', 'container:touchstart' ]) ], UIKeyboard.prototype, "onKeyDown", null); UIKeyboard = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_5__.__decorate)([ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.component ], UIKeyboard); /***/ }), /***/ 27926: /***/ (function(module) { module.exports = "<?xml version=\"1.0\" ?><svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 10l7-7h13v14H7l-7-7zm14.41 0l2.13-2.12-1.42-1.42L13 8.6l-2.12-2.13-1.42 1.42L11.6 10l-2.13 2.12 1.42 1.42L13 11.4l2.12 2.13 1.42-1.42L14.4 10z\"/></svg>" /***/ }), /***/ 41113: /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _icon_svg__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63643); /* harmony import */ var _icon_svg__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_icon_svg__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6441); /*! * Jodit Editor PRO (https://xdsoft.net/jodit/) * See LICENSE.md in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/ */ jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.keyboard = { defaultLayoutSet: 'en', showLayoutSwitcher: true, extraKeyGroup: 'other', extraKeyButtons: [], delayKeyRepeat: 350, periodKeyRepeat: 100, layoutList: { en: { title: 'English', // prettier-ignore keys: [ [ '` ~ ±', '1 ! §', '2 @', '3 #', '4 $', '5 %', '6 ^', '7 &', '8 *', '9 (', '0 )', '- _', '= +', 'Backspace' ], [ 'Tab', 'q Q', 'w W', 'e E', 'r R', 't T', 'y Y', 'u U', 'i I', 'o O', 'p P', '[ {', '] }', '\\ |' ], [ 'Caps', 'a A', 's S', 'd D', 'f F', 'g G', 'h H', 'j J', 'k K', 'l L', '; :', '\' "', 'Enter' ], [ 'Shift', 'z Z', 'x X', 'c C', 'v V', 'b B', 'n N', 'm M', ', <', '. >', '/ ?', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] }, es: { title: 'Español', // prettier-ignore keys: [ [ 'º ` ~', '1 ! §', '2 @', '3 #', '4 $', '5 %', '6 ^', '7 &', '8 *', '9 (', '0 )', '- _ |', '¡ = +', 'Backspace' ], [ 'Tab', 'q Q', 'w W', 'e E', 'r R', 't T', 'y Y', 'u U', 'i I', 'o O', 'p P', '[ {', '] }', 'ç Ç \\' ], [ 'Caps', 'a A', 's S', 'd D', 'f F', 'g G', 'h H', 'j J', 'k K', 'l L', 'ñ Ñ ; :', '\' "', 'Enter' ], [ 'Shift', 'z Z', 'x X', 'c C', 'v V', 'b B', 'n N', 'm M', ', <', '. >', '/ ?', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] }, de: { title: 'Deutsch', // prettier-ignore keys: [ [ '` ~ ±', '1 ! §', '2 @', '3 #', '4 $', '5 %', '6 ^', '7 &', '8 * :', '9 ( {', '0 ) }', '- _', '= +', 'Backspace' ], [ 'Tab', 'q Q', 'w W', 'e E', 'r R', 't T', 'z Z', 'u U', 'i I', 'o O', 'p P', 'ü Ü [', '] }', '\\ |' ], [ 'Caps', 'a A', 's S', 'd D', 'f F', 'g G', 'h H', 'j J', 'k K', 'l L', 'ö Ö ;', 'ä Ä \' "', 'Enter' ], [ 'Shift', 'y Y', 'x X', 'c C', 'v V', 'b B', 'n N', 'm M', ', <', '. >', '/ ?', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] }, ru: { title: 'Русский', // prettier-ignore keys: [ [ '` ~ ±', '1 ! §', '2 @ "', '3 # :', '4 $ <', '5 % >', '6 ^', '7 &', '8 *', '9 (', '0 )', '- _', '= +', 'Backspace' ], [ 'Tab', 'й Й', 'ц Ц', 'у У', 'к К', 'е Е', 'н Н', 'г Г', 'ш Ш', 'щ Щ', 'з З', 'х Х [', 'ъ ] {', '\\ | }' ], [ 'Caps', 'ф Ф', 'ы Ы', 'в В', 'а А', 'п П', 'р Р', 'о О', 'л Л', 'д Д', 'ж Ж ;', 'э Э \'', 'Enter' ], [ 'Shift', 'я Я', 'ч Ч', 'с С', 'м М', 'и И', 'т Т', 'ь Ь', 'б Б ,', 'ю Ю .', '/ ?', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] }, tr: { title: 'Türkçe', // prettier-ignore keys: [ [ '" é` ~', '1 ! §', '2 @ "', '3 # :', '4 $ <', '5 % >', '6 ^ ±', '7 &', '8 *', '9 ( {', '0 ) }', '- _ [', '= + ]', 'Backspace' ], [ 'Tab', 'q Q', 'w W', 'e E', 'r R', 't T', 'y Y', 'u U', 'ı I', 'o O', 'p P', 'ğ Ğ', 'ü Ü', ', \\ |' ], [ 'Caps', 'a A', 's S', 'd D', 'f F', 'g G', 'h H', 'j J', 'k K', 'l L', 'ş Ş', 'i̇ İ', 'Enter' ], [ 'Shift', 'z Z', 'x X', 'c C', 'v V', 'b B', 'n N', 'm M', 'ö Ö <', 'ç Ç >', '. / ?', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] }, iw: { title: 'Hebrew', // prettier-ignore keys: [ [ '` ~ ±', '1 ! §', '2 @', '3 #', '4 $', '5 %', '6 ^', '7 &', '8 *', '9 (', '0 )', '- _', '= +', 'Backspace' ], [ 'Tab', '/ q Q', '\' w W', 'ק e E', 'ר r R', 'א t T', 'ט y Y', 'ו u U', 'ן i I', 'ם o O', 'פ p P', '[ {', '] }', '\\ |' ], [ 'Caps', 'ש a A', 'ד s S', 'ג d D', 'כ f F', 'ע g G', 'י h H', 'ח j J', 'ל k K', 'ך l L', 'ף ; :', '\' "', 'Enter' ], [ 'Shift', 'ז z Z', 'ס x X', 'ב c C', 'ה v V', 'נ b B', 'מ n N', 'צ m M', ', <', '. >', '/ ?', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] }, tata: { title: 'Tata', // prettier-ignore keys: [ [ 'һ Һ` ~', '1 ! §', '2 @ "', '3 # :', '4 $ <', '5 % >', '6 ^ ±', '7 &', '8 *', '9 ( {', '0 )', '- _', '= +', 'Backspace' ], [ 'Tab', 'й Й', 'ө Ө', 'у У', 'к К', 'е Е', 'н Н', 'г Г', 'ш Ш', 'ә Ә', 'з З', 'х Х [', 'ү Ү ]', '\\ | }' ], [ 'Caps', 'ф Ф', 'ы Ы', 'в В', 'а А', 'п П', 'р Р', 'о О', 'л Л', 'д Д', 'ң Ң ;', 'э Э \'', 'Enter' ], [ 'Shift', 'я Я', 'ч Ч', 'с С', 'м М', 'и И', 'т Т', 'җ Җ', 'б Б ,', 'ю Ю .', 'ґ Ґ /', 'Shift' ], [ 'Options', 'Space', 'Options' ] ] } }, layoutSwitchList: [ 'en', 'es', 'de', 'ru', 'tr', 'iw', 'tata' ], keySize: 32, // prettier-ignore layout: [ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 ], [ 1.5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.5 ], [ 1.8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.2 ], [ 2.5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.5 ], [ 3.5, 9, 3.5 ] ] }; jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.keyboard = { tooltip: 'Keyboard', icon: (_icon_svg__WEBPACK_IMPORTED_MODULE_0___default()), isActive: function isActive(editor) { return Boolean(editor.e.fire('isKeyboardOpened')); }, command: 'toggleKeyboard' }; jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.controls.extraKeyboardButtons = {}; /***/ }), /***/ 63643: /***/ (function(module) { module.exports = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M0 6c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6zm2 0v2h2V6H2zm1 3v2h2V9H3zm-1 3v2h2v-2H2zm3 0v2h10v-2H5zm11 0v2h2v-2h-2zM6 9v2h2V9H6zm3 0v2h2V9H9zm3 0v2h2V9h-2zm3 0v2h2V9h-2zM5 6v2h2V6H5zm3 0v2h2V6H8zm3 0v2h2V6h-2zm3 0v2h4V6h-4z\"/> </svg>" /***/ }), /***/ 91997: /***/ (function(module) { module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 24 24\" > <circle cy=\"12\" cx=\"12\" r=\"2.2\"/> <circle cy=\"12\" cx=\"5\" r=\"2.2\"/> <circle cy=\"12\" cx=\"19\" r=\"2.2\"/> </svg>" /***/ }), /***/ 95618: /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ keyboard: function() { return /* binding */ keyboard; } /* harmony export */ }); /* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294); /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616); /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709); /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749); /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766); /* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23078); /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41113); /* harmony import */ var _ui_keyboard_keyboard__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25241); /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6441); /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(65478); /* harmony import */ var jodit_esm_core_helpers_checker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(27613); /* harmony import */ var jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(50911); /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(67510); /* harmony import */ var jodit_esm_modules__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(41409); /* harmony import */ var jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(2692); /*! * Jodit Editor PRO (https://xdsoft.net/jodit/) * See LICENSE.md in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/ */ var keyboard = /*#__PURE__*/ function(Plugin) { "use strict"; (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(keyboard, Plugin); function keyboard(jodit) { (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, keyboard); var _this; _this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, keyboard, [ jodit ]), /** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "hasStyle", !jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_15__.JoditPro.fatMode), /** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "buttons", [ { group: 'insert', name: 'keyboard' } ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__keyboard", void 0); var _jodit_o_keyboard = jodit.o.keyboard, extraKeyButtons = _jodit_o_keyboard.extraKeyButtons, extraKeyGroup = _jodit_o_keyboard.extraKeyGroup; if (extraKeyButtons.length) { extraKeyButtons.forEach(function(key, index) { var id = (0,jodit_esm_core_helpers_checker__WEBPACK_IMPORTED_MODULE_11__.isString)(key) ? key : key.key, hotkeys = (0,jodit_esm_core_helpers_checker__WEBPACK_IMPORTED_MODULE_11__.isString)(key) || !key.hotkeys ? [ "ctrl+".concat(index + 1) ] : key.hotkeys; jodit.registerButton({ name: "extraKeyboardButtons.".concat(id), group: extraKeyGroup }); var extraKeyboardButtons = jodit_esm_config__WEBPACK_IMPORTED_MODULE_9__.Config.defaultOptions.controls.extraKeyboardButtons; extraKeyboardButtons[id] = { name: id, tooltip: id, args: [ id ], hotkeys: hotkeys, command: 'insertChar' }; }); } return _this; } (0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(keyboard, [ { key: "afterInit", value: /** @override */ function afterInit(jodit) { var _this = this; jodit.registerCommand('toggleKeyboard', this.toggleKeyboard).registerCommand('insertChar', this.insertChar); jodit.e.on('isKeyboardOpened', function() { var _this___keyboard; return (_this___keyboard = _this.__keyboard) === null || _this___keyboard === void 0 ? void 0 : _this___keyboard.isOpened; }); } }, { key: "insertChar", value: function insertChar(_, _1, insertChar) { this.j.s.insertNode(this.j.createInside.text(insertChar)); } }, { key: "toggleKeyboard", value: /** * Show or hide virtual Keyboard */ function toggleKeyboard() { if (!this.__keyboard) { this.__keyboard = new jodit_esm_modules__WEBPACK_IMPORTED_MODULE_14__.Dialog({ toolbarButtonSize: 'tiny' }); var ui = new _ui_keyboard_keyboard__WEBPACK_IMPORTED_MODULE_8__.UIKeyboard(this.j); this.__keyboard.setMod('slim', true).setMod('adaptive', false).setContent(ui); var _this_j_o_keyboard = this.j.o.keyboard, showLayoutSwitcher = _this_j_o_keyboard.showLayoutSwitcher, layoutSwitchList = _this_j_o_keyboard.layoutSwitchList, layoutList = _this_j_o_keyboard.layoutList; if (showLayoutSwitcher) { var switcher = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__.UISelect(this.__keyboard, { value: ui.state.currentLayout, options: layoutSwitchList.map(function(key) { var _ref; var _layoutList_key; var title = (_ref = (_layoutList_key = layoutList[key]) === null || _layoutList_key === void 0 ? void 0 : _layoutList_key.title) !== null && _ref !== void 0 ? _ref : key; return { text: title, value: key }; }), onChange: function onChange(value) { ui.state.currentLayout = value; } }); switcher.setMod('size', 'tiny').setMod('width', 'auto').setMod('variant', 'outline'); this.__keyboard.setHeader(switcher); } } if (this.__keyboard.isOpened) { this.__keyboard.close(); } else { this.__keyboard.open(); } } }, { key: "beforeDestruct", value: /** @override */ function beforeDestruct(jodit) { var _this___keyboard; (_this___keyboard = this.__keyboard) === null || _this___keyboard === void 0 ? void 0 : _this___keyboard.destruct(); } } ]); return keyboard; }((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__._)(jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plugin)); /** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(keyboard, "requires", [ 'license' ]); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind ], keyboard.prototype, "insertChar", null); (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_6__.__decorate)([ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_10__.autobind ], keyboard.prototype, "toggleKeyboard", null); jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_15__.JoditPro.plugins.add('keyboard', keyboard); /***/ }), /***/ 98126: /***/ (function(module) { module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M23.17 14.83l7.17 7.17h-28.34v4h28.34l-7.17 7.17 2.83 2.83 12-12-12-12-2.83 2.83zm16.83-2.83v24h4v-24h-4z\"/> </svg>" /***/ }) }, /******/ function(__webpack_require__) { // webpackRuntimeModules /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } /******/ var __webpack_exports__ = (__webpack_exec__(95618)); /******/ return __webpack_exports__; /******/ } ]); });