jodit 3.8.4 → 3.8.8
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/.idea/workspace.xml +165 -1308
- package/{.stylelintrc.json → .stylelintrc} +2 -1
- package/CHANGELOG.MD +54 -14
- package/build/jodit.css +280 -258
- package/build/jodit.es2018.css +231 -213
- package/build/jodit.es2018.en.css +231 -213
- package/build/jodit.es2018.en.js +9453 -9409
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -10
- package/build/jodit.es2018.js +13482 -13438
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -10
- package/build/jodit.js +9064 -9013
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -10
- package/build-system/index.js +78 -0
- package/{src/utils → build-system/loaders}/css-variables-prefixes.js +0 -0
- package/{src/utils → build-system/loaders}/lang-loader.js +0 -0
- package/build-system/loaders/style.js +31 -0
- package/{src/utils → build-system/loaders}/svg-loader.js +1 -0
- package/build-system/minimizer/css.js +20 -0
- package/build-system/minimizer/index.js +7 -0
- package/build-system/minimizer/js.js +41 -0
- package/{src/utils/plugin-loader.js → build-system/plugins/banner.js} +7 -6
- package/build-system/plugins/define.js +22 -0
- package/build-system/plugins/extract-css.js +14 -0
- package/build-system/plugins/index.js +31 -0
- package/build-system/plugins/post-build.js +52 -0
- package/build-system/rules/css.js +12 -0
- package/build-system/rules/extra-typescript.js +22 -0
- package/build-system/rules/index.js +17 -0
- package/build-system/rules/internal-typescript.js +23 -0
- package/build-system/rules/langs.js +20 -0
- package/build-system/rules/svg.js +19 -0
- package/build-system/utils/filename.js +17 -0
- package/{src → build-system}/utils/post-build.js +0 -0
- package/build-system/variables.js +53 -0
- package/package.json +34 -33
- package/src/config.ts +8 -14
- package/src/core/ajax.ts +16 -46
- package/src/core/async.ts +6 -17
- package/src/core/component/view-component.ts +0 -1
- package/src/core/constants.ts +5 -5
- package/src/core/create.ts +8 -27
- package/src/core/decorators/debounce.ts +0 -8
- package/src/core/decorators/hook.ts +0 -1
- package/src/core/decorators/nonenumerable.ts +1 -2
- package/src/core/decorators/persistent.ts +0 -3
- package/src/core/decorators/spy.ts +0 -1
- package/src/core/decorators/wait.ts +0 -1
- package/src/core/dom.ts +56 -114
- package/src/core/events/events-native.ts +52 -26
- package/src/core/events/observe-object.ts +0 -2
- package/src/core/global.ts +10 -6
- package/src/core/helpers/append-script.ts +0 -8
- package/src/core/helpers/array/as-array.ts +2 -5
- package/src/core/helpers/array/split-array.ts +0 -1
- package/src/core/helpers/async/set-timeout.ts +0 -7
- package/src/core/helpers/browser.ts +0 -1
- package/src/core/helpers/checker/has-browser-color-picker.ts +0 -3
- package/src/core/helpers/checker/is-array.ts +0 -1
- package/src/core/helpers/checker/is-equal.ts +0 -3
- package/src/core/helpers/checker/is-function.ts +0 -2
- package/src/core/helpers/checker/is-html-from-word.ts +0 -3
- package/src/core/helpers/checker/is-html.ts +0 -1
- package/src/core/helpers/checker/is-number.ts +0 -1
- package/src/core/helpers/checker/is-numeric.ts +0 -2
- package/src/core/helpers/checker/is-plain-object.ts +0 -1
- package/src/core/helpers/checker/is-string.ts +0 -1
- package/src/core/helpers/checker/is-url.ts +0 -4
- package/src/core/helpers/color/color-to-hex.ts +2 -2
- package/src/core/helpers/config-proto.ts +0 -3
- package/src/core/helpers/convert-media-url-to-video-embed.ts +1 -6
- package/src/core/helpers/ctrl-key.ts +1 -3
- package/src/core/helpers/data-bind.ts +0 -6
- package/src/core/helpers/default-language.ts +0 -3
- package/src/core/helpers/each.ts +12 -0
- package/src/core/helpers/html/htmlspecialchars.ts +0 -4
- package/src/core/helpers/html/nl2br.ts +0 -1
- package/src/core/helpers/human-size-to-bytes.ts +1 -4
- package/src/core/helpers/normalize/normalize-color.ts +2 -3
- package/src/core/helpers/normalize/normalize-key-aliases.ts +0 -2
- package/src/core/helpers/normalize/normalize-path.ts +0 -2
- package/src/core/helpers/normalize/normalize-size.ts +0 -3
- package/src/core/helpers/selector.ts +0 -8
- package/src/core/helpers/size/get-content-width.ts +0 -2
- package/src/core/helpers/size/offset.ts +1 -7
- package/src/core/helpers/size/position.ts +0 -4
- package/src/core/helpers/string/camel-case.ts +1 -2
- package/src/core/helpers/string/i18n.ts +0 -7
- package/src/core/helpers/string/kebab-case.ts +7 -5
- package/src/core/helpers/string/stringify.ts +0 -3
- package/src/core/helpers/string/trim.ts +0 -2
- package/src/core/helpers/string/ucfirst.ts +2 -5
- package/src/core/helpers/type.ts +0 -1
- package/src/core/helpers/utils/get.ts +0 -2
- package/src/core/helpers/utils/mark-deprecated.ts +0 -4
- package/src/core/helpers/utils/set.ts +0 -2
- package/src/core/helpers/utils/utils.ts +35 -14
- package/src/core/plugin-system.ts +0 -31
- package/src/core/selection/select.ts +15 -13
- package/src/core/selection/style/api/is-normal-node.ts +1 -2
- package/src/core/selection/style/api/toggle-styles.ts +0 -2
- package/src/core/selection/style/apply-style.ts +6 -2
- package/src/core/traits/mods.ts +1 -3
- package/src/core/ui/button/button/button.less +7 -3
- package/src/core/ui/button/button/button.ts +1 -1
- package/src/core/ui/button/group/group.less +5 -5
- package/src/core/ui/element.ts +0 -4
- package/src/core/ui/form/inputs/file/file.less +4 -4
- package/src/core/ui/form/validators/input.ts +0 -2
- package/src/core/ui/form/validators/select.ts +0 -1
- package/src/core/ui/helpers/get-control-type.ts +0 -2
- package/src/core/ui/icon.ts +0 -10
- package/src/core/ui/list/group.less +1 -1
- package/src/core/ui/list/group.ts +1 -6
- package/src/core/ui/list/list.ts +0 -3
- package/src/core/ui/popup/popup.ts +0 -11
- package/src/core/ui/progress-bar/progress-bar.less +8 -8
- package/src/core/view/view-with-toolbar.ts +0 -5
- package/src/core/view/view.ts +2 -18
- package/src/index.ts +1 -1
- package/src/jodit.ts +14 -70
- package/src/modules/context-menu/context-menu.ts +3 -6
- package/src/modules/dialog/alert.ts +0 -6
- package/src/modules/dialog/confirm.ts +1 -1
- package/src/modules/dialog/dialog.ts +22 -55
- package/src/modules/dialog/prompt.ts +3 -5
- package/src/modules/image-editor/image-editor.less +51 -46
- package/src/modules/status-bar/status-bar.less +12 -12
- package/src/modules/status-bar/status-bar.ts +0 -3
- package/src/modules/table.ts +17 -6
- package/src/modules/toolbar/button/button.less +5 -6
- package/src/modules/toolbar/button/button.ts +1 -1
- package/src/modules/toolbar/button/content.less +2 -2
- package/src/modules/widget/color-picker/color-picker.less +7 -6
- package/src/modules/widget/tabs/tabs.less +3 -3
- package/src/plugins/about/about.less +1 -1
- package/src/plugins/add-new-line/add-new-line.less +14 -15
- package/src/plugins/add-new-line/add-new-line.ts +1 -1
- package/src/plugins/clipboard/paste-storage/paste-storage.less +10 -11
- package/src/plugins/fix/clean-html.ts +2 -2
- package/src/plugins/fix/wrap-text-nodes.ts +1 -2
- package/src/plugins/fullsize/fullsize.less +5 -5
- package/src/plugins/image/image-properties/image-properties.less +11 -7
- package/src/plugins/image/image-properties/image-properties.ts +11 -8
- package/src/plugins/placeholder/placeholder.less +4 -4
- package/src/plugins/resizer/resizer.less +28 -23
- package/src/plugins/search/search.less +25 -25
- package/src/plugins/source/source.less +15 -15
- package/src/plugins/xpath/xpath.less +3 -3
- package/src/styles/form.less +19 -14
- package/src/styles/modules/button-group.less +2 -2
- package/src/styles/modules/icon.less +9 -8
- package/src/types/ajax.d.ts +28 -0
- package/src/types/async.d.ts +4 -3
- package/src/types/events.d.ts +15 -0
- package/tsconfig.json +1 -1
- package/types/config.d.ts +8 -14
- package/types/core/ajax.d.ts +6 -29
- package/types/core/async.d.ts +2 -15
- package/types/core/component/view-component.d.ts +0 -1
- package/types/core/constants.d.ts +5 -5
- package/types/core/create.d.ts +0 -4
- package/types/core/decorators/debounce.d.ts +0 -8
- package/types/core/decorators/hook.d.ts +0 -1
- package/types/core/decorators/nonenumerable.d.ts +1 -2
- package/types/core/decorators/persistent.d.ts +0 -3
- package/types/core/decorators/wait.d.ts +0 -1
- package/types/core/dom.d.ts +25 -112
- package/types/core/events/events-native.d.ts +18 -17
- package/types/core/events/observe-object.d.ts +0 -2
- package/types/core/global.d.ts +0 -4
- package/types/core/helpers/append-script.d.ts +0 -8
- package/types/core/helpers/array/as-array.d.ts +3 -0
- package/types/core/helpers/array/split-array.d.ts +0 -1
- package/types/core/helpers/async/set-timeout.d.ts +0 -7
- package/types/core/helpers/browser.d.ts +0 -1
- package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
- package/types/core/helpers/checker/is-array.d.ts +0 -1
- package/types/core/helpers/checker/is-equal.d.ts +0 -3
- package/types/core/helpers/checker/is-function.d.ts +0 -2
- package/types/core/helpers/checker/is-html-from-word.d.ts +0 -3
- package/types/core/helpers/checker/is-html.d.ts +0 -1
- package/types/core/helpers/checker/is-number.d.ts +0 -1
- package/types/core/helpers/checker/is-numeric.d.ts +0 -2
- package/types/core/helpers/checker/is-plain-object.d.ts +0 -1
- package/types/core/helpers/checker/is-string.d.ts +0 -1
- package/types/core/helpers/checker/is-url.d.ts +0 -4
- package/types/core/helpers/color/color-to-hex.d.ts +2 -2
- package/types/core/helpers/config-proto.d.ts +0 -3
- package/types/core/helpers/convert-media-url-to-video-embed.d.ts +1 -6
- package/types/core/helpers/ctrl-key.d.ts +1 -3
- package/types/core/helpers/data-bind.d.ts +0 -6
- package/types/core/helpers/default-language.d.ts +0 -3
- package/types/core/helpers/each.d.ts +9 -0
- package/types/core/helpers/html/htmlspecialchars.d.ts +0 -4
- package/types/core/helpers/html/nl2br.d.ts +0 -1
- package/types/core/helpers/human-size-to-bytes.d.ts +1 -4
- package/types/core/helpers/normalize/normalize-color.d.ts +2 -3
- package/types/core/helpers/normalize/normalize-key-aliases.d.ts +0 -2
- package/types/core/helpers/normalize/normalize-path.d.ts +0 -2
- package/types/core/helpers/normalize/normalize-size.d.ts +0 -3
- package/types/core/helpers/selector.d.ts +0 -8
- package/types/core/helpers/size/get-content-width.d.ts +0 -2
- package/types/core/helpers/size/offset.d.ts +1 -7
- package/types/core/helpers/string/camel-case.d.ts +1 -2
- package/types/core/helpers/string/i18n.d.ts +0 -7
- package/types/core/helpers/string/kebab-case.d.ts +1 -5
- package/types/core/helpers/string/stringify.d.ts +0 -3
- package/types/core/helpers/string/trim.d.ts +0 -2
- package/types/core/helpers/string/ucfirst.d.ts +1 -4
- package/types/core/helpers/type.d.ts +0 -1
- package/types/core/helpers/utils/get.d.ts +0 -2
- package/types/core/helpers/utils/mark-deprecated.d.ts +0 -4
- package/types/core/helpers/utils/set.d.ts +0 -2
- package/types/core/helpers/utils/utils.d.ts +4 -15
- package/types/core/plugin-system.d.ts +0 -31
- package/types/core/selection/select.d.ts +8 -9
- package/types/core/selection/style/api/toggle-styles.d.ts +0 -2
- package/types/core/traits/mods.d.ts +1 -3
- package/types/core/ui/element.d.ts +0 -4
- package/types/core/ui/form/validators/input.d.ts +0 -2
- package/types/core/ui/form/validators/select.d.ts +0 -1
- package/types/core/ui/helpers/get-control-type.d.ts +0 -2
- package/types/core/ui/icon.d.ts +0 -10
- package/types/core/ui/list/group.d.ts +1 -6
- package/types/core/ui/list/list.d.ts +0 -3
- package/types/core/ui/popup/popup.d.ts +0 -11
- package/types/core/view/view-with-toolbar.d.ts +0 -5
- package/types/core/view/view.d.ts +2 -18
- package/types/index.d.ts +1 -1
- package/types/jodit.d.ts +2 -46
- package/types/modules/context-menu/context-menu.d.ts +3 -6
- package/types/modules/dialog/alert.d.ts +0 -6
- package/types/modules/dialog/confirm.d.ts +1 -1
- package/types/modules/dialog/dialog.d.ts +9 -29
- package/types/modules/dialog/prompt.d.ts +3 -5
- package/types/modules/status-bar/status-bar.d.ts +0 -3
- package/types/modules/table.d.ts +1 -1
- package/types/types/ajax.d.ts +28 -0
- package/types/types/async.d.ts +4 -3
- package/types/types/events.d.ts +15 -0
- package/src/utils/create-entries.js +0 -57
- package/src/utils/lang-translater.js +0 -142
package/types/config.d.ts
CHANGED
|
@@ -54,12 +54,10 @@ export declare class Config implements IViewOptions {
|
|
|
54
54
|
zIndex: number;
|
|
55
55
|
/**
|
|
56
56
|
* Change the read-only state of the editor
|
|
57
|
-
* @type {boolean}
|
|
58
57
|
*/
|
|
59
58
|
readonly: boolean;
|
|
60
59
|
/**
|
|
61
60
|
* Change the disabled state of the editor
|
|
62
|
-
* @type {boolean}
|
|
63
61
|
*/
|
|
64
62
|
disabled: boolean;
|
|
65
63
|
activeButtonsInReadOnly: string[];
|
|
@@ -80,8 +78,6 @@ export declare class Config implements IViewOptions {
|
|
|
80
78
|
allowTabNavigation: boolean;
|
|
81
79
|
/**
|
|
82
80
|
* Inline editing mode
|
|
83
|
-
*
|
|
84
|
-
* @type {boolean}
|
|
85
81
|
*/
|
|
86
82
|
inline: boolean;
|
|
87
83
|
/**
|
|
@@ -141,7 +137,7 @@ export declare class Config implements IViewOptions {
|
|
|
141
137
|
* After all changes in editors for textarea will call change trigger
|
|
142
138
|
*
|
|
143
139
|
* @example
|
|
144
|
-
*
|
|
140
|
+
* ```javascript
|
|
145
141
|
* var editor = new Jodit('#editor');
|
|
146
142
|
* document.getElementById('editor').addEventListener('change', function () {
|
|
147
143
|
* console.log(this.value);
|
|
@@ -195,7 +191,7 @@ export declare class Config implements IViewOptions {
|
|
|
195
191
|
*/
|
|
196
192
|
debugLanguage: boolean;
|
|
197
193
|
/**
|
|
198
|
-
* Collection of language pack data {en: {'Type something': 'Type something', ...}}
|
|
194
|
+
* Collection of language pack data `{en: {'Type something': 'Type something', ...}}`
|
|
199
195
|
*
|
|
200
196
|
* @example
|
|
201
197
|
* ```javascript
|
|
@@ -236,7 +232,6 @@ export declare class Config implements IViewOptions {
|
|
|
236
232
|
showTooltipDelay: number;
|
|
237
233
|
/**
|
|
238
234
|
* Instead of create custop tooltip - use native title tooltips
|
|
239
|
-
* @type {boolean}
|
|
240
235
|
*/
|
|
241
236
|
useNativeTooltip: boolean;
|
|
242
237
|
/**
|
|
@@ -262,8 +257,6 @@ export declare class Config implements IViewOptions {
|
|
|
262
257
|
defaultMode: number;
|
|
263
258
|
/**
|
|
264
259
|
* Use split mode
|
|
265
|
-
*
|
|
266
|
-
* @type {boolean}
|
|
267
260
|
*/
|
|
268
261
|
useSplitMode: boolean;
|
|
269
262
|
/**
|
|
@@ -339,6 +332,7 @@ export declare class Config implements IViewOptions {
|
|
|
339
332
|
* But for a declarative declaration, you can use this option.
|
|
340
333
|
*
|
|
341
334
|
* @example
|
|
335
|
+
* ```js
|
|
342
336
|
* Jodit.modules.Icon.set('someIcon', '<svg><path.../></svg>');
|
|
343
337
|
* const editor = Jodit.make({
|
|
344
338
|
* extraButtons: [{
|
|
@@ -357,14 +351,16 @@ export declare class Config implements IViewOptions {
|
|
|
357
351
|
* icon: 'someIcon'
|
|
358
352
|
* }]
|
|
359
353
|
* });
|
|
360
|
-
*
|
|
354
|
+
* ```
|
|
361
355
|
* @example
|
|
356
|
+
* ```js
|
|
362
357
|
* const editor = Jodit.make({
|
|
363
358
|
* extraButtons: [{
|
|
364
359
|
* name: 'someButton',
|
|
365
360
|
* icon: '<svg><path.../></svg>'
|
|
366
361
|
* }]
|
|
367
362
|
* });
|
|
363
|
+
* ```
|
|
368
364
|
*/
|
|
369
365
|
extraIcons: IDictionary<string>;
|
|
370
366
|
/**
|
|
@@ -444,7 +440,7 @@ export declare class Config implements IViewOptions {
|
|
|
444
440
|
* return '<div>' + value + '</div>';
|
|
445
441
|
* }
|
|
446
442
|
* });
|
|
447
|
-
*
|
|
443
|
+
* ```
|
|
448
444
|
*/
|
|
449
445
|
buttons: ButtonsOption;
|
|
450
446
|
/**
|
|
@@ -456,7 +452,7 @@ export declare class Config implements IViewOptions {
|
|
|
456
452
|
*/
|
|
457
453
|
buttonsSM: ButtonsOption;
|
|
458
454
|
/**
|
|
459
|
-
* The list of buttons that appear in the editor's toolbar on extra small places (< options.sizeSM)
|
|
455
|
+
* The list of buttons that appear in the editor's toolbar on extra small places `(< options.sizeSM)`.
|
|
460
456
|
*/
|
|
461
457
|
buttonsXS: ButtonsOption;
|
|
462
458
|
/**
|
|
@@ -466,12 +462,10 @@ export declare class Config implements IViewOptions {
|
|
|
466
462
|
events: IDictionary<(...args: any[]) => any>;
|
|
467
463
|
/**
|
|
468
464
|
* Buttons in toolbat without SVG - only texts
|
|
469
|
-
* @type {boolean}
|
|
470
465
|
*/
|
|
471
466
|
textIcons: boolean;
|
|
472
467
|
/**
|
|
473
468
|
* shows a INPUT[type=color] to open the browser color picker, on the right bottom of widget color picker
|
|
474
|
-
* @type {boolean}
|
|
475
469
|
*/
|
|
476
470
|
showBrowserColorPicker: boolean;
|
|
477
471
|
private static __defaultOptions;
|
package/types/core/ajax.d.ts
CHANGED
|
@@ -4,34 +4,11 @@
|
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import type { IRequest, IViewBased, AjaxOptions, IAjax } from '../types';
|
|
7
|
-
/**
|
|
8
|
-
* @property {object} defaultAjaxOptions A set of key/value pairs that configure the Ajax request. All settings
|
|
9
|
-
* are optional
|
|
10
|
-
* @property {object} defaultAjaxOptions.headers An object of additional header key/value pairs toWYSIWYG send along
|
|
11
|
-
* with requests using the XMLHttpRequest transport. Uses in {@link FileBrowser|FileBrowser}
|
|
12
|
-
* and {@link Uploader|Uploader}
|
|
13
|
-
* @property {string} defaultAjaxOptions.dataType='json' json or text The type of data that you're expecting back
|
|
14
|
-
* from the server. if `json` the return value passes through the `JSON.parse`
|
|
15
|
-
* @property {string} defaultAjaxOptions.method='GET' The HTTP method toWYSIWYG use for the request
|
|
16
|
-
* (e.g. "POST", "GET", "PUT")
|
|
17
|
-
* @property {string} defaultAjaxOptions.url='' A string containing the URL toWYSIWYG which the request is sent.
|
|
18
|
-
* @property {string} defaultAjaxOptions.async=true By default, all requests are sent asynchronously (i.e. this is
|
|
19
|
-
* set toWYSIWYG true by default). If you need synchronous requests, set this option toWYSIWYG false
|
|
20
|
-
* @property {object|string} defaultAjaxOptions.data=null Data toWYSIWYG be sent toWYSIWYG the server.
|
|
21
|
-
* It is converted toWYSIWYG a query string, if not already a string. It's appended toWYSIWYG the url for GET-requests.
|
|
22
|
-
* @property {string} defaultAjaxOptions.contentType='application/x-www-form-urlencoded; charset=UTF-8'
|
|
23
|
-
* When sending data toWYSIWYG the server, use this content type. Default is "application/x-www-form-urlencoded;
|
|
24
|
-
* charset=UTF-8", which is fine for most cases
|
|
25
|
-
* @property {boolean} defaultAjaxOptions.withCredentials=false
|
|
26
|
-
* Enable or disable Access-Control-Allow-Credentials client side. Useful for cross domain requests
|
|
27
|
-
* @property {function} defaultAjaxOptions.error=function () {} A function toWYSIWYG be called if the request fails
|
|
28
|
-
* @property {function} defaultAjaxOptions.success=function (resp) {} A function toWYSIWYG be called if the
|
|
29
|
-
* request succeeds
|
|
30
|
-
* @property {function} defaultAjaxOptions.xhr=function () { return new XMLHttpRequest(); } Callback for creating
|
|
31
|
-
* the XMLHttpRequest object.
|
|
32
|
-
*/
|
|
33
7
|
declare module '../config' {
|
|
34
8
|
interface Config {
|
|
9
|
+
/**
|
|
10
|
+
* A set of key/value pairs that configure the Ajax request. All settings are optional
|
|
11
|
+
*/
|
|
35
12
|
defaultAjaxOptions: AjaxOptions;
|
|
36
13
|
}
|
|
37
14
|
}
|
|
@@ -39,7 +16,7 @@ export declare class Ajax implements IAjax {
|
|
|
39
16
|
readonly jodit: IViewBased;
|
|
40
17
|
static log: IRequest[];
|
|
41
18
|
private readonly xhr;
|
|
42
|
-
private
|
|
19
|
+
private successResponseCodes;
|
|
43
20
|
private __buildParams;
|
|
44
21
|
status: number;
|
|
45
22
|
response: string;
|
|
@@ -52,8 +29,8 @@ export declare class Ajax implements IAjax {
|
|
|
52
29
|
abort(): Ajax;
|
|
53
30
|
private resolved;
|
|
54
31
|
private activated;
|
|
55
|
-
send(): Promise<
|
|
32
|
+
send<T = any>(): Promise<T>;
|
|
56
33
|
prepareRequest(): IRequest;
|
|
57
34
|
constructor(jodit: IViewBased, options: Partial<AjaxOptions>);
|
|
58
|
-
destruct():
|
|
35
|
+
destruct(): void;
|
|
59
36
|
}
|
package/types/core/async.d.ts
CHANGED
|
@@ -14,10 +14,6 @@ export declare class Async implements IAsync {
|
|
|
14
14
|
* Debouncing enforces that a function not be called again until a certain amount of time has passed without
|
|
15
15
|
* it being called. As in "execute this function only if 100 milliseconds have passed without it being called."
|
|
16
16
|
*
|
|
17
|
-
* @param {function} fn
|
|
18
|
-
* @param {int} timeout
|
|
19
|
-
* @return {function}
|
|
20
|
-
*
|
|
21
17
|
* @example
|
|
22
18
|
* ```javascript
|
|
23
19
|
* var jodit = new Jodit('.editor');
|
|
@@ -26,20 +22,12 @@ export declare class Async implements IAsync {
|
|
|
26
22
|
* }, 100));
|
|
27
23
|
* ```
|
|
28
24
|
*
|
|
29
|
-
* @param fn
|
|
30
|
-
* @param timeout
|
|
31
|
-
* @param firstCallImmediately
|
|
32
25
|
*/
|
|
33
26
|
debounce(fn: CallbackFunction, timeout: ITimeout | IAsyncParams, firstCallImmediately?: boolean): CallbackFunction;
|
|
34
27
|
/**
|
|
35
28
|
* Throttling enforces a maximum number of times a function can be called over time.
|
|
36
29
|
* As in "execute this function at most once every 100 milliseconds."
|
|
37
30
|
*
|
|
38
|
-
* @method throttle
|
|
39
|
-
* @param {function} fn
|
|
40
|
-
* @param {int} timeout
|
|
41
|
-
* @param {context} [ctx] Context
|
|
42
|
-
* @return {function}
|
|
43
31
|
* @example
|
|
44
32
|
* ```javascript
|
|
45
33
|
* var jodit = new Jodit('.editor');
|
|
@@ -53,14 +41,13 @@ export declare class Async implements IAsync {
|
|
|
53
41
|
promise<T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject?: (reason?: any) => void) => void): RejectablePromise<T>;
|
|
54
42
|
/**
|
|
55
43
|
* Get Promise status
|
|
56
|
-
* @param p
|
|
57
44
|
*/
|
|
58
45
|
promiseState(p: Promise<any>): Promise<'pending' | 'fulfilled' | 'rejected'>;
|
|
59
46
|
private requestsIdle;
|
|
60
47
|
private requestIdleCallbackNative;
|
|
61
48
|
private cancelIdleCallbackNative;
|
|
62
|
-
requestIdleCallback(callback:
|
|
63
|
-
requestIdlePromise():
|
|
49
|
+
requestIdleCallback(callback: IdleRequestCallback): number;
|
|
50
|
+
requestIdlePromise(): RejectablePromise<number>;
|
|
64
51
|
cancelIdleCallback(request: number): void;
|
|
65
52
|
clear(): void;
|
|
66
53
|
isDestructed: boolean;
|
|
@@ -18,7 +18,6 @@ export declare abstract class ViewComponent<T extends IViewBased = IViewBased> e
|
|
|
18
18
|
i18n(text: string, ...params: Array<string | number>): string;
|
|
19
19
|
/**
|
|
20
20
|
* Attach component to View
|
|
21
|
-
* @param jodit
|
|
22
21
|
*/
|
|
23
22
|
setParentView(jodit: T): this;
|
|
24
23
|
constructor(jodit: T);
|
|
@@ -33,24 +33,24 @@ export declare const COMMAND_KEYS: string[];
|
|
|
33
33
|
export declare const BR = "br";
|
|
34
34
|
export declare const PARAGRAPH = "p";
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* WYSIWYG editor mode
|
|
37
37
|
*/
|
|
38
38
|
export declare const MODE_WYSIWYG = 1;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* html editor mode
|
|
41
41
|
*/
|
|
42
42
|
export declare const MODE_SOURCE = 2;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Source code editor and HTML editor both like
|
|
45
45
|
* {@link http://getuikit.com/docs/htmleditor.html|this}
|
|
46
46
|
*/
|
|
47
47
|
export declare const MODE_SPLIT = 3;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* Is Internet Explorer
|
|
50
50
|
*/
|
|
51
51
|
export declare const IS_IE: boolean;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* For IE11 it will be 'text'. Need for dataTransfer.setData
|
|
54
54
|
*/
|
|
55
55
|
export declare const TEXT_PLAIN: string;
|
|
56
56
|
export declare const TEXT_HTML: string;
|
package/types/core/create.d.ts
CHANGED
|
@@ -9,10 +9,6 @@ export declare class Create implements ICreate {
|
|
|
9
9
|
readonly createAttributes?: CanUndef<IDictionary<Attributes | NodeFunction>>;
|
|
10
10
|
private get doc();
|
|
11
11
|
constructor(document: Document | (() => Document), createAttributes?: CanUndef<IDictionary<Attributes | NodeFunction>>);
|
|
12
|
-
/**
|
|
13
|
-
* Apply some object key-value to HTMLElement
|
|
14
|
-
*/
|
|
15
|
-
private applyAttributes;
|
|
16
12
|
element<K extends keyof HTMLElementTagNameMap>(tagName: K, children?: Children): HTMLElementTagNameMap[K];
|
|
17
13
|
element<K extends keyof HTMLElementTagNameMap>(tagName: K, attributes?: Attributes, children?: Children): HTMLElementTagNameMap[K];
|
|
18
14
|
div(className?: string, childrenOrAttributes?: Children): HTMLDivElement;
|
|
@@ -6,17 +6,9 @@
|
|
|
6
6
|
import type { IViewBased, IViewComponent, IAsyncParams, DecoratorHandler } from '../../types';
|
|
7
7
|
/**
|
|
8
8
|
* Wrap function in debounce wrapper
|
|
9
|
-
*
|
|
10
|
-
* @param timeout
|
|
11
|
-
* @param firstCallImmediately
|
|
12
|
-
* @param method
|
|
13
9
|
*/
|
|
14
10
|
export declare function debounce<V = IViewComponent | IViewBased>(timeout?: number | ((ctx: V) => number | IAsyncParams) | IAsyncParams, firstCallImmediately?: boolean, method?: 'debounce' | 'throttle'): DecoratorHandler;
|
|
15
11
|
/**
|
|
16
12
|
* Wrap function in throttle wrapper
|
|
17
|
-
*
|
|
18
|
-
* @param timeout
|
|
19
|
-
* @param firstCallImmediately
|
|
20
|
-
* @param method
|
|
21
13
|
*/
|
|
22
14
|
export declare function throttle<V = IViewComponent | IViewBased>(timeout?: number | ((ctx: V) => number | IAsyncParams) | IAsyncParams, firstCallImmediately?: boolean): DecoratorHandler;
|
|
@@ -7,6 +7,5 @@ import type { ComponentStatus, IDictionary } from '../../types';
|
|
|
7
7
|
import type { Component } from '../component';
|
|
8
8
|
/**
|
|
9
9
|
* Call on some component status
|
|
10
|
-
* @param timeout
|
|
11
10
|
*/
|
|
12
11
|
export declare function hook(status: ComponentStatus): <T extends Component & IDictionary<any>>(target: IDictionary, propertyKey: string) => void;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @param value true|false
|
|
7
|
+
* Decorator that sets the enumerable property of a class field to false.
|
|
9
8
|
*/
|
|
10
9
|
export declare const nonenumerable: (target: object, propertyKey: string) => void;
|
|
@@ -6,8 +6,5 @@
|
|
|
6
6
|
import type { IComponent } from '../../types';
|
|
7
7
|
/**
|
|
8
8
|
* Allow save value inside persistent storage as set/get to property
|
|
9
|
-
*
|
|
10
|
-
* @param target
|
|
11
|
-
* @param propertyKey
|
|
12
9
|
*/
|
|
13
10
|
export declare function persistent<T extends IComponent>(target: T, propertyKey: string): void;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import type { IViewBased, IViewComponent } from '../../types';
|
|
7
7
|
/**
|
|
8
8
|
* Wrap function in wait wrapper, it will be called after `condition` returns `true`
|
|
9
|
-
* @param condition
|
|
10
9
|
*/
|
|
11
10
|
export declare function wait<T extends IViewBased>(condition: (ctx: T) => boolean): Function;
|
|
12
11
|
export declare function wait<T extends IViewComponent>(condition: (ctx: T) => boolean): Function;
|
package/types/core/dom.d.ts
CHANGED
|
@@ -3,42 +3,32 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2021 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
import type { HTMLTagNames, ICreate, IJodit, NodeCondition, Nullable } from '../types';
|
|
6
|
+
import type { HTMLTagNames, ICreate, IJodit, NodeCondition, Nullable, IDictionary } from '../types';
|
|
7
7
|
/**
|
|
8
8
|
* Module for working with DOM
|
|
9
9
|
*/
|
|
10
10
|
export declare class Dom {
|
|
11
11
|
/**
|
|
12
12
|
* Remove all content from element
|
|
13
|
-
* @param node
|
|
14
13
|
*/
|
|
15
14
|
static detach(node: Node): void;
|
|
16
15
|
/**
|
|
17
16
|
* Wrap all inline siblings
|
|
18
|
-
*
|
|
19
|
-
* @param current
|
|
20
|
-
* @param tag
|
|
21
|
-
* @param editor
|
|
22
17
|
*/
|
|
23
18
|
static wrapInline(current: Node, tag: Node | HTMLTagNames, editor: IJodit): HTMLElement;
|
|
24
19
|
/**
|
|
25
20
|
* Wrap node inside another node
|
|
26
|
-
*
|
|
27
|
-
* @param current
|
|
28
|
-
* @param tag
|
|
29
|
-
* @param editor
|
|
30
21
|
*/
|
|
31
22
|
static wrap<K extends HTMLTagNames>(current: Node, tag: K, create: ICreate): HTMLElementTagNameMap[K];
|
|
32
23
|
/**
|
|
33
24
|
* Remove parent of node and insert this node instead that parent
|
|
34
|
-
* @param node
|
|
35
25
|
*/
|
|
36
26
|
static unwrap(node: Node): void;
|
|
37
27
|
/**
|
|
38
28
|
* It goes through all the internal elements of the node, causing a callback function
|
|
39
29
|
*
|
|
40
|
-
* @param elm
|
|
41
|
-
* @param callback It called for each item found
|
|
30
|
+
* @param elm - the element whose children and descendants you want to iterate over
|
|
31
|
+
* @param callback - It called for each item found
|
|
42
32
|
* @example
|
|
43
33
|
* ```javascript
|
|
44
34
|
* Jodit.modules.Dom.each(parent.s.current(), function (node) {
|
|
@@ -52,20 +42,15 @@ export declare class Dom {
|
|
|
52
42
|
static each(elm: Node | HTMLElement, callback: (node: Node) => void | boolean): boolean;
|
|
53
43
|
/**
|
|
54
44
|
* Call function for all nodes between `start` and `end`
|
|
55
|
-
*
|
|
56
|
-
* @param start
|
|
57
|
-
* @param end
|
|
58
45
|
*/
|
|
59
46
|
static between(start: Node, end: Node, callback: (node: Node) => void | boolean): void;
|
|
60
47
|
/**
|
|
61
48
|
* Replace one tag to another transfer content
|
|
62
49
|
*
|
|
63
|
-
* @param
|
|
64
|
-
* @param
|
|
65
|
-
* @param
|
|
66
|
-
* @param
|
|
67
|
-
* @param {Document} [doc=document]
|
|
68
|
-
* @return {Node} Returns a new tag
|
|
50
|
+
* @param elm - The element that needs to be replaced by new
|
|
51
|
+
* @param newTagName - tag name for which will change `elm`
|
|
52
|
+
* @param withAttributes - If true move tag's attributes
|
|
53
|
+
* @param notMoveContent - false - Move content from elm to newTagName
|
|
69
54
|
* @example
|
|
70
55
|
* ```javascript
|
|
71
56
|
* Jodit.modules.Dom.replace(parent.editor.getElementsByTagName('span')[0], 'p');
|
|
@@ -77,16 +62,11 @@ export declare class Dom {
|
|
|
77
62
|
* Checks whether the Node text and blank (in this case it may contain invisible auxiliary characters ,
|
|
78
63
|
* it is also empty )
|
|
79
64
|
*
|
|
80
|
-
* @param
|
|
81
|
-
* @return {Boolean} true element is empty
|
|
65
|
+
* @param node - The element of wood to be checked
|
|
82
66
|
*/
|
|
83
67
|
static isEmptyTextNode(node: Node): boolean;
|
|
84
68
|
/**
|
|
85
69
|
* Check if element is empty
|
|
86
|
-
*
|
|
87
|
-
* @param {Node} node
|
|
88
|
-
* @param {RegExp} condNoEmptyElement
|
|
89
|
-
* @return {boolean}
|
|
90
70
|
*/
|
|
91
71
|
static isEmpty(node: Node, condNoEmptyElement?: RegExp): boolean;
|
|
92
72
|
/**
|
|
@@ -95,14 +75,10 @@ export declare class Dom {
|
|
|
95
75
|
static isNode(object: unknown): object is Node;
|
|
96
76
|
/**
|
|
97
77
|
* Check if element is table cell
|
|
98
|
-
* @param elm
|
|
99
78
|
*/
|
|
100
79
|
static isCell(elm: unknown): elm is HTMLTableCellElement;
|
|
101
80
|
/**
|
|
102
81
|
* Check is element is Image element
|
|
103
|
-
*
|
|
104
|
-
* @param {Node} elm
|
|
105
|
-
* @return {boolean}
|
|
106
82
|
*/
|
|
107
83
|
static isImage(elm: unknown): elm is HTMLImageElement;
|
|
108
84
|
/**
|
|
@@ -112,22 +88,18 @@ export declare class Dom {
|
|
|
112
88
|
static isBlock(node: unknown): node is HTMLDivElement;
|
|
113
89
|
/**
|
|
114
90
|
* Check if element is text node
|
|
115
|
-
* @param node
|
|
116
91
|
*/
|
|
117
92
|
static isText(node: Node | null | false): node is Text;
|
|
118
93
|
/**
|
|
119
94
|
* Check if element is element node
|
|
120
|
-
* @param node
|
|
121
95
|
*/
|
|
122
|
-
static isElement(node:
|
|
96
|
+
static isElement(node: unknown): node is Element;
|
|
123
97
|
/**
|
|
124
98
|
* Check if element is HTMLElement node
|
|
125
|
-
* @param node
|
|
126
99
|
*/
|
|
127
100
|
static isHTMLElement(node: unknown): node is HTMLElement;
|
|
128
101
|
/**
|
|
129
102
|
* Check element is inline block
|
|
130
|
-
* @param node
|
|
131
103
|
*/
|
|
132
104
|
static isInlineBlock(node: Node | null | false): node is HTMLElement;
|
|
133
105
|
/**
|
|
@@ -136,167 +108,108 @@ export declare class Dom {
|
|
|
136
108
|
static canSplitBlock(node: unknown): boolean;
|
|
137
109
|
/**
|
|
138
110
|
* Get last matched node inside root
|
|
139
|
-
*
|
|
140
|
-
* @param root
|
|
141
|
-
* @param condition
|
|
142
111
|
*/
|
|
143
112
|
static last(root: Nullable<Node>, condition: NodeCondition): Nullable<Node>;
|
|
144
113
|
/**
|
|
145
114
|
* Find previous node
|
|
146
|
-
*
|
|
147
|
-
* @param node
|
|
148
|
-
* @param condition
|
|
149
|
-
* @param root
|
|
150
|
-
* @param [withChild]
|
|
151
115
|
*/
|
|
152
116
|
static prev(node: Node, condition: NodeCondition, root: Node | HTMLElement | ParentNode, withChild?: boolean): Nullable<Node>;
|
|
153
117
|
/**
|
|
154
118
|
* Find next node what `condition(next) === true`
|
|
155
|
-
*
|
|
156
|
-
* @param node
|
|
157
|
-
* @param condition
|
|
158
|
-
* @param root
|
|
159
|
-
* @param [withChild]
|
|
160
119
|
*/
|
|
161
120
|
static next(node: Node, condition: NodeCondition, root: Node | HTMLElement | ParentNode, withChild?: boolean): Nullable<Node>;
|
|
162
121
|
static prevWithClass(node: HTMLElement, className: string): Nullable<HTMLElement>;
|
|
163
122
|
static nextWithClass(node: HTMLElement, className: string): Nullable<HTMLElement>;
|
|
164
123
|
/**
|
|
165
124
|
* Find next/prev node what `condition(next) === true`
|
|
166
|
-
*
|
|
167
|
-
* @param node
|
|
168
|
-
* @param condition
|
|
169
|
-
* @param root
|
|
170
|
-
* @param [recurse] check first argument
|
|
171
|
-
* @param [sibling] nextSibling or previousSibling
|
|
172
|
-
* @param [child] firstChild or lastChild
|
|
173
125
|
*/
|
|
174
126
|
static find(node: Node, condition: NodeCondition, root: ParentNode | HTMLElement | Node, recurse?: boolean, sibling?: keyof Node, child?: keyof Node | false): Nullable<Node>;
|
|
175
127
|
/**
|
|
176
128
|
* Find next/prev node what `condition(next) === true`
|
|
177
|
-
*
|
|
178
|
-
* @param node
|
|
179
|
-
* @param condition
|
|
180
|
-
* @param root
|
|
181
|
-
* @param [sibling] nextSibling or previousSibling
|
|
182
|
-
* @param [child] firstChild or lastChild
|
|
183
129
|
*/
|
|
184
130
|
static findWithCurrent(node: Node, condition: NodeCondition, root: HTMLElement | Node, sibling?: 'nextSibling' | 'previousSibling', child?: 'firstChild' | 'lastChild'): Nullable<Node>;
|
|
185
131
|
/**
|
|
186
132
|
* Get not empty sibling
|
|
187
|
-
*
|
|
188
|
-
* @param node
|
|
189
|
-
* @param [left]
|
|
190
|
-
* @param [cond]
|
|
191
133
|
*/
|
|
192
134
|
static findSibling(node: Node, left?: boolean, cond?: (n: Node) => boolean): Nullable<Node>;
|
|
193
135
|
/**
|
|
194
136
|
* It goes through all the elements in ascending order, and checks to see if they meet the predetermined condition
|
|
195
|
-
*
|
|
196
|
-
* @param node
|
|
197
|
-
* @param condition
|
|
198
|
-
* @param [root] Root element
|
|
199
|
-
* @param [checkRoot]
|
|
200
137
|
*/
|
|
201
138
|
static up<T extends HTMLElement>(node: Nullable<Node>, condition: NodeCondition, root?: Node, checkRoot?: boolean): Nullable<T>;
|
|
202
139
|
/**
|
|
203
140
|
* Find parent by tag name
|
|
204
|
-
*
|
|
205
|
-
* @param node
|
|
206
|
-
* @param tags
|
|
207
|
-
* @param root
|
|
208
141
|
*/
|
|
209
142
|
static closest<T extends HTMLElement, K extends HTMLTagNames>(node: Nullable<Node>, tags: K, root: HTMLElement): Nullable<HTMLElementTagNameMap[K]>;
|
|
210
143
|
static closest<T extends HTMLElement, K extends keyof HTMLElementTagNameMap>(node: Nullable<Node>, tags: K[], root: HTMLElement): Nullable<HTMLElementTagNameMap[K]>;
|
|
211
144
|
static closest<T extends HTMLElement>(node: Nullable<Node>, condition: NodeCondition, root: HTMLElement): Nullable<T>;
|
|
212
145
|
/**
|
|
213
146
|
* Furthest parent node matching condition
|
|
214
|
-
*
|
|
215
|
-
* @param node
|
|
216
|
-
* @param condition
|
|
217
|
-
* @param root
|
|
218
147
|
*/
|
|
219
148
|
static furthest<T extends HTMLElement>(node: Nullable<Node>, condition: NodeCondition, root: HTMLElement): Nullable<T>;
|
|
220
149
|
/**
|
|
221
150
|
* Append new element in the start of root
|
|
222
|
-
* @param root
|
|
223
|
-
* @param newElement
|
|
224
151
|
*/
|
|
225
152
|
static appendChildFirst(root: HTMLElement, newElement: HTMLElement | DocumentFragment): void;
|
|
226
153
|
/**
|
|
227
154
|
* Insert newElement after element
|
|
228
|
-
*
|
|
229
|
-
* @param elm
|
|
230
|
-
* @param newElement
|
|
231
155
|
*/
|
|
232
156
|
static after(elm: Node, newElement: Node | DocumentFragment): void;
|
|
233
157
|
/**
|
|
234
158
|
* Insert newElement before element
|
|
235
|
-
*
|
|
236
|
-
* @param elm
|
|
237
|
-
* @param newElement
|
|
238
159
|
*/
|
|
239
160
|
static before(elm: Node, newElement: Node | DocumentFragment): void;
|
|
240
161
|
/**
|
|
241
162
|
* Insert newElement as first child inside element
|
|
242
|
-
*
|
|
243
|
-
* @param elm
|
|
244
|
-
* @param newElement
|
|
245
163
|
*/
|
|
246
164
|
static prepend(root: Node, newElement: Node | DocumentFragment): void;
|
|
247
165
|
/**
|
|
248
166
|
* Insert newElement as last child inside element
|
|
249
|
-
*
|
|
250
|
-
* @param elm
|
|
251
|
-
* @param newElement
|
|
252
167
|
*/
|
|
253
168
|
static append(root: Node, newElements: Array<Node | DocumentFragment>): void;
|
|
254
169
|
static append(root: Node, newElement: Node | DocumentFragment): void;
|
|
255
170
|
/**
|
|
256
171
|
* Move all content to another element
|
|
257
|
-
*
|
|
258
|
-
* @param from
|
|
259
|
-
* @param to
|
|
260
|
-
* @param inStart
|
|
261
172
|
*/
|
|
262
173
|
static moveContent(from: Node, to: Node, inStart?: boolean): void;
|
|
263
174
|
/**
|
|
264
175
|
* Call callback condition function for all elements of node
|
|
265
|
-
*
|
|
266
|
-
* @param node
|
|
267
|
-
* @param condition
|
|
268
|
-
* @param prev
|
|
269
176
|
*/
|
|
270
177
|
static all(node: Node, condition: NodeCondition, prev?: boolean): Nullable<Node>;
|
|
271
178
|
/**
|
|
272
179
|
* Check root contains child or equal child
|
|
273
|
-
*
|
|
274
|
-
* @param root
|
|
275
|
-
* @param child
|
|
276
|
-
* @param [onlyContains]
|
|
277
180
|
*/
|
|
278
181
|
static isOrContains(root: Node, child: Node, onlyContains?: boolean): boolean;
|
|
279
182
|
/**
|
|
280
183
|
* Safe remove element from DOM
|
|
281
|
-
* @param node
|
|
282
184
|
*/
|
|
283
185
|
static safeRemove(node: Node | false | null | void): void;
|
|
284
186
|
/**
|
|
285
187
|
* Hide element
|
|
286
|
-
* @param node
|
|
287
188
|
*/
|
|
288
189
|
static hide(node: Nullable<HTMLElement>): void;
|
|
289
190
|
/**
|
|
290
191
|
* Show element
|
|
291
|
-
* @param node
|
|
292
192
|
*/
|
|
293
193
|
static show(node: Nullable<HTMLElement>): void;
|
|
294
194
|
/**
|
|
295
195
|
* Check if element is some tag
|
|
296
|
-
*
|
|
297
|
-
* @param node
|
|
298
|
-
* @param tagNames
|
|
299
196
|
*/
|
|
300
197
|
static isTag<K extends keyof HTMLElementTagNameMap>(node: Node | null | false | EventTarget, tagName: K): node is HTMLElementTagNameMap[K];
|
|
301
198
|
static isTag<K extends keyof HTMLElementTagNameMap>(node: Node | null | false | EventTarget, tagNames: K[]): node is HTMLElementTagNameMap[K];
|
|
199
|
+
/**
|
|
200
|
+
* Marks an item as temporary
|
|
201
|
+
*/
|
|
202
|
+
static markTemporary<K extends HTMLElement>(element: K, attributes?: IDictionary): K;
|
|
203
|
+
/**
|
|
204
|
+
* Check if element is temporary
|
|
205
|
+
*/
|
|
206
|
+
static isTemporary(element: unknown): boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Replace temporary elements from string
|
|
209
|
+
*/
|
|
210
|
+
static replaceTemporaryFromString(value: string): string;
|
|
211
|
+
/**
|
|
212
|
+
* Get temporary list
|
|
213
|
+
*/
|
|
214
|
+
static temporaryList(root: HTMLElement): HTMLElement[];
|
|
302
215
|
}
|