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/es2015/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
|
*/
|
|
@@ -1691,7 +1691,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1691
1691
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1692
1692
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1693
1693
|
*/
|
|
1694
|
-
const APP_VERSION = "4.0.
|
|
1694
|
+
const APP_VERSION = "4.0.2";
|
|
1695
1695
|
// prettier-ignore
|
|
1696
1696
|
const ES = "es2015";
|
|
1697
1697
|
const IS_ES_MODERN = true;
|
|
@@ -15463,10 +15463,11 @@ class Popup extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__/* .UI
|
|
|
15463
15463
|
.off(this.container, 'scroll mousewheel', up)
|
|
15464
15464
|
.off(ow, 'scroll', up)
|
|
15465
15465
|
.off(ow, 'resize', up);
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15466
|
+
if (this.j.container.isConnected) {
|
|
15467
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .i.up(this.j.container, box => {
|
|
15468
|
+
box && this.j.e.off(box, 'scroll mousewheel', up);
|
|
15469
|
+
});
|
|
15470
|
+
}
|
|
15470
15471
|
}
|
|
15471
15472
|
/**
|
|
15472
15473
|
* Set ZIndex
|
|
@@ -17463,7 +17464,8 @@ let ContextMenu = class ContextMenu extends jodit_core_ui_popup__WEBPACK_IMPORTE
|
|
|
17463
17464
|
* ```
|
|
17464
17465
|
*/
|
|
17465
17466
|
show(x, y, actions) {
|
|
17466
|
-
const self = this
|
|
17467
|
+
const self = this;
|
|
17468
|
+
self.clear();
|
|
17467
17469
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isArray */ .kJ)(actions)) {
|
|
17468
17470
|
return;
|
|
17469
17471
|
}
|
|
@@ -17477,12 +17479,13 @@ let ContextMenu = class ContextMenu extends jodit_core_ui_popup__WEBPACK_IMPORTE
|
|
|
17477
17479
|
action.onAction((e) => {
|
|
17478
17480
|
var _a;
|
|
17479
17481
|
(_a = item.exec) === null || _a === void 0 ? void 0 : _a.call(self, e);
|
|
17482
|
+
self.clear();
|
|
17480
17483
|
self.close();
|
|
17481
17484
|
return false;
|
|
17482
17485
|
});
|
|
17483
|
-
|
|
17486
|
+
this.append(action);
|
|
17484
17487
|
});
|
|
17485
|
-
this.
|
|
17488
|
+
this.open(() => ({ left: x, top: y, width: 0, height: 0 }), true);
|
|
17486
17489
|
}
|
|
17487
17490
|
};
|
|
17488
17491
|
ContextMenu = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
@@ -18074,10 +18077,12 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18074
18077
|
this.getMod('static') === true) {
|
|
18075
18078
|
return this;
|
|
18076
18079
|
}
|
|
18080
|
+
const { e } = this;
|
|
18077
18081
|
/**
|
|
18078
18082
|
* Called up to close the window
|
|
18079
18083
|
*/
|
|
18080
|
-
if (
|
|
18084
|
+
if (e.fire(this, 'beforeClose') === false ||
|
|
18085
|
+
e.fire('beforeClose', this) === false) {
|
|
18081
18086
|
return this;
|
|
18082
18087
|
}
|
|
18083
18088
|
this.setMod('active', false);
|
|
@@ -18090,8 +18095,8 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18090
18095
|
/**
|
|
18091
18096
|
* It called after the window is closed
|
|
18092
18097
|
*/
|
|
18093
|
-
|
|
18094
|
-
|
|
18098
|
+
e.fire(this, 'afterClose');
|
|
18099
|
+
e.fire(this.ow, 'joditCloseDialog');
|
|
18095
18100
|
if (this.destroyAfterClose) {
|
|
18096
18101
|
this.destruct();
|
|
18097
18102
|
}
|
|
@@ -18533,7 +18538,9 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
18533
18538
|
]);
|
|
18534
18539
|
}, self.defaultTimeout);
|
|
18535
18540
|
self.e
|
|
18536
|
-
.on('beforeClose', () =>
|
|
18541
|
+
.on('beforeClose', () => {
|
|
18542
|
+
contextmenu.close();
|
|
18543
|
+
})
|
|
18537
18544
|
.on('beforeDestruct', () => contextmenu.destruct());
|
|
18538
18545
|
e.stopPropagation();
|
|
18539
18546
|
e.preventDefault();
|
|
@@ -19003,7 +19010,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.controls.fil
|
|
|
19003
19010
|
|
|
19004
19011
|
|
|
19005
19012
|
const DEFAULT_SOURCE_NAME = 'default';
|
|
19006
|
-
const possibleRules = [
|
|
19013
|
+
const possibleRules = new Set([
|
|
19007
19014
|
'allowFiles',
|
|
19008
19015
|
'allowFileMove',
|
|
19009
19016
|
'allowFileUpload',
|
|
@@ -19017,7 +19024,7 @@ const possibleRules = [
|
|
|
19017
19024
|
'allowFolderRename',
|
|
19018
19025
|
'allowImageResize',
|
|
19019
19026
|
'allowImageCrop'
|
|
19020
|
-
];
|
|
19027
|
+
]);
|
|
19021
19028
|
let DataProvider = class DataProvider {
|
|
19022
19029
|
constructor(parent, options) {
|
|
19023
19030
|
this.parent = parent;
|
|
@@ -19100,13 +19107,13 @@ let DataProvider = class DataProvider {
|
|
|
19100
19107
|
canI(action) {
|
|
19101
19108
|
const rule = 'allow' + action;
|
|
19102
19109
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__.IS_PROD) {
|
|
19103
|
-
if (!possibleRules.
|
|
19110
|
+
if (!possibleRules.has(rule)) {
|
|
19104
19111
|
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Wrong action ' + action);
|
|
19105
19112
|
}
|
|
19106
19113
|
}
|
|
19107
|
-
const
|
|
19108
|
-
if (
|
|
19109
|
-
return
|
|
19114
|
+
const presetValue = this.o.permissionsPresets[rule];
|
|
19115
|
+
if (presetValue !== undefined) {
|
|
19116
|
+
return presetValue;
|
|
19110
19117
|
}
|
|
19111
19118
|
return (this.__currentPermissions == null ||
|
|
19112
19119
|
this.__currentPermissions[rule] === undefined ||
|
|
@@ -19622,11 +19629,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19622
19629
|
minHeight: 300,
|
|
19623
19630
|
buttons: (_a = this.o.headerButtons) !== null && _a !== void 0 ? _a : ['fullsize', 'dialog.close']
|
|
19624
19631
|
});
|
|
19625
|
-
['afterClose', 'beforeOpen'].forEach(proxyEvent =>
|
|
19626
|
-
dialog.events.on(dialog, proxyEvent, () => {
|
|
19627
|
-
this.e.fire(proxyEvent);
|
|
19628
|
-
});
|
|
19629
|
-
});
|
|
19632
|
+
['beforeClose', 'afterClose', 'beforeOpen'].forEach(proxyEvent => dialog.events.on(dialog, proxyEvent, () => this.e.fire(proxyEvent)));
|
|
19630
19633
|
dialog.setSize(this.o.width, this.o.height);
|
|
19631
19634
|
return dialog;
|
|
19632
19635
|
}
|