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/es2018/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 = "es2018";
|
|
1697
1697
|
const IS_ES_MODERN = true;
|
|
@@ -15520,10 +15520,11 @@ class Popup extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_3__/* .UI
|
|
|
15520
15520
|
.off(this.container, 'scroll mousewheel', up)
|
|
15521
15521
|
.off(ow, 'scroll', up)
|
|
15522
15522
|
.off(ow, 'resize', up);
|
|
15523
|
-
|
|
15524
|
-
|
|
15525
|
-
|
|
15526
|
-
|
|
15523
|
+
if (this.j.container.isConnected) {
|
|
15524
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .i.up(this.j.container, box => {
|
|
15525
|
+
box && this.j.e.off(box, 'scroll mousewheel', up);
|
|
15526
|
+
});
|
|
15527
|
+
}
|
|
15527
15528
|
}
|
|
15528
15529
|
/**
|
|
15529
15530
|
* Set ZIndex
|
|
@@ -17523,7 +17524,8 @@ let ContextMenu = class ContextMenu extends jodit_core_ui_popup__WEBPACK_IMPORTE
|
|
|
17523
17524
|
* ```
|
|
17524
17525
|
*/
|
|
17525
17526
|
show(x, y, actions) {
|
|
17526
|
-
const self = this
|
|
17527
|
+
const self = this;
|
|
17528
|
+
self.clear();
|
|
17527
17529
|
if (!(0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isArray */ .kJ)(actions)) {
|
|
17528
17530
|
return;
|
|
17529
17531
|
}
|
|
@@ -17537,12 +17539,13 @@ let ContextMenu = class ContextMenu extends jodit_core_ui_popup__WEBPACK_IMPORTE
|
|
|
17537
17539
|
action.onAction((e) => {
|
|
17538
17540
|
var _a;
|
|
17539
17541
|
(_a = item.exec) === null || _a === void 0 ? void 0 : _a.call(self, e);
|
|
17542
|
+
self.clear();
|
|
17540
17543
|
self.close();
|
|
17541
17544
|
return false;
|
|
17542
17545
|
});
|
|
17543
|
-
|
|
17546
|
+
this.append(action);
|
|
17544
17547
|
});
|
|
17545
|
-
this.
|
|
17548
|
+
this.open(() => ({ left: x, top: y, width: 0, height: 0 }), true);
|
|
17546
17549
|
}
|
|
17547
17550
|
};
|
|
17548
17551
|
ContextMenu = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
@@ -18134,10 +18137,12 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18134
18137
|
this.getMod('static') === true) {
|
|
18135
18138
|
return this;
|
|
18136
18139
|
}
|
|
18140
|
+
const { e } = this;
|
|
18137
18141
|
/**
|
|
18138
18142
|
* Called up to close the window
|
|
18139
18143
|
*/
|
|
18140
|
-
if (
|
|
18144
|
+
if (e.fire(this, 'beforeClose') === false ||
|
|
18145
|
+
e.fire('beforeClose', this) === false) {
|
|
18141
18146
|
return this;
|
|
18142
18147
|
}
|
|
18143
18148
|
this.setMod('active', false);
|
|
@@ -18150,8 +18155,8 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
|
|
|
18150
18155
|
/**
|
|
18151
18156
|
* It called after the window is closed
|
|
18152
18157
|
*/
|
|
18153
|
-
|
|
18154
|
-
|
|
18158
|
+
e.fire(this, 'afterClose');
|
|
18159
|
+
e.fire(this.ow, 'joditCloseDialog');
|
|
18155
18160
|
if (this.destroyAfterClose) {
|
|
18156
18161
|
this.destruct();
|
|
18157
18162
|
}
|
|
@@ -18595,7 +18600,9 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
18595
18600
|
]);
|
|
18596
18601
|
}, self.defaultTimeout);
|
|
18597
18602
|
self.e
|
|
18598
|
-
.on('beforeClose', () =>
|
|
18603
|
+
.on('beforeClose', () => {
|
|
18604
|
+
contextmenu.close();
|
|
18605
|
+
})
|
|
18599
18606
|
.on('beforeDestruct', () => contextmenu.destruct());
|
|
18600
18607
|
e.stopPropagation();
|
|
18601
18608
|
e.preventDefault();
|
|
@@ -19075,7 +19082,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.controls.fil
|
|
|
19075
19082
|
|
|
19076
19083
|
|
|
19077
19084
|
const DEFAULT_SOURCE_NAME = 'default';
|
|
19078
|
-
const possibleRules = [
|
|
19085
|
+
const possibleRules = new Set([
|
|
19079
19086
|
'allowFiles',
|
|
19080
19087
|
'allowFileMove',
|
|
19081
19088
|
'allowFileUpload',
|
|
@@ -19089,7 +19096,7 @@ const possibleRules = [
|
|
|
19089
19096
|
'allowFolderRename',
|
|
19090
19097
|
'allowImageResize',
|
|
19091
19098
|
'allowImageCrop'
|
|
19092
|
-
];
|
|
19099
|
+
]);
|
|
19093
19100
|
let DataProvider = class DataProvider {
|
|
19094
19101
|
constructor(parent, options) {
|
|
19095
19102
|
this.parent = parent;
|
|
@@ -19170,13 +19177,13 @@ let DataProvider = class DataProvider {
|
|
|
19170
19177
|
canI(action) {
|
|
19171
19178
|
const rule = 'allow' + action;
|
|
19172
19179
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__.IS_PROD) {
|
|
19173
|
-
if (!possibleRules.
|
|
19180
|
+
if (!possibleRules.has(rule)) {
|
|
19174
19181
|
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.error)('Wrong action ' + action);
|
|
19175
19182
|
}
|
|
19176
19183
|
}
|
|
19177
|
-
const
|
|
19178
|
-
if (
|
|
19179
|
-
return
|
|
19184
|
+
const presetValue = this.o.permissionsPresets[rule];
|
|
19185
|
+
if (presetValue !== undefined) {
|
|
19186
|
+
return presetValue;
|
|
19180
19187
|
}
|
|
19181
19188
|
return (this.__currentPermissions == null ||
|
|
19182
19189
|
this.__currentPermissions[rule] === undefined ||
|
|
@@ -19690,11 +19697,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19690
19697
|
minHeight: 300,
|
|
19691
19698
|
buttons: (_a = this.o.headerButtons) !== null && _a !== void 0 ? _a : ['fullsize', 'dialog.close']
|
|
19692
19699
|
});
|
|
19693
|
-
['afterClose', 'beforeOpen'].forEach(proxyEvent =>
|
|
19694
|
-
dialog.events.on(dialog, proxyEvent, () => {
|
|
19695
|
-
this.e.fire(proxyEvent);
|
|
19696
|
-
});
|
|
19697
|
-
});
|
|
19700
|
+
['beforeClose', 'afterClose', 'beforeOpen'].forEach(proxyEvent => dialog.events.on(dialog, proxyEvent, () => this.e.fire(proxyEvent)));
|
|
19698
19701
|
dialog.setSize(this.o.width, this.o.height);
|
|
19699
19702
|
return dialog;
|
|
19700
19703
|
}
|