jodit 4.0.1 → 4.0.2
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 +10 -6
- package/es2015/jodit.css +5 -7
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +27 -24
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- 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.css +5 -7
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +27 -24
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +5 -7
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +27 -24
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +2 -2
- 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 +5 -7
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +27 -24
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +2 -2
- 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 +7 -9
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +28 -23
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- 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/esm/core/constants.js +1 -1
- package/esm/core/ui/popup/popup.js +5 -4
- package/esm/modules/context-menu/context-menu.js +5 -3
- package/esm/modules/dialog/dialog.js +5 -3
- package/esm/modules/file-browser/builders/context-menu.js +3 -1
- package/esm/modules/file-browser/data-provider.js +6 -6
- package/esm/modules/file-browser/file-browser.js +1 -5
- package/esm/modules/toolbar/button/button.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/a.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
- package/package.json +1 -1
- package/types/modules/toolbar/button/button.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/a.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.0.
|
|
4
|
+
* Version: v4.0.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -3084,7 +3084,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3084
3084
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
3085
3085
|
*/
|
|
3086
3086
|
|
|
3087
|
-
var APP_VERSION = "4.0.
|
|
3087
|
+
var APP_VERSION = "4.0.2";
|
|
3088
3088
|
// prettier-ignore
|
|
3089
3089
|
var ES = "es5";
|
|
3090
3090
|
var IS_ES_MODERN = false;
|
|
@@ -17532,10 +17532,11 @@ var Popup = /** @class */ (function (_super) {
|
|
|
17532
17532
|
.off(this.container, 'scroll mousewheel', up)
|
|
17533
17533
|
.off(ow, 'scroll', up)
|
|
17534
17534
|
.off(ow, 'resize', up);
|
|
17535
|
-
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
|
|
17535
|
+
if (this.j.container.isConnected) {
|
|
17536
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .i.up(this.j.container, function (box) {
|
|
17537
|
+
box && _this.j.e.off(box, 'scroll mousewheel', up);
|
|
17538
|
+
});
|
|
17539
|
+
}
|
|
17539
17540
|
};
|
|
17540
17541
|
/**
|
|
17541
17542
|
* Set ZIndex
|
|
@@ -19737,7 +19738,8 @@ var ContextMenu = /** @class */ (function (_super) {
|
|
|
19737
19738
|
*/
|
|
19738
19739
|
ContextMenu.prototype.show = function (x, y, actions) {
|
|
19739
19740
|
var _this = this;
|
|
19740
|
-
var self = this
|
|
19741
|
+
var self = this;
|
|
19742
|
+
self.clear();
|
|
19741
19743
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isArray */ .kJ)(actions)) {
|
|
19742
19744
|
return;
|
|
19743
19745
|
}
|
|
@@ -19751,12 +19753,13 @@ var ContextMenu = /** @class */ (function (_super) {
|
|
|
19751
19753
|
action.onAction(function (e) {
|
|
19752
19754
|
var _a;
|
|
19753
19755
|
(_a = item.exec) === null || _a === void 0 ? void 0 : _a.call(self, e);
|
|
19756
|
+
self.clear();
|
|
19754
19757
|
self.close();
|
|
19755
19758
|
return false;
|
|
19756
19759
|
});
|
|
19757
|
-
|
|
19760
|
+
_this.append(action);
|
|
19758
19761
|
});
|
|
19759
|
-
this.
|
|
19762
|
+
this.open(function () { return ({ left: x, top: y, width: 0, height: 0 }); }, true);
|
|
19760
19763
|
};
|
|
19761
19764
|
ContextMenu = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
19762
19765
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_4__/* .component */ .w
|
|
@@ -20440,10 +20443,12 @@ var Dialog = /** @class */ (function (_super) {
|
|
|
20440
20443
|
this.getMod('static') === true) {
|
|
20441
20444
|
return this;
|
|
20442
20445
|
}
|
|
20446
|
+
var e = this.e;
|
|
20443
20447
|
/**
|
|
20444
20448
|
* Called up to close the window
|
|
20445
20449
|
*/
|
|
20446
|
-
if (
|
|
20450
|
+
if (e.fire(this, 'beforeClose') === false ||
|
|
20451
|
+
e.fire('beforeClose', this) === false) {
|
|
20447
20452
|
return this;
|
|
20448
20453
|
}
|
|
20449
20454
|
this.setMod('active', false);
|
|
@@ -20456,8 +20461,8 @@ var Dialog = /** @class */ (function (_super) {
|
|
|
20456
20461
|
/**
|
|
20457
20462
|
* It called after the window is closed
|
|
20458
20463
|
*/
|
|
20459
|
-
|
|
20460
|
-
|
|
20464
|
+
e.fire(this, 'afterClose');
|
|
20465
|
+
e.fire(this.ow, 'joditCloseDialog');
|
|
20461
20466
|
if (this.destroyAfterClose) {
|
|
20462
20467
|
this.destruct();
|
|
20463
20468
|
}
|
|
@@ -20823,7 +20828,9 @@ var CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = function (n
|
|
|
20823
20828
|
]);
|
|
20824
20829
|
}, self.defaultTimeout);
|
|
20825
20830
|
self.e
|
|
20826
|
-
.on('beforeClose', function () {
|
|
20831
|
+
.on('beforeClose', function () {
|
|
20832
|
+
contextmenu.close();
|
|
20833
|
+
})
|
|
20827
20834
|
.on('beforeDestruct', function () { return contextmenu.destruct(); });
|
|
20828
20835
|
e.stopPropagation();
|
|
20829
20836
|
e.preventDefault();
|
|
@@ -21306,7 +21313,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.controls.fil
|
|
|
21306
21313
|
|
|
21307
21314
|
|
|
21308
21315
|
var DEFAULT_SOURCE_NAME = 'default';
|
|
21309
|
-
var possibleRules = [
|
|
21316
|
+
var possibleRules = new Set([
|
|
21310
21317
|
'allowFiles',
|
|
21311
21318
|
'allowFileMove',
|
|
21312
21319
|
'allowFileUpload',
|
|
@@ -21320,7 +21327,7 @@ var possibleRules = [
|
|
|
21320
21327
|
'allowFolderRename',
|
|
21321
21328
|
'allowImageResize',
|
|
21322
21329
|
'allowImageCrop'
|
|
21323
|
-
];
|
|
21330
|
+
]);
|
|
21324
21331
|
var DataProvider = /** @class */ (function () {
|
|
21325
21332
|
function DataProvider(parent, options) {
|
|
21326
21333
|
this.parent = parent;
|
|
@@ -21411,13 +21418,13 @@ var DataProvider = /** @class */ (function () {
|
|
|
21411
21418
|
DataProvider.prototype.canI = function (action) {
|
|
21412
21419
|
var rule = 'allow' + action;
|
|
21413
21420
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__.IS_PROD) {
|
|
21414
|
-
if (!possibleRules.
|
|
21421
|
+
if (!possibleRules.has(rule)) {
|
|
21415
21422
|
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Wrong action ' + action);
|
|
21416
21423
|
}
|
|
21417
21424
|
}
|
|
21418
|
-
var
|
|
21419
|
-
if (
|
|
21420
|
-
return
|
|
21425
|
+
var presetValue = this.o.permissionsPresets[rule];
|
|
21426
|
+
if (presetValue !== undefined) {
|
|
21427
|
+
return presetValue;
|
|
21421
21428
|
}
|
|
21422
21429
|
return (this.__currentPermissions == null ||
|
|
21423
21430
|
this.__currentPermissions[rule] === undefined ||
|
|
@@ -22072,10 +22079,8 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22072
22079
|
minHeight: 300,
|
|
22073
22080
|
buttons: (_a = this.o.headerButtons) !== null && _a !== void 0 ? _a : ['fullsize', 'dialog.close']
|
|
22074
22081
|
});
|
|
22075
|
-
['afterClose', 'beforeOpen'].forEach(function (proxyEvent) {
|
|
22076
|
-
dialog.events.on(dialog, proxyEvent, function () {
|
|
22077
|
-
_this.e.fire(proxyEvent);
|
|
22078
|
-
});
|
|
22082
|
+
['beforeClose', 'afterClose', 'beforeOpen'].forEach(function (proxyEvent) {
|
|
22083
|
+
return dialog.events.on(dialog, proxyEvent, function () { return _this.e.fire(proxyEvent); });
|
|
22079
22084
|
});
|
|
22080
22085
|
dialog.setSize(this.o.width, this.o.height);
|
|
22081
22086
|
return dialog;
|