jodit 4.11.3 → 4.11.5
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 +51 -0
- package/es2015/jodit.css +21 -3
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +14 -14
- package/es2015/jodit.js +97 -22
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +5 -5
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +7 -7
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +14 -14
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +21 -3
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +8 -8
- package/es2021/jodit.js +96 -21
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +6 -6
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +21 -3
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +7 -7
- package/es2021.en/jodit.js +96 -21
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +6 -6
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +29 -6
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +112 -28
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/ui/button/button/button.js +2 -1
- package/esm/core/ui/icon.js +5 -2
- package/esm/core/ui/progress-bar/progress-bar.d.ts +9 -0
- package/esm/core/ui/progress-bar/progress-bar.js +53 -0
- package/esm/modules/toolbar/button/button.d.ts +1 -0
- package/esm/modules/toolbar/button/button.js +29 -19
- package/esm/types/toolbar.d.ts +12 -2
- package/esm/types/ui.d.ts +1 -0
- package/package.json +1 -1
- package/types/core/ui/progress-bar/progress-bar.d.ts +9 -0
- package/types/modules/toolbar/button/button.d.ts +1 -0
- package/types/types/toolbar.d.ts +12 -2
- package/types/types/ui.d.ts +1 -0
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.5
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2022,7 +2022,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2022
2022
|
* @packageDocumentation
|
|
2023
2023
|
* @module constants
|
|
2024
2024
|
*/
|
|
2025
|
-
var APP_VERSION = "4.11.
|
|
2025
|
+
var APP_VERSION = "4.11.5";
|
|
2026
2026
|
// prettier-ignore
|
|
2027
2027
|
var ES = "es5";
|
|
2028
2028
|
var IS_ES_MODERN = false;
|
|
@@ -15537,7 +15537,8 @@ var UIButtonState = function UIButtonState() {
|
|
|
15537
15537
|
icon: {
|
|
15538
15538
|
name: 'empty',
|
|
15539
15539
|
fill: '',
|
|
15540
|
-
iconURL: ''
|
|
15540
|
+
iconURL: '',
|
|
15541
|
+
scale: undefined
|
|
15541
15542
|
},
|
|
15542
15543
|
tooltip: '',
|
|
15543
15544
|
text: '',
|
|
@@ -18464,14 +18465,14 @@ var Icon = /*#__PURE__*/ function() {
|
|
|
18464
18465
|
return;
|
|
18465
18466
|
}
|
|
18466
18467
|
var iconElement;
|
|
18467
|
-
var name = icon.name, iconURL = icon.iconURL, fill = icon.fill;
|
|
18468
|
+
var name = icon.name, iconURL = icon.iconURL, fill = icon.fill, scale = icon.scale;
|
|
18468
18469
|
var clearName = name.replace(/[^a-zA-Z0-9]/g, '_');
|
|
18469
18470
|
var iconFromEvent;
|
|
18470
18471
|
if (!/<svg/.test(name)) {
|
|
18471
18472
|
var _jodit_o_getIcon, _jodit_o;
|
|
18472
18473
|
iconFromEvent = (_jodit_o_getIcon = (_jodit_o = jodit.o).getIcon) === null || _jodit_o_getIcon === void 0 ? void 0 : _jodit_o_getIcon.call(_jodit_o, name, clearName);
|
|
18473
18474
|
}
|
|
18474
|
-
var cacheKey = "".concat(name).concat(iconURL).concat(fill).concat(iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : '');
|
|
18475
|
+
var cacheKey = "".concat(name).concat(iconURL).concat(fill).concat(scale !== null && scale !== void 0 ? scale : '').concat(iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : '');
|
|
18475
18476
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
18476
18477
|
var _this___cache_get;
|
|
18477
18478
|
return (_this___cache_get = this.__cache.get(cacheKey)) === null || _this___cache_get === void 0 ? void 0 : _this___cache_get.cloneNode(true);
|
|
@@ -18492,6 +18493,9 @@ var Icon = /*#__PURE__*/ function() {
|
|
|
18492
18493
|
if (iconElement) {
|
|
18493
18494
|
iconElement.classList.add('jodit-icon');
|
|
18494
18495
|
iconElement.style.fill = fill;
|
|
18496
|
+
if (scale != null) {
|
|
18497
|
+
iconElement.style.transform = "scale(".concat(scale, ")");
|
|
18498
|
+
}
|
|
18495
18499
|
jodit.o.cache && this.__cache.set(cacheKey, iconElement.cloneNode(true));
|
|
18496
18500
|
}
|
|
18497
18501
|
return iconElement;
|
|
@@ -19013,11 +19017,16 @@ var Popup = /*#__PURE__*/ function(UIGroup) {
|
|
|
19013
19017
|
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69262);
|
|
19014
19018
|
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73104);
|
|
19015
19019
|
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(53429);
|
|
19016
|
-
/* harmony import */ var
|
|
19017
|
-
/* harmony import */ var
|
|
19018
|
-
/* harmony import */ var
|
|
19019
|
-
/* harmony import */ var
|
|
19020
|
-
/* harmony import */ var
|
|
19020
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25045);
|
|
19021
|
+
/* harmony import */ var _swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22248);
|
|
19022
|
+
/* harmony import */ var _swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66773);
|
|
19023
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34918);
|
|
19024
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23211);
|
|
19025
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(28077);
|
|
19026
|
+
/* harmony import */ var jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23599);
|
|
19027
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(80991);
|
|
19028
|
+
/* harmony import */ var jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96007);
|
|
19029
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(29434);
|
|
19021
19030
|
/*!
|
|
19022
19031
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19023
19032
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19035,12 +19044,19 @@ var Popup = /*#__PURE__*/ function(UIGroup) {
|
|
|
19035
19044
|
|
|
19036
19045
|
|
|
19037
19046
|
|
|
19047
|
+
|
|
19048
|
+
|
|
19049
|
+
|
|
19050
|
+
|
|
19051
|
+
|
|
19038
19052
|
var ProgressBar = /*#__PURE__*/ function(UIElement) {
|
|
19039
19053
|
"use strict";
|
|
19040
|
-
(0,
|
|
19054
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__._)(ProgressBar, UIElement);
|
|
19041
19055
|
function ProgressBar() {
|
|
19042
19056
|
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, ProgressBar);
|
|
19043
|
-
|
|
19057
|
+
var _this;
|
|
19058
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, ProgressBar, arguments), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__animationElement", null);
|
|
19059
|
+
return _this;
|
|
19044
19060
|
}
|
|
19045
19061
|
(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(ProgressBar, [
|
|
19046
19062
|
{
|
|
@@ -19068,7 +19084,7 @@ var ProgressBar = /*#__PURE__*/ function(UIElement) {
|
|
|
19068
19084
|
{
|
|
19069
19085
|
key: "hide",
|
|
19070
19086
|
value: function hide() {
|
|
19071
|
-
|
|
19087
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_7__.Dom.safeRemove(this.container);
|
|
19072
19088
|
return this;
|
|
19073
19089
|
}
|
|
19074
19090
|
},
|
|
@@ -19079,16 +19095,68 @@ var ProgressBar = /*#__PURE__*/ function(UIElement) {
|
|
|
19079
19095
|
return this;
|
|
19080
19096
|
}
|
|
19081
19097
|
},
|
|
19098
|
+
{
|
|
19099
|
+
key: "showFileUploadAnimation",
|
|
19100
|
+
value: function showFileUploadAnimation(from, to) {
|
|
19101
|
+
var _this = this;
|
|
19102
|
+
this.__cleanUpAnimation();
|
|
19103
|
+
var box = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_8__.getContainer)(this.j, ProgressBar);
|
|
19104
|
+
var pos = (0,jodit_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_9__.position)(this.j.container, this.j);
|
|
19105
|
+
var el = this.j.c.div(this.getFullElName('file-animation'));
|
|
19106
|
+
var iconSvg = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_12__.Icon.get('file', '');
|
|
19107
|
+
if (iconSvg) {
|
|
19108
|
+
el.innerHTML = iconSvg;
|
|
19109
|
+
}
|
|
19110
|
+
var start = from !== null && from !== void 0 ? from : {
|
|
19111
|
+
x: pos.width / 2,
|
|
19112
|
+
y: 0
|
|
19113
|
+
};
|
|
19114
|
+
var end = to !== null && to !== void 0 ? to : {
|
|
19115
|
+
x: start.x + 60,
|
|
19116
|
+
y: start.y - 80
|
|
19117
|
+
};
|
|
19118
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_10__.css)(el, {
|
|
19119
|
+
left: pos.left + start.x,
|
|
19120
|
+
top: pos.top + start.y
|
|
19121
|
+
});
|
|
19122
|
+
box.appendChild(el);
|
|
19123
|
+
this.__animationElement = el;
|
|
19124
|
+
// Force reflow before starting transition
|
|
19125
|
+
// eslint-disable-next-line no-unused-expressions
|
|
19126
|
+
el.offsetWidth;
|
|
19127
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_10__.css)(el, {
|
|
19128
|
+
left: pos.left + end.x,
|
|
19129
|
+
top: pos.top + end.y,
|
|
19130
|
+
opacity: 0,
|
|
19131
|
+
transform: 'scale(0.4)'
|
|
19132
|
+
});
|
|
19133
|
+
var onEnd = function onEnd1() {
|
|
19134
|
+
el.removeEventListener('transitionend', onEnd);
|
|
19135
|
+
_this.__cleanUpAnimation();
|
|
19136
|
+
};
|
|
19137
|
+
el.addEventListener('transitionend', onEnd);
|
|
19138
|
+
}
|
|
19139
|
+
},
|
|
19140
|
+
{
|
|
19141
|
+
key: "__cleanUpAnimation",
|
|
19142
|
+
value: function __cleanUpAnimation() {
|
|
19143
|
+
if (this.__animationElement) {
|
|
19144
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_7__.Dom.safeRemove(this.__animationElement);
|
|
19145
|
+
this.__animationElement = null;
|
|
19146
|
+
}
|
|
19147
|
+
}
|
|
19148
|
+
},
|
|
19082
19149
|
{
|
|
19083
19150
|
key: "destruct",
|
|
19084
19151
|
value: function destruct() {
|
|
19152
|
+
this.__cleanUpAnimation();
|
|
19085
19153
|
this.hide();
|
|
19086
|
-
return (0,
|
|
19154
|
+
return (0,_swc_helpers_get__WEBPACK_IMPORTED_MODULE_4__._)((0,_swc_helpers_get_prototype_of__WEBPACK_IMPORTED_MODULE_5__._)(ProgressBar.prototype), "destruct", this).call(this);
|
|
19087
19155
|
}
|
|
19088
19156
|
}
|
|
19089
19157
|
]);
|
|
19090
19158
|
return ProgressBar;
|
|
19091
|
-
}(
|
|
19159
|
+
}(jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_11__.UIElement);
|
|
19092
19160
|
|
|
19093
19161
|
|
|
19094
19162
|
/***/ }),
|
|
@@ -27774,26 +27842,42 @@ var ToolbarButton = /*#__PURE__*/ function(UIButton) {
|
|
|
27774
27842
|
var _this = this, ctr = _this.control, state = _this.state;
|
|
27775
27843
|
this.updateSize();
|
|
27776
27844
|
state.name = ctr.name;
|
|
27845
|
+
this.__initIconFromControl();
|
|
27846
|
+
if (ctr.tooltip) {
|
|
27847
|
+
state.tooltip = (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_19__.isFunction)(ctr.tooltip) ? ctr.tooltip(this.j, ctr, this) : ctr.tooltip;
|
|
27848
|
+
}
|
|
27849
|
+
state.hasTrigger = Boolean(ctr.list || ctr.popup && ctr.exec);
|
|
27850
|
+
}
|
|
27851
|
+
},
|
|
27852
|
+
{
|
|
27853
|
+
key: "__initIconFromControl",
|
|
27854
|
+
value: function __initIconFromControl() {
|
|
27855
|
+
var _this = this, ctr = _this.control, state = _this.state;
|
|
27777
27856
|
var textIcons = this.j.o.textIcons;
|
|
27778
27857
|
if (textIcons === true || (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_19__.isFunction)(textIcons) && textIcons(ctr.name) || ctr.template) {
|
|
27779
27858
|
state.icon = (0,jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_28__.UIButtonState)().icon;
|
|
27780
27859
|
state.text = ctr.text || ctr.name;
|
|
27860
|
+
return;
|
|
27861
|
+
}
|
|
27862
|
+
if (!(0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_22__.isString)(ctr.icon) && ctr.icon != null) {
|
|
27863
|
+
state.icon = {
|
|
27864
|
+
name: ctr.icon.name || ctr.name,
|
|
27865
|
+
iconURL: ctr.icon.iconURL || '',
|
|
27866
|
+
fill: ctr.icon.fill || '',
|
|
27867
|
+
scale: ctr.icon.scale
|
|
27868
|
+
};
|
|
27869
|
+
return;
|
|
27870
|
+
}
|
|
27871
|
+
if (ctr.iconURL) {
|
|
27872
|
+
state.icon.iconURL = ctr.iconURL;
|
|
27781
27873
|
} else {
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
var _this_j_o_extraIcons;
|
|
27786
|
-
var name = ctr.icon || ctr.name;
|
|
27787
|
-
state.icon.name = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_30__.Icon.exists(name) || ((_this_j_o_extraIcons = this.j.o.extraIcons) === null || _this_j_o_extraIcons === void 0 ? void 0 : _this_j_o_extraIcons[name]) ? name : '';
|
|
27788
|
-
}
|
|
27789
|
-
if (!ctr.iconURL && !state.icon.name) {
|
|
27790
|
-
state.text = ctr.text || ctr.name;
|
|
27791
|
-
}
|
|
27874
|
+
var _this_j_o_extraIcons;
|
|
27875
|
+
var name = ctr.icon || ctr.name;
|
|
27876
|
+
state.icon.name = jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_30__.Icon.exists(name) || ((_this_j_o_extraIcons = this.j.o.extraIcons) === null || _this_j_o_extraIcons === void 0 ? void 0 : _this_j_o_extraIcons[name]) ? name : '';
|
|
27792
27877
|
}
|
|
27793
|
-
if (ctr.
|
|
27794
|
-
state.
|
|
27878
|
+
if (!ctr.iconURL && !state.icon.name) {
|
|
27879
|
+
state.text = ctr.text || ctr.name;
|
|
27795
27880
|
}
|
|
27796
|
-
state.hasTrigger = Boolean(ctr.list || ctr.popup && ctr.exec);
|
|
27797
27881
|
}
|
|
27798
27882
|
},
|
|
27799
27883
|
{
|