jodit 4.1.14 → 4.1.16
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +28 -20
- 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 +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +28 -20
- 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 +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +27 -20
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +27 -20
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +28 -20
- package/es5/jodit.min.css +2 -2
- 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/decorators/cache/cache.d.ts +2 -1
- package/esm/core/decorators/cache/cache.js +7 -0
- package/esm/core/ui/button/tooltip/tooltip.js +2 -4
- package/esm/plugins/ai-assistant/ai-assistant.js +3 -3
- package/package.json +1 -1
- package/types/core/decorators/cache/cache.d.ts +2 -1
package/esm/core/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.1.
|
|
6
|
+
export const APP_VERSION = "4.1.16";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module decorators/cache
|
|
10
10
|
*/
|
|
11
|
-
import type { IDictionary } from "jodit/esm/types";
|
|
11
|
+
import type { IDictionary, Nullable } from "jodit/esm/types";
|
|
12
12
|
export interface CachePropertyDescriptor<T, R> extends PropertyDescriptor {
|
|
13
13
|
get?: (this: T) => R;
|
|
14
14
|
}
|
|
15
|
+
export declare function cached<T>(object: object, property: string): Nullable<T>;
|
|
15
16
|
export declare function cache<T, R>(_: object, name: PropertyKey, descriptor: CachePropertyDescriptor<T, R>): void;
|
|
16
17
|
export declare function cacheHTML<T extends Function, R>(target: IDictionary, _: string, descriptor: CachePropertyDescriptor<T, R>): void;
|
|
@@ -7,6 +7,13 @@ import { STATUSES } from "jodit/esm/core/component/statuses.js";
|
|
|
7
7
|
import { Dom } from "jodit/esm/core/dom/dom.js";
|
|
8
8
|
import { isFunction, isViewObject } from "jodit/esm/core/helpers/checker/index.js";
|
|
9
9
|
import { error } from "jodit/esm/core/helpers/utils/error/error.js";
|
|
10
|
+
export function cached(object, property) {
|
|
11
|
+
const descriptor = Object.getOwnPropertyDescriptor(object, property);
|
|
12
|
+
if (!descriptor || isFunction(descriptor.get)) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return descriptor.value;
|
|
16
|
+
}
|
|
10
17
|
export function cache(_, name, descriptor) {
|
|
11
18
|
const getter = descriptor.get;
|
|
12
19
|
if (!getter) {
|
|
@@ -39,7 +39,8 @@ let UITooltip = UITooltip_1 = class UITooltip extends UIElement {
|
|
|
39
39
|
view.o.showTooltip &&
|
|
40
40
|
!view.o.useNativeTooltip) {
|
|
41
41
|
view.hookStatus(STATUSES.ready, () => {
|
|
42
|
-
|
|
42
|
+
// TODO Move it inside __open method. Now it is here becous testcase failed with capturing
|
|
43
|
+
getContainer(this.j, UITooltip_1).appendChild(this.container);
|
|
43
44
|
view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
|
|
44
45
|
capture: true
|
|
45
46
|
});
|
|
@@ -168,9 +169,6 @@ __decorate([
|
|
|
168
169
|
__decorate([
|
|
169
170
|
autobind
|
|
170
171
|
], UITooltip.prototype, "__onMouseEnter", null);
|
|
171
|
-
__decorate([
|
|
172
|
-
autobind
|
|
173
|
-
], UITooltip.prototype, "__delayOpen", null);
|
|
174
172
|
__decorate([
|
|
175
173
|
autobind
|
|
176
174
|
], UITooltip.prototype, "__hide", null);
|
|
@@ -13,7 +13,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
13
13
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14
14
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15
15
|
};
|
|
16
|
-
import { cache } from "jodit/esm/core/decorators/cache/cache.js";
|
|
16
|
+
import { cache, cached } from "jodit/esm/core/decorators/cache/cache.js";
|
|
17
17
|
import { watch } from "jodit/esm/core/decorators/watch/watch.js";
|
|
18
18
|
import { extendLang, pluginSystem } from "jodit/esm/core/global.js";
|
|
19
19
|
import { isAbortError } from "jodit/esm/core/helpers/checker/is-abort-error.js";
|
|
@@ -100,8 +100,8 @@ export class aiAssistant extends Plugin {
|
|
|
100
100
|
}
|
|
101
101
|
/** @override */
|
|
102
102
|
beforeDestruct(_) {
|
|
103
|
-
this
|
|
104
|
-
this
|
|
103
|
+
cached(this, '__container')?.destruct();
|
|
104
|
+
cached(this, '__dialog')?.destruct();
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
__decorate([
|
package/package.json
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module decorators/cache
|
|
10
10
|
*/
|
|
11
|
-
import type { IDictionary } from "jodit/esm/types";
|
|
11
|
+
import type { IDictionary, Nullable } from "jodit/esm/types";
|
|
12
12
|
export interface CachePropertyDescriptor<T, R> extends PropertyDescriptor {
|
|
13
13
|
get?: (this: T) => R;
|
|
14
14
|
}
|
|
15
|
+
export declare function cached<T>(object: object, property: string): Nullable<T>;
|
|
15
16
|
export declare function cache<T, R>(_: object, name: PropertyKey, descriptor: CachePropertyDescriptor<T, R>): void;
|
|
16
17
|
export declare function cacheHTML<T extends Function, R>(target: IDictionary, _: string, descriptor: CachePropertyDescriptor<T, R>): void;
|