jodit 4.2.50 → 4.3.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 +27 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +238 -108
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.css +1 -1
- 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 +239 -108
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.css +1 -1
- 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 +237 -107
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.css +1 -1
- 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 +237 -107
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.css +1 -1
- 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/164.fat.min.js +1 -1
- package/es5/164.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +241 -109
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- 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/config.d.ts +4 -0
- package/esm/config.js +4 -0
- package/esm/core/async/index.d.ts +1 -1
- package/esm/core/component/index.d.ts +3 -3
- package/esm/core/component/view-component.d.ts +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/create/index.d.ts +1 -1
- package/esm/core/decorators/cache/cache.d.ts +100 -0
- package/esm/core/decorators/cache/cache.js +106 -0
- package/esm/core/decorators/index.d.ts +11 -11
- package/esm/core/dom/index.d.ts +2 -2
- package/esm/core/dom/lazy-walker.d.ts +1 -1
- package/esm/core/event-emitter/index.d.ts +4 -4
- package/esm/core/global.d.ts +7 -2
- package/esm/core/global.js +15 -13
- package/esm/core/helpers/array/index.d.ts +3 -3
- package/esm/core/helpers/async/index.d.ts +1 -1
- package/esm/core/helpers/checker/index.d.ts +25 -25
- package/esm/core/helpers/checker/is-abort-error.d.ts +1 -1
- package/esm/core/helpers/color/index.d.ts +1 -1
- package/esm/core/helpers/html/index.d.ts +6 -6
- package/esm/core/helpers/normalize/index.d.ts +8 -8
- package/esm/core/helpers/size/index.d.ts +6 -6
- package/esm/core/helpers/string/index.d.ts +7 -7
- package/esm/core/helpers/utils/error/errors/abort-error.d.ts +1 -1
- package/esm/core/helpers/utils/error/errors/index.d.ts +3 -3
- package/esm/core/helpers/utils/error/index.d.ts +1 -1
- package/esm/core/helpers/utils/index.d.ts +26 -26
- package/esm/core/helpers/utils/selector.d.ts +5 -1
- package/esm/core/helpers/utils/selector.js +3 -0
- package/esm/core/plugin/index.d.ts +2 -2
- package/esm/core/plugin/plugin-system.d.ts +1 -1
- package/esm/core/request/ajax.d.ts +1 -1
- package/esm/core/request/index.d.ts +2 -2
- package/esm/core/selection/helpers/index.d.ts +2 -2
- package/esm/core/selection/index.d.ts +3 -3
- package/esm/core/selection/selection.d.ts +1 -1
- package/esm/core/selection/style/api/index.d.ts +15 -15
- package/esm/core/storage/index.d.ts +3 -3
- package/esm/core/traits/dlgs.js +3 -0
- package/esm/core/ui/button/button/button.d.ts +1 -2
- package/esm/core/ui/button/group/group.d.ts +1 -2
- package/esm/core/ui/button/index.d.ts +3 -3
- package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -2
- package/esm/core/ui/element.d.ts +2 -2
- package/esm/core/ui/form/block/block.d.ts +1 -2
- package/esm/core/ui/form/form.d.ts +1 -1
- package/esm/core/ui/form/index.d.ts +2 -2
- package/esm/core/ui/form/inputs/area/area.d.ts +1 -2
- package/esm/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -2
- package/esm/core/ui/form/inputs/file/file.d.ts +1 -2
- package/esm/core/ui/form/inputs/index.d.ts +5 -5
- package/esm/core/ui/form/inputs/input/input.d.ts +1 -2
- package/esm/core/ui/form/inputs/select/select.d.ts +1 -2
- package/esm/core/ui/form/validators/index.d.ts +2 -2
- package/esm/core/ui/group/group.d.ts +1 -2
- package/esm/core/ui/group/index.d.ts +4 -4
- package/esm/core/ui/group/list.d.ts +1 -2
- package/esm/core/ui/group/separator.d.ts +1 -1
- package/esm/core/ui/group/spacer.d.ts +1 -1
- package/esm/core/ui/index.d.ts +3 -3
- package/esm/core/ui/popup/index.d.ts +1 -1
- package/esm/core/ui/popup/popup.d.ts +1 -2
- package/esm/core/ui/progress-bar/progress-bar.d.ts +1 -2
- package/esm/core/view/view-with-toolbar.d.ts +1 -2
- package/esm/core/view/view.d.ts +3 -3
- package/esm/core/view/view.js +4 -6
- package/esm/index.d.ts +2 -4
- package/esm/jodit.d.ts +3 -3
- package/esm/jodit.js +5 -5
- package/esm/modules/context-menu/context-menu.d.ts +1 -2
- package/esm/modules/dialog/dialog.d.ts +9 -10
- package/esm/modules/dialog/dialog.js +37 -30
- package/esm/modules/dialog/index.d.ts +4 -4
- package/esm/modules/file-browser/config.d.ts +1 -1
- package/esm/modules/file-browser/file-browser.d.ts +3 -4
- package/esm/modules/file-browser/file-browser.js +2 -2
- package/esm/modules/file-browser/index.d.ts +1 -1
- package/esm/modules/file-browser/ui/files/files.d.ts +0 -1
- package/esm/modules/file-browser/ui/index.d.ts +2 -2
- package/esm/modules/file-browser/ui/tree/tree.d.ts +0 -1
- package/esm/modules/history/command.d.ts +1 -1
- package/esm/modules/history/history.d.ts +2 -2
- package/esm/modules/history/stack.d.ts +1 -1
- package/esm/modules/image-editor/icons/crop.svg.js +1 -1
- package/esm/modules/image-editor/icons/resize.svg.js +1 -1
- package/esm/modules/image-editor/image-editor.d.ts +1 -2
- package/esm/modules/index.d.ts +13 -13
- package/esm/modules/messages/messages.d.ts +1 -2
- package/esm/modules/status-bar/status-bar.d.ts +2 -3
- package/esm/modules/toolbar/button/button.d.ts +0 -1
- package/esm/modules/toolbar/button/content.d.ts +0 -1
- package/esm/modules/toolbar/button/index.d.ts +3 -3
- package/esm/modules/toolbar/button/select/select.d.ts +1 -2
- package/esm/modules/toolbar/collection/collection.d.ts +0 -1
- package/esm/modules/toolbar/collection/editor-collection.d.ts +1 -1
- package/esm/modules/uploader/helpers/index.d.ts +5 -5
- package/esm/modules/uploader/uploader.d.ts +1 -2
- package/esm/modules/widget/color-picker/color-picker.d.ts +0 -1
- package/esm/modules/widget/color-picker/palette.svg.js +1 -1
- package/esm/modules/widget/index.d.ts +3 -3
- package/esm/modules/widget/tabs/tabs.d.ts +0 -1
- package/esm/plugins/about/about.d.ts +0 -1
- package/esm/plugins/about/about.svg.js +1 -1
- package/esm/plugins/add-new-line/add-new-line.d.ts +1 -2
- package/esm/plugins/add-new-line/enter.svg.js +1 -1
- package/esm/plugins/ai-assistant/ai-assistant.d.ts +2 -2
- package/esm/plugins/ai-assistant/ai-assistant.svg.js +1 -1
- package/esm/plugins/ai-assistant/chat-bot.svg.js +1 -1
- package/esm/plugins/ai-assistant/langs/index.d.ts +2 -2
- package/esm/plugins/ai-assistant/ui/ui-ai-assistant.d.ts +1 -2
- package/esm/plugins/backspace/backspace.d.ts +1 -1
- package/esm/plugins/backspace/cases/check-remove-char.d.ts +1 -1
- package/esm/plugins/backspace/cases/index.d.ts +2 -2
- package/esm/plugins/bold/bold.d.ts +2 -2
- package/esm/plugins/bold/icons/bold.svg.js +1 -1
- package/esm/plugins/bold/icons/italic.svg.js +1 -1
- package/esm/plugins/bold/icons/strikethrough.svg.js +1 -1
- package/esm/plugins/bold/icons/subscript.svg.js +1 -1
- package/esm/plugins/bold/icons/superscript.svg.js +1 -1
- package/esm/plugins/bold/icons/underline.svg.js +1 -1
- package/esm/plugins/class-span/class-span.svg.js +1 -1
- package/esm/plugins/clean-html/clean-html.d.ts +2 -2
- package/esm/plugins/clean-html/eraser.svg.js +1 -1
- package/esm/plugins/clean-html/helpers/index.d.ts +4 -4
- package/esm/plugins/clean-html/helpers/visitor/filters/index.d.ts +7 -7
- package/esm/plugins/clipboard/clipboard.d.ts +1 -1
- package/esm/plugins/clipboard/clipboard.js +2 -1
- package/esm/plugins/clipboard/icons/copy.svg.js +1 -1
- package/esm/plugins/clipboard/icons/cut.svg.js +1 -1
- package/esm/plugins/clipboard/icons/paste.svg.js +1 -1
- package/esm/plugins/clipboard/icons/select-all.svg.js +1 -1
- package/esm/plugins/color/brush.svg.js +1 -1
- package/esm/plugins/color/color.d.ts +1 -1
- package/esm/plugins/copy-format/copy-format.svg.js +1 -1
- package/esm/plugins/copy-format/langs/index.d.ts +21 -21
- package/esm/plugins/debug/debug.d.ts +1 -2
- package/esm/plugins/delete/delete.d.ts +1 -1
- package/esm/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +1 -1
- package/esm/plugins/dtd/after-insert/index.d.ts +1 -1
- package/esm/plugins/dtd/before-insert/index.d.ts +1 -1
- package/esm/plugins/dtd/dtd.d.ts +1 -1
- package/esm/plugins/enter/enter.d.ts +2 -2
- package/esm/plugins/enter/helpers/index.d.ts +9 -9
- package/esm/plugins/font/font.d.ts +1 -1
- package/esm/plugins/font/icons/font.svg.js +1 -1
- package/esm/plugins/font/icons/fontsize.svg.js +1 -1
- package/esm/plugins/format-block/format-block.d.ts +1 -1
- package/esm/plugins/format-block/paragraph.svg.js +1 -1
- package/esm/plugins/fullsize/config.d.ts +0 -1
- package/esm/plugins/fullsize/fullsize.d.ts +1 -2
- package/esm/plugins/fullsize/icons/fullsize.svg.js +1 -1
- package/esm/plugins/fullsize/icons/shrink.svg.js +1 -1
- package/esm/plugins/hotkeys/hotkeys.d.ts +1 -1
- package/esm/plugins/hr/hr.svg.js +1 -1
- package/esm/plugins/iframe/iframe.d.ts +1 -1
- package/esm/plugins/image/image.svg.js +1 -1
- package/esm/plugins/image-processor/image-processor.d.ts +1 -1
- package/esm/plugins/image-processor/image-processor.js +5 -4
- package/esm/plugins/image-properties/config.d.ts +1 -1
- package/esm/plugins/image-properties/image-properties.d.ts +3 -3
- package/esm/plugins/image-properties/readers/align.d.ts +1 -1
- package/esm/plugins/image-properties/readers/index.d.ts +1 -1
- package/esm/plugins/image-properties/readers/link.d.ts +1 -1
- package/esm/plugins/image-properties/readers/margin.d.ts +1 -1
- package/esm/plugins/image-properties/readers/size.d.ts +1 -1
- package/esm/plugins/image-properties/ui/ui-image-form.d.ts +2 -3
- package/esm/plugins/image-properties/ui/ui-image-main-tab.d.ts +2 -2
- package/esm/plugins/image-properties/ui/ui-image-position-tab.d.ts +2 -2
- package/esm/plugins/image-properties/utils/open-image-editor.d.ts +1 -1
- package/esm/plugins/image-properties/utils/open-image-popup.d.ts +1 -1
- package/esm/plugins/image-properties/writers/index.d.ts +1 -1
- package/esm/plugins/indent/icons/indent.svg.js +1 -1
- package/esm/plugins/indent/icons/outdent.svg.js +1 -1
- package/esm/plugins/indent/indent.d.ts +1 -1
- package/esm/plugins/index.d.ts +62 -62
- package/esm/plugins/inline-popup/icons/addcolumn.svg.js +1 -1
- package/esm/plugins/inline-popup/icons/addrow.svg.js +1 -1
- package/esm/plugins/inline-popup/icons/merge.svg.js +1 -1
- package/esm/plugins/inline-popup/icons/splitg.svg.js +1 -1
- package/esm/plugins/inline-popup/icons/splitv.svg.js +1 -1
- package/esm/plugins/inline-popup/icons/th-list.svg.js +1 -1
- package/esm/plugins/inline-popup/icons/th.svg.js +1 -1
- package/esm/plugins/inline-popup/inline-popup.d.ts +1 -2
- package/esm/plugins/justify/justify.svg.js +1 -1
- package/esm/plugins/limit/limit.d.ts +1 -1
- package/esm/plugins/line-height/langs/index.d.ts +22 -22
- package/esm/plugins/line-height/line-height.d.ts +1 -1
- package/esm/plugins/line-height/line-height.svg.js +1 -1
- package/esm/plugins/link/icons/link.svg.js +1 -1
- package/esm/plugins/link/icons/unlink.svg.js +1 -1
- package/esm/plugins/link/link.d.ts +1 -1
- package/esm/plugins/media/media.d.ts +1 -1
- package/esm/plugins/mobile/mobile.d.ts +1 -1
- package/esm/plugins/ordered-list/icons/ol.svg.js +1 -1
- package/esm/plugins/ordered-list/icons/ul.svg.js +1 -1
- package/esm/plugins/ordered-list/ordered-list.d.ts +1 -1
- package/esm/plugins/paste/helpers.d.ts +1 -1
- package/esm/plugins/paste/paste.d.ts +2 -2
- package/esm/plugins/paste-from-word/paste-from-word.d.ts +2 -2
- package/esm/plugins/paste-storage/paste-storage.d.ts +1 -2
- package/esm/plugins/placeholder/placeholder.d.ts +2 -3
- package/esm/plugins/preview/preview.d.ts +0 -1
- package/esm/plugins/print/print.svg.js +1 -1
- package/esm/plugins/redo-undo/icons/redo.svg.js +1 -1
- package/esm/plugins/redo-undo/icons/undo.svg.js +1 -1
- package/esm/plugins/redo-undo/redo-undo.d.ts +1 -1
- package/esm/plugins/resize-cells/resize-cells.d.ts +1 -2
- package/esm/plugins/resize-handler/resize-handler.d.ts +1 -1
- package/esm/plugins/resizer/resizer.d.ts +2 -3
- package/esm/plugins/search/config.d.ts +1 -1
- package/esm/plugins/search/helpers/index.d.ts +2 -2
- package/esm/plugins/search/search.d.ts +1 -1
- package/esm/plugins/search/search.js +2 -2
- package/esm/plugins/search/search.svg.js +1 -1
- package/esm/plugins/search/ui/search.d.ts +0 -1
- package/esm/plugins/select/select.d.ts +1 -1
- package/esm/plugins/select-cells/select-cells.d.ts +1 -1
- package/esm/plugins/size/size.d.ts +2 -3
- package/esm/plugins/source/editor/engines/ace.d.ts +1 -1
- package/esm/plugins/source/editor/engines/area.d.ts +1 -1
- package/esm/plugins/source/editor/engines/index.d.ts +2 -2
- package/esm/plugins/source/source.d.ts +1 -2
- package/esm/plugins/source/source.svg.js +1 -1
- package/esm/plugins/speech-recognize/config.d.ts +1 -1
- package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
- package/esm/plugins/speech-recognize/helpers/recognize-manager.d.ts +2 -2
- package/esm/plugins/speech-recognize/langs/index.d.ts +22 -22
- package/esm/plugins/speech-recognize/speech-recognize.d.ts +1 -2
- package/esm/plugins/speech-recognize/speech-recognize.svg.js +1 -1
- package/esm/plugins/spellcheck/langs/index.d.ts +22 -22
- package/esm/plugins/spellcheck/spellcheck.d.ts +1 -1
- package/esm/plugins/spellcheck/spellcheck.svg.js +1 -1
- package/esm/plugins/stat/stat.d.ts +2 -2
- package/esm/plugins/sticky/sticky.d.ts +2 -3
- package/esm/plugins/symbols/langs/index.d.ts +22 -22
- package/esm/plugins/symbols/symbols.d.ts +2 -3
- package/esm/plugins/symbols/symbols.svg.js +1 -1
- package/esm/plugins/tab/cases/index.d.ts +1 -1
- package/esm/plugins/tab/tab.d.ts +1 -1
- package/esm/plugins/table/table.d.ts +1 -2
- package/esm/plugins/table/table.svg.js +1 -1
- package/esm/plugins/video/video.d.ts +1 -1
- package/esm/plugins/video/video.svg.js +1 -1
- package/esm/plugins/wrap-nodes/wrap-nodes.d.ts +1 -1
- package/esm/plugins/xpath/xpath.d.ts +1 -2
- package/esm/polyfills.js +3 -3
- package/esm/styles/icons/angle-down.svg.js +1 -1
- package/esm/styles/icons/angle-left.svg.js +1 -1
- package/esm/styles/icons/angle-right.svg.js +1 -1
- package/esm/styles/icons/angle-up.svg.js +1 -1
- package/esm/styles/icons/bin.svg.js +1 -1
- package/esm/styles/icons/cancel.svg.js +1 -1
- package/esm/styles/icons/center.svg.js +1 -1
- package/esm/styles/icons/check.svg.js +1 -1
- package/esm/styles/icons/chevron.svg.js +1 -1
- package/esm/styles/icons/dots.svg.js +1 -1
- package/esm/styles/icons/eye.svg.js +1 -1
- package/esm/styles/icons/file.svg.js +1 -1
- package/esm/styles/icons/folder.svg.js +1 -1
- package/esm/styles/icons/index.d.ts +0 -27
- package/esm/styles/icons/info-circle.svg.js +1 -1
- package/esm/styles/icons/left.svg.js +1 -1
- package/esm/styles/icons/lock.svg.js +1 -1
- package/esm/styles/icons/ok.svg.js +1 -1
- package/esm/styles/icons/pencil.svg.js +1 -1
- package/esm/styles/icons/pins.svg.js +1 -1
- package/esm/styles/icons/plus.svg.js +1 -1
- package/esm/styles/icons/resize-handler.svg.js +1 -1
- package/esm/styles/icons/right.svg.js +1 -1
- package/esm/styles/icons/save.svg.js +1 -1
- package/esm/styles/icons/settings.svg.js +1 -1
- package/esm/styles/icons/unlock.svg.js +1 -1
- package/esm/styles/icons/update.svg.js +1 -1
- package/esm/styles/icons/upload.svg.js +1 -1
- package/esm/styles/icons/valign.svg.js +1 -1
- package/esm/types/ajax.d.ts +1 -1
- package/esm/types/async.d.ts +2 -2
- package/esm/types/context.d.ts +2 -2
- package/esm/types/core.d.ts +1 -1
- package/esm/types/create.d.ts +1 -1
- package/esm/types/dialog.d.ts +3 -3
- package/esm/types/events.d.ts +1 -1
- package/esm/types/file-browser.d.ts +7 -7
- package/esm/types/history.d.ts +1 -1
- package/esm/types/index.d.ts +23 -23
- package/esm/types/jodit.d.ts +5 -5
- package/esm/types/messages.d.ts +1 -1
- package/esm/types/plugin.d.ts +3 -3
- package/esm/types/popup.d.ts +2 -2
- package/esm/types/select.d.ts +2 -2
- package/esm/types/source.d.ts +1 -1
- package/esm/types/style.d.ts +2 -2
- package/esm/types/toolbar.d.ts +6 -6
- package/esm/types/traits.d.ts +2 -2
- package/esm/types/types.d.ts +2 -2
- package/esm/types/ui.d.ts +5 -5
- package/esm/types/uploader.d.ts +3 -3
- package/esm/types/view.d.ts +10 -9
- package/package.json +1 -1
- package/types/config.d.ts +4 -0
- package/types/core/async/index.d.ts +1 -1
- package/types/core/component/index.d.ts +3 -3
- package/types/core/component/view-component.d.ts +1 -1
- package/types/core/create/index.d.ts +1 -1
- package/types/core/decorators/cache/cache.d.ts +100 -0
- package/types/core/decorators/index.d.ts +11 -11
- package/types/core/dom/index.d.ts +2 -2
- package/types/core/dom/lazy-walker.d.ts +1 -1
- package/types/core/event-emitter/index.d.ts +4 -4
- package/types/core/global.d.ts +7 -2
- package/types/core/helpers/array/index.d.ts +3 -3
- package/types/core/helpers/async/index.d.ts +1 -1
- package/types/core/helpers/checker/index.d.ts +25 -25
- package/types/core/helpers/checker/is-abort-error.d.ts +1 -1
- package/types/core/helpers/color/index.d.ts +1 -1
- package/types/core/helpers/html/index.d.ts +6 -6
- package/types/core/helpers/normalize/index.d.ts +8 -8
- package/types/core/helpers/size/index.d.ts +6 -6
- package/types/core/helpers/string/index.d.ts +7 -7
- package/types/core/helpers/utils/error/errors/abort-error.d.ts +1 -1
- package/types/core/helpers/utils/error/errors/index.d.ts +3 -3
- package/types/core/helpers/utils/error/index.d.ts +1 -1
- package/types/core/helpers/utils/index.d.ts +26 -26
- package/types/core/helpers/utils/selector.d.ts +5 -1
- package/types/core/plugin/index.d.ts +2 -2
- package/types/core/plugin/plugin-system.d.ts +1 -1
- package/types/core/request/ajax.d.ts +1 -1
- package/types/core/request/index.d.ts +2 -2
- package/types/core/selection/helpers/index.d.ts +2 -2
- package/types/core/selection/index.d.ts +3 -3
- package/types/core/selection/selection.d.ts +1 -1
- package/types/core/selection/style/api/index.d.ts +15 -15
- package/types/core/storage/index.d.ts +3 -3
- package/types/core/ui/button/button/button.d.ts +1 -2
- package/types/core/ui/button/group/group.d.ts +1 -2
- package/types/core/ui/button/index.d.ts +3 -3
- package/types/core/ui/button/tooltip/tooltip.d.ts +1 -2
- package/types/core/ui/element.d.ts +2 -2
- package/types/core/ui/form/block/block.d.ts +1 -2
- package/types/core/ui/form/form.d.ts +1 -1
- package/types/core/ui/form/index.d.ts +2 -2
- package/types/core/ui/form/inputs/area/area.d.ts +1 -2
- package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -2
- package/types/core/ui/form/inputs/file/file.d.ts +1 -2
- package/types/core/ui/form/inputs/index.d.ts +5 -5
- package/types/core/ui/form/inputs/input/input.d.ts +1 -2
- package/types/core/ui/form/inputs/select/select.d.ts +1 -2
- package/types/core/ui/form/validators/index.d.ts +2 -2
- package/types/core/ui/group/group.d.ts +1 -2
- package/types/core/ui/group/index.d.ts +4 -4
- package/types/core/ui/group/list.d.ts +1 -2
- package/types/core/ui/group/separator.d.ts +1 -1
- package/types/core/ui/group/spacer.d.ts +1 -1
- package/types/core/ui/index.d.ts +3 -3
- package/types/core/ui/popup/index.d.ts +1 -1
- package/types/core/ui/popup/popup.d.ts +1 -2
- package/types/core/ui/progress-bar/progress-bar.d.ts +1 -2
- package/types/core/view/view-with-toolbar.d.ts +1 -2
- package/types/core/view/view.d.ts +3 -3
- package/types/index.d.ts +2 -4
- package/types/jodit.d.ts +3 -3
- package/types/modules/context-menu/context-menu.d.ts +1 -2
- package/types/modules/dialog/dialog.d.ts +9 -10
- package/types/modules/dialog/index.d.ts +4 -4
- package/types/modules/file-browser/config.d.ts +1 -1
- package/types/modules/file-browser/file-browser.d.ts +3 -4
- package/types/modules/file-browser/index.d.ts +1 -1
- package/types/modules/file-browser/ui/files/files.d.ts +0 -1
- package/types/modules/file-browser/ui/index.d.ts +2 -2
- package/types/modules/file-browser/ui/tree/tree.d.ts +0 -1
- package/types/modules/history/command.d.ts +1 -1
- package/types/modules/history/history.d.ts +2 -2
- package/types/modules/history/stack.d.ts +1 -1
- package/types/modules/image-editor/image-editor.d.ts +1 -2
- package/types/modules/index.d.ts +13 -13
- package/types/modules/messages/messages.d.ts +1 -2
- package/types/modules/status-bar/status-bar.d.ts +2 -3
- package/types/modules/toolbar/button/button.d.ts +0 -1
- package/types/modules/toolbar/button/content.d.ts +0 -1
- package/types/modules/toolbar/button/index.d.ts +3 -3
- package/types/modules/toolbar/button/select/select.d.ts +1 -2
- package/types/modules/toolbar/collection/collection.d.ts +0 -1
- package/types/modules/toolbar/collection/editor-collection.d.ts +1 -1
- package/types/modules/uploader/helpers/index.d.ts +5 -5
- package/types/modules/uploader/uploader.d.ts +1 -2
- package/types/modules/widget/color-picker/color-picker.d.ts +0 -1
- package/types/modules/widget/index.d.ts +3 -3
- package/types/modules/widget/tabs/tabs.d.ts +0 -1
- package/types/plugins/about/about.d.ts +0 -1
- package/types/plugins/add-new-line/add-new-line.d.ts +1 -2
- package/types/plugins/ai-assistant/ai-assistant.d.ts +2 -2
- package/types/plugins/ai-assistant/langs/index.d.ts +2 -2
- package/types/plugins/ai-assistant/ui/ui-ai-assistant.d.ts +1 -2
- package/types/plugins/backspace/backspace.d.ts +1 -1
- package/types/plugins/backspace/cases/check-remove-char.d.ts +1 -1
- package/types/plugins/backspace/cases/index.d.ts +2 -2
- package/types/plugins/bold/bold.d.ts +2 -2
- package/types/plugins/clean-html/clean-html.d.ts +2 -2
- package/types/plugins/clean-html/helpers/index.d.ts +4 -4
- package/types/plugins/clean-html/helpers/visitor/filters/index.d.ts +7 -7
- package/types/plugins/clipboard/clipboard.d.ts +1 -1
- package/types/plugins/color/color.d.ts +1 -1
- package/types/plugins/copy-format/langs/index.d.ts +21 -21
- package/types/plugins/debug/debug.d.ts +1 -2
- package/types/plugins/delete/delete.d.ts +1 -1
- package/types/plugins/drag-and-drop-element/drag-and-drop-element.d.ts +1 -1
- package/types/plugins/dtd/after-insert/index.d.ts +1 -1
- package/types/plugins/dtd/before-insert/index.d.ts +1 -1
- package/types/plugins/dtd/dtd.d.ts +1 -1
- package/types/plugins/enter/enter.d.ts +2 -2
- package/types/plugins/enter/helpers/index.d.ts +9 -9
- package/types/plugins/font/font.d.ts +1 -1
- package/types/plugins/format-block/format-block.d.ts +1 -1
- package/types/plugins/fullsize/config.d.ts +0 -1
- package/types/plugins/fullsize/fullsize.d.ts +1 -2
- package/types/plugins/hotkeys/hotkeys.d.ts +1 -1
- package/types/plugins/iframe/iframe.d.ts +1 -1
- package/types/plugins/image-processor/image-processor.d.ts +1 -1
- package/types/plugins/image-properties/config.d.ts +1 -1
- package/types/plugins/image-properties/image-properties.d.ts +3 -3
- package/types/plugins/image-properties/readers/align.d.ts +1 -1
- package/types/plugins/image-properties/readers/index.d.ts +1 -1
- package/types/plugins/image-properties/readers/link.d.ts +1 -1
- package/types/plugins/image-properties/readers/margin.d.ts +1 -1
- package/types/plugins/image-properties/readers/size.d.ts +1 -1
- package/types/plugins/image-properties/ui/ui-image-form.d.ts +2 -3
- package/types/plugins/image-properties/ui/ui-image-main-tab.d.ts +2 -2
- package/types/plugins/image-properties/ui/ui-image-position-tab.d.ts +2 -2
- package/types/plugins/image-properties/utils/open-image-editor.d.ts +1 -1
- package/types/plugins/image-properties/utils/open-image-popup.d.ts +1 -1
- package/types/plugins/image-properties/writers/index.d.ts +1 -1
- package/types/plugins/indent/indent.d.ts +1 -1
- package/types/plugins/index.d.ts +62 -62
- package/types/plugins/inline-popup/inline-popup.d.ts +1 -2
- package/types/plugins/limit/limit.d.ts +1 -1
- package/types/plugins/line-height/langs/index.d.ts +22 -22
- package/types/plugins/line-height/line-height.d.ts +1 -1
- package/types/plugins/link/link.d.ts +1 -1
- package/types/plugins/media/media.d.ts +1 -1
- package/types/plugins/mobile/mobile.d.ts +1 -1
- package/types/plugins/ordered-list/ordered-list.d.ts +1 -1
- package/types/plugins/paste/helpers.d.ts +1 -1
- package/types/plugins/paste/paste.d.ts +2 -2
- package/types/plugins/paste-from-word/paste-from-word.d.ts +2 -2
- package/types/plugins/paste-storage/paste-storage.d.ts +1 -2
- package/types/plugins/placeholder/placeholder.d.ts +2 -3
- package/types/plugins/preview/preview.d.ts +0 -1
- package/types/plugins/redo-undo/redo-undo.d.ts +1 -1
- package/types/plugins/resize-cells/resize-cells.d.ts +1 -2
- package/types/plugins/resize-handler/resize-handler.d.ts +1 -1
- package/types/plugins/resizer/resizer.d.ts +2 -3
- package/types/plugins/search/config.d.ts +1 -1
- package/types/plugins/search/helpers/index.d.ts +2 -2
- package/types/plugins/search/search.d.ts +1 -1
- package/types/plugins/search/ui/search.d.ts +0 -1
- package/types/plugins/select/select.d.ts +1 -1
- package/types/plugins/select-cells/select-cells.d.ts +1 -1
- package/types/plugins/size/size.d.ts +2 -3
- package/types/plugins/source/editor/engines/ace.d.ts +1 -1
- package/types/plugins/source/editor/engines/area.d.ts +1 -1
- package/types/plugins/source/editor/engines/index.d.ts +2 -2
- package/types/plugins/source/source.d.ts +1 -2
- package/types/plugins/speech-recognize/config.d.ts +1 -1
- package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
- package/types/plugins/speech-recognize/helpers/recognize-manager.d.ts +2 -2
- package/types/plugins/speech-recognize/langs/index.d.ts +22 -22
- package/types/plugins/speech-recognize/speech-recognize.d.ts +1 -2
- package/types/plugins/spellcheck/langs/index.d.ts +22 -22
- package/types/plugins/spellcheck/spellcheck.d.ts +1 -1
- package/types/plugins/stat/stat.d.ts +2 -2
- package/types/plugins/sticky/sticky.d.ts +2 -3
- package/types/plugins/symbols/langs/index.d.ts +22 -22
- package/types/plugins/symbols/symbols.d.ts +2 -3
- package/types/plugins/tab/cases/index.d.ts +1 -1
- package/types/plugins/tab/tab.d.ts +1 -1
- package/types/plugins/table/table.d.ts +1 -2
- package/types/plugins/video/video.d.ts +1 -1
- package/types/plugins/wrap-nodes/wrap-nodes.d.ts +1 -1
- package/types/plugins/xpath/xpath.d.ts +1 -2
- package/types/styles/icons/index.d.ts +0 -27
- package/types/types/ajax.d.ts +1 -1
- package/types/types/async.d.ts +2 -2
- package/types/types/context.d.ts +2 -2
- package/types/types/core.d.ts +1 -1
- package/types/types/create.d.ts +1 -1
- package/types/types/dialog.d.ts +3 -3
- package/types/types/events.d.ts +1 -1
- package/types/types/file-browser.d.ts +7 -7
- package/types/types/history.d.ts +1 -1
- package/types/types/index.d.ts +23 -23
- package/types/types/jodit.d.ts +5 -5
- package/types/types/messages.d.ts +1 -1
- package/types/types/plugin.d.ts +3 -3
- package/types/types/popup.d.ts +2 -2
- package/types/types/select.d.ts +2 -2
- package/types/types/source.d.ts +1 -1
- package/types/types/style.d.ts +2 -2
- package/types/types/toolbar.d.ts +6 -6
- package/types/types/traits.d.ts +2 -2
- package/types/types/types.d.ts +2 -2
- package/types/types/ui.d.ts +5 -5
- package/types/types/uploader.d.ts +3 -3
- package/types/types/view.d.ts +10 -9
package/esm/config.d.ts
CHANGED
|
@@ -686,6 +686,10 @@ declare class Config implements IViewOptions {
|
|
|
686
686
|
* Buttons in toolbat without SVG - only texts
|
|
687
687
|
*/
|
|
688
688
|
textIcons: boolean;
|
|
689
|
+
/**
|
|
690
|
+
* Element for dialog container
|
|
691
|
+
*/
|
|
692
|
+
popupRoot: Nullable<HTMLElement>;
|
|
689
693
|
/**
|
|
690
694
|
* shows a INPUT[type=color] to open the browser color picker, on the right bottom of widget color picker
|
|
691
695
|
*/
|
package/esm/config.js
CHANGED
|
@@ -880,6 +880,10 @@ class Config {
|
|
|
880
880
|
* Buttons in toolbat without SVG - only texts
|
|
881
881
|
*/
|
|
882
882
|
this.textIcons = false;
|
|
883
|
+
/**
|
|
884
|
+
* Element for dialog container
|
|
885
|
+
*/
|
|
886
|
+
this.popupRoot = null;
|
|
883
887
|
/**
|
|
884
888
|
* shows a INPUT[type=color] to open the browser color picker, on the right bottom of widget color picker
|
|
885
889
|
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module component
|
|
8
8
|
*/
|
|
9
9
|
import type { IViewBased, IViewComponent } from "../../types";
|
|
10
|
-
import { Component } from "./component";
|
|
10
|
+
import { Component } from "./component.d.ts";
|
|
11
11
|
export declare abstract class ViewComponent<T extends IViewBased = IViewBased> extends Component implements IViewComponent<T> {
|
|
12
12
|
/**
|
|
13
13
|
* Parent View element
|
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-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
-
export const APP_VERSION = "4.2
|
|
6
|
+
export const APP_VERSION = "4.3.2";
|
|
7
7
|
// prettier-ignore
|
|
8
8
|
export const ES = "es2020";
|
|
9
9
|
export const IS_ES_MODERN = true;
|
|
@@ -12,6 +12,106 @@ import type { IDictionary, Nullable } from "../../../types";
|
|
|
12
12
|
export interface CachePropertyDescriptor<T, R> extends PropertyDescriptor {
|
|
13
13
|
get?: (this: T) => R;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a cached property value from an object if it exists; otherwise, returns `null`.
|
|
17
|
+
*
|
|
18
|
+
* This utility is particularly useful when working with properties that are lazily initialized
|
|
19
|
+
* or dynamically created, such as getters or cached computations. It ensures you can safely
|
|
20
|
+
* access the value without triggering initialization or creating a new instance.
|
|
21
|
+
*
|
|
22
|
+
* ### Usage Example:
|
|
23
|
+
* ```typescript
|
|
24
|
+
* import type { IUIElement } from "jodit";
|
|
25
|
+
*
|
|
26
|
+
* const { component, cache, cached } = Jodit.decorators;
|
|
27
|
+
* const { UIElement } = Jodit.modules;
|
|
28
|
+
*
|
|
29
|
+
* @component
|
|
30
|
+
* class SomeComponent extends UIElement {
|
|
31
|
+
* @cache
|
|
32
|
+
* get someElement(): IUIElement {
|
|
33
|
+
* return new UIElement(this.jodit);
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* destruct() {
|
|
37
|
+
* // Use the cached utility to clean up only if the property is initialized
|
|
38
|
+
* cached(this, 'someElement')?.destruct();
|
|
39
|
+
* super.destruct();
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @param object - The object containing the property to check.
|
|
45
|
+
* @param property - The name of the property to retrieve from the cache.
|
|
46
|
+
* @returns The cached value of the property if it exists; otherwise, `null`.
|
|
47
|
+
*
|
|
48
|
+
* ### Notes:
|
|
49
|
+
* - If the property is defined as a getter, the function will return `null`
|
|
50
|
+
* instead of invoking the getter.
|
|
51
|
+
* - This function is non-destructive and does not alter the object's state.
|
|
52
|
+
*/
|
|
15
53
|
export declare function cached<T>(object: object, property: string): Nullable<T>;
|
|
54
|
+
/**
|
|
55
|
+
* A decorator that caches the result of a getter method. Once the getter is accessed for the first time,
|
|
56
|
+
* its computed value is stored as a property of the object. Subsequent accesses return the cached value
|
|
57
|
+
* without recalculating it, improving performance and avoiding redundant computations.
|
|
58
|
+
*
|
|
59
|
+
* ### Key Features:
|
|
60
|
+
* - **Lazy Initialization**: The original getter is invoked only once, the first time the property is accessed.
|
|
61
|
+
* - **Immutability**: After caching, the value is stored as a non-writable, non-configurable property, preventing accidental modifications.
|
|
62
|
+
* - **Conditional Caching**: If the returned value has a property `noCache` set to `true`, the caching mechanism is bypassed, and the getter is invoked each time.
|
|
63
|
+
*
|
|
64
|
+
* ### Usage Example 1: Basic Caching
|
|
65
|
+
* ```typescript
|
|
66
|
+
* import { cache } from './decorators';
|
|
67
|
+
*
|
|
68
|
+
* class Example {
|
|
69
|
+
* private counter = 0;
|
|
70
|
+
*
|
|
71
|
+
* @cache
|
|
72
|
+
* get expensiveComputation(): number {
|
|
73
|
+
* console.log('Calculating...');
|
|
74
|
+
* return ++this.counter;
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
*
|
|
78
|
+
* const instance = new Example();
|
|
79
|
+
* console.log(instance.expensiveComputation); // Logs "Calculating..." and returns 1
|
|
80
|
+
* console.log(instance.expensiveComputation); // Returns 1 (cached value, no calculation)
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* ### Usage Example 2: Integration with Cached Utilities
|
|
84
|
+
* ```typescript
|
|
85
|
+
* import { cache, cached } from './decorators';
|
|
86
|
+
* import type { IUIElement } from "jodit";
|
|
87
|
+
*
|
|
88
|
+
* const { component } = Jodit.decorators;
|
|
89
|
+
* const { UIElement } = Jodit.modules;
|
|
90
|
+
*
|
|
91
|
+
* @component
|
|
92
|
+
* class SomeComponent extends UIElement {
|
|
93
|
+
* @cache
|
|
94
|
+
* get someElement(): IUIElement {
|
|
95
|
+
* return new UIElement(this.jodit);
|
|
96
|
+
* }
|
|
97
|
+
*
|
|
98
|
+
* destruct() {
|
|
99
|
+
* // Use the cached utility to clean up only if the property is initialized
|
|
100
|
+
* cached(this, 'someElement')?.destruct();
|
|
101
|
+
* super.destruct();
|
|
102
|
+
* }
|
|
103
|
+
* }
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @param _ - The target object (not used directly).
|
|
107
|
+
* @param name - The name of the property to decorate.
|
|
108
|
+
* @param descriptor - The property descriptor, which must include a getter method.
|
|
109
|
+
* @throws Will throw an error if the descriptor does not include a getter.
|
|
110
|
+
*
|
|
111
|
+
* ### Notes:
|
|
112
|
+
* - **Performance**: Ideal for properties that are computationally expensive and do not change after the initial computation.
|
|
113
|
+
* - **Flexibility**: Supports conditional caching via the `noCache` property in the returned value.
|
|
114
|
+
* - **Compatibility**: Designed to work seamlessly with objects and classes in TypeScript or JavaScript.
|
|
115
|
+
*/
|
|
16
116
|
export declare function cache<T, R>(_: object, name: PropertyKey, descriptor: CachePropertyDescriptor<T, R>): void;
|
|
17
117
|
export declare function cacheHTML<T extends Function, R>(target: IDictionary, _: string, descriptor: CachePropertyDescriptor<T, R>): void;
|
|
@@ -4,9 +4,48 @@
|
|
|
4
4
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
6
|
import { STATUSES } from "../../component/statuses.js";
|
|
7
|
+
import { IS_PROD } from "../../constants.js";
|
|
7
8
|
import { Dom } from "../../dom/dom.js";
|
|
8
9
|
import { isFunction, isViewObject } from "../../helpers/checker/index.js";
|
|
9
10
|
import { error } from "../../helpers/utils/error/error.js";
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves a cached property value from an object if it exists; otherwise, returns `null`.
|
|
13
|
+
*
|
|
14
|
+
* This utility is particularly useful when working with properties that are lazily initialized
|
|
15
|
+
* or dynamically created, such as getters or cached computations. It ensures you can safely
|
|
16
|
+
* access the value without triggering initialization or creating a new instance.
|
|
17
|
+
*
|
|
18
|
+
* ### Usage Example:
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import type { IUIElement } from "jodit";
|
|
21
|
+
*
|
|
22
|
+
* const { component, cache, cached } = Jodit.decorators;
|
|
23
|
+
* const { UIElement } = Jodit.modules;
|
|
24
|
+
*
|
|
25
|
+
* @component
|
|
26
|
+
* class SomeComponent extends UIElement {
|
|
27
|
+
* @cache
|
|
28
|
+
* get someElement(): IUIElement {
|
|
29
|
+
* return new UIElement(this.jodit);
|
|
30
|
+
* }
|
|
31
|
+
*
|
|
32
|
+
* destruct() {
|
|
33
|
+
* // Use the cached utility to clean up only if the property is initialized
|
|
34
|
+
* cached(this, 'someElement')?.destruct();
|
|
35
|
+
* super.destruct();
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @param object - The object containing the property to check.
|
|
41
|
+
* @param property - The name of the property to retrieve from the cache.
|
|
42
|
+
* @returns The cached value of the property if it exists; otherwise, `null`.
|
|
43
|
+
*
|
|
44
|
+
* ### Notes:
|
|
45
|
+
* - If the property is defined as a getter, the function will return `null`
|
|
46
|
+
* instead of invoking the getter.
|
|
47
|
+
* - This function is non-destructive and does not alter the object's state.
|
|
48
|
+
*/
|
|
10
49
|
export function cached(object, property) {
|
|
11
50
|
const descriptor = Object.getOwnPropertyDescriptor(object, property);
|
|
12
51
|
if (!descriptor || isFunction(descriptor.get)) {
|
|
@@ -14,12 +53,79 @@ export function cached(object, property) {
|
|
|
14
53
|
}
|
|
15
54
|
return descriptor.value;
|
|
16
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* A decorator that caches the result of a getter method. Once the getter is accessed for the first time,
|
|
58
|
+
* its computed value is stored as a property of the object. Subsequent accesses return the cached value
|
|
59
|
+
* without recalculating it, improving performance and avoiding redundant computations.
|
|
60
|
+
*
|
|
61
|
+
* ### Key Features:
|
|
62
|
+
* - **Lazy Initialization**: The original getter is invoked only once, the first time the property is accessed.
|
|
63
|
+
* - **Immutability**: After caching, the value is stored as a non-writable, non-configurable property, preventing accidental modifications.
|
|
64
|
+
* - **Conditional Caching**: If the returned value has a property `noCache` set to `true`, the caching mechanism is bypassed, and the getter is invoked each time.
|
|
65
|
+
*
|
|
66
|
+
* ### Usage Example 1: Basic Caching
|
|
67
|
+
* ```typescript
|
|
68
|
+
* import { cache } from './decorators';
|
|
69
|
+
*
|
|
70
|
+
* class Example {
|
|
71
|
+
* private counter = 0;
|
|
72
|
+
*
|
|
73
|
+
* @cache
|
|
74
|
+
* get expensiveComputation(): number {
|
|
75
|
+
* console.log('Calculating...');
|
|
76
|
+
* return ++this.counter;
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
*
|
|
80
|
+
* const instance = new Example();
|
|
81
|
+
* console.log(instance.expensiveComputation); // Logs "Calculating..." and returns 1
|
|
82
|
+
* console.log(instance.expensiveComputation); // Returns 1 (cached value, no calculation)
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* ### Usage Example 2: Integration with Cached Utilities
|
|
86
|
+
* ```typescript
|
|
87
|
+
* import { cache, cached } from './decorators';
|
|
88
|
+
* import type { IUIElement } from "jodit";
|
|
89
|
+
*
|
|
90
|
+
* const { component } = Jodit.decorators;
|
|
91
|
+
* const { UIElement } = Jodit.modules;
|
|
92
|
+
*
|
|
93
|
+
* @component
|
|
94
|
+
* class SomeComponent extends UIElement {
|
|
95
|
+
* @cache
|
|
96
|
+
* get someElement(): IUIElement {
|
|
97
|
+
* return new UIElement(this.jodit);
|
|
98
|
+
* }
|
|
99
|
+
*
|
|
100
|
+
* destruct() {
|
|
101
|
+
* // Use the cached utility to clean up only if the property is initialized
|
|
102
|
+
* cached(this, 'someElement')?.destruct();
|
|
103
|
+
* super.destruct();
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @param _ - The target object (not used directly).
|
|
109
|
+
* @param name - The name of the property to decorate.
|
|
110
|
+
* @param descriptor - The property descriptor, which must include a getter method.
|
|
111
|
+
* @throws Will throw an error if the descriptor does not include a getter.
|
|
112
|
+
*
|
|
113
|
+
* ### Notes:
|
|
114
|
+
* - **Performance**: Ideal for properties that are computationally expensive and do not change after the initial computation.
|
|
115
|
+
* - **Flexibility**: Supports conditional caching via the `noCache` property in the returned value.
|
|
116
|
+
* - **Compatibility**: Designed to work seamlessly with objects and classes in TypeScript or JavaScript.
|
|
117
|
+
*/
|
|
17
118
|
export function cache(_, name, descriptor) {
|
|
18
119
|
const getter = descriptor.get;
|
|
19
120
|
if (!getter) {
|
|
20
121
|
throw error('Getter property descriptor expected');
|
|
21
122
|
}
|
|
22
123
|
descriptor.get = function () {
|
|
124
|
+
if (!IS_PROD) {
|
|
125
|
+
if (this.isInDestruct) {
|
|
126
|
+
console.error('Trying to access property in destructed component');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
23
129
|
const value = getter.call(this);
|
|
24
130
|
if (value && value.noCache === true) {
|
|
25
131
|
return value;
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @module decorators
|
|
10
10
|
*/
|
|
11
|
-
export * from "./autobind/autobind";
|
|
12
|
-
export * from "./cache/cache";
|
|
13
|
-
export * from "./component/component";
|
|
14
|
-
export * from "./debounce/debounce";
|
|
15
|
-
export * from "./derive/derive";
|
|
16
|
-
export * from "./hook/hook";
|
|
17
|
-
export * from "./idle/idle";
|
|
18
|
-
export * from "./nonenumerable/nonenumerable";
|
|
19
|
-
export * from "./persistent/persistent";
|
|
20
|
-
export * from "./wait/wait";
|
|
21
|
-
export * from "./watch/watch";
|
|
11
|
+
export * from "./autobind/autobind.d.ts";
|
|
12
|
+
export * from "./cache/cache.d.ts";
|
|
13
|
+
export * from "./component/component.d.ts";
|
|
14
|
+
export * from "./debounce/debounce.d.ts";
|
|
15
|
+
export * from "./derive/derive.d.ts";
|
|
16
|
+
export * from "./hook/hook.d.ts";
|
|
17
|
+
export * from "./idle/idle.d.ts";
|
|
18
|
+
export * from "./nonenumerable/nonenumerable.d.ts";
|
|
19
|
+
export * from "./persistent/persistent.d.ts";
|
|
20
|
+
export * from "./wait/wait.d.ts";
|
|
21
|
+
export * from "./watch/watch.d.ts";
|
package/esm/core/dom/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module dom
|
|
8
8
|
*/
|
|
9
9
|
import type { IAsync, IDestructible } from "../../types";
|
|
10
|
-
import { Eventify } from "../event-emitter/eventify";
|
|
10
|
+
import { Eventify } from "../event-emitter/eventify.d.ts";
|
|
11
11
|
export declare class LazyWalker extends Eventify<{
|
|
12
12
|
visit: (node: Node) => boolean;
|
|
13
13
|
break: (reason?: string) => void;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module event-emitter
|
|
8
8
|
*/
|
|
9
|
-
export * from "./event-emitter";
|
|
10
|
-
export * from "./eventify";
|
|
11
|
-
export * from "./observable";
|
|
12
|
-
export * from "./store";
|
|
9
|
+
export * from "./event-emitter.d.ts";
|
|
10
|
+
export * from "./eventify.d.ts";
|
|
11
|
+
export * from "./observable.d.ts";
|
|
12
|
+
export * from "./store.d.ts";
|
package/esm/core/global.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module global
|
|
8
8
|
*/
|
|
9
|
-
import type { HTMLTagNames, IDictionary, IJodit, IViewBased, IViewComponent } from "../types";
|
|
10
|
-
import { PluginSystem } from "./plugin/plugin-system";
|
|
9
|
+
import type { HTMLTagNames, IDictionary, IJodit, IViewBased, IViewComponent, IViewOptions } from "../types";
|
|
10
|
+
import { PluginSystem } from "./plugin/plugin-system.d.ts";
|
|
11
11
|
import { EventEmitter } from "./event-emitter";
|
|
12
12
|
export declare const instances: IDictionary<IJodit>;
|
|
13
13
|
/**
|
|
@@ -21,6 +21,11 @@ export declare const extendLang: (langs: IDictionary) => void;
|
|
|
21
21
|
* Create unique box(HTMLCotainer) and remove it after destroy
|
|
22
22
|
*/
|
|
23
23
|
export declare function getContainer<T extends HTMLTagNames = HTMLTagNames>(jodit: IViewBased | IViewComponent, classFunc?: Function | string, tag?: T, createInsideEditor?: boolean): HTMLElementTagNameMap[T];
|
|
24
|
+
/**
|
|
25
|
+
* Get root element for view
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function getPopupViewRoot(o: IViewOptions, container: HTMLElement, defaultRoot: HTMLElement): HTMLElement;
|
|
24
29
|
/**
|
|
25
30
|
* Global event emitter
|
|
26
31
|
*/
|
package/esm/core/global.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
4
4
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
5
5
|
*/
|
|
6
|
+
import { css } from "./helpers/index.js";
|
|
6
7
|
import { isJoditObject } from "./helpers/checker/is-jodit-object.js";
|
|
7
8
|
import { isString } from "./helpers/checker/is-string.js";
|
|
8
9
|
import { isViewObject } from "./helpers/checker/is-view-object.js";
|
|
@@ -54,21 +55,10 @@ export function getContainer(jodit, classFunc, tag = 'div', createInsideEditor =
|
|
|
54
55
|
: 'jodit-utils';
|
|
55
56
|
const data = boxes.get(jodit) || {}, key = name + tag;
|
|
56
57
|
const view = isViewObject(jodit) ? jodit : jodit.j;
|
|
58
|
+
let body = null;
|
|
57
59
|
if (!data[key]) {
|
|
58
60
|
let c = view.c;
|
|
59
|
-
|
|
60
|
-
if (isJoditObject(jodit) && jodit.o.shadowRoot) {
|
|
61
|
-
body = jodit.o.shadowRoot;
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
body = jodit.od.body;
|
|
65
|
-
if (isJoditObject(jodit)) {
|
|
66
|
-
const dialog = Dom.closest(jodit.container, 'dialog', jodit.od.body);
|
|
67
|
-
if (dialog) {
|
|
68
|
-
body = dialog;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
61
|
+
body = getPopupViewRoot(view.o, view.container, jodit.od.body);
|
|
72
62
|
if (createInsideEditor &&
|
|
73
63
|
isJoditObject(jodit) &&
|
|
74
64
|
jodit.od !== jodit.ed) {
|
|
@@ -100,6 +90,18 @@ export function getContainer(jodit, classFunc, tag = 'div', createInsideEditor =
|
|
|
100
90
|
data[key].classList.add(`jodit_theme_${view.o.theme || 'default'}`);
|
|
101
91
|
return data[key];
|
|
102
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Get root element for view
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
export function getPopupViewRoot(o, container, defaultRoot) {
|
|
98
|
+
return (o.popupRoot ??
|
|
99
|
+
o.shadowRoot ??
|
|
100
|
+
Dom.closest(container, parentElement => Dom.isHTMLElement(parentElement) &&
|
|
101
|
+
(Dom.isTag(parentElement, 'dialog') ||
|
|
102
|
+
['fixed', 'absolute'].includes(css(parentElement, 'position'))), defaultRoot) ??
|
|
103
|
+
defaultRoot);
|
|
104
|
+
}
|
|
103
105
|
/**
|
|
104
106
|
* Global event emitter
|
|
105
107
|
*/
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module helpers/array
|
|
8
8
|
*/
|
|
9
|
-
export { asArray } from "./as-array";
|
|
10
|
-
export { splitArray } from "./split-array";
|
|
11
|
-
export { toArray } from "./to-array";
|
|
9
|
+
export { asArray } from "./as-array.d.ts";
|
|
10
|
+
export { splitArray } from "./split-array.d.ts";
|
|
11
|
+
export { toArray } from "./to-array.d.ts";
|
|
@@ -6,28 +6,28 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module helpers/checker
|
|
8
8
|
*/
|
|
9
|
-
export * from "./has-browser-color-picker";
|
|
10
|
-
export * from "./is-abort-error";
|
|
11
|
-
export * from "./is-array";
|
|
12
|
-
export * from "./is-boolean";
|
|
13
|
-
export * from "./is-equal";
|
|
14
|
-
export * from "./is-function";
|
|
15
|
-
export * from "./is-html";
|
|
16
|
-
export * from "./is-html-from-word";
|
|
17
|
-
export * from "./is-imp-interface";
|
|
18
|
-
export * from "./is-int";
|
|
19
|
-
export * from "./is-jodit-object";
|
|
20
|
-
export * from "./is-license";
|
|
21
|
-
export * from "./is-marker";
|
|
22
|
-
export * from "./is-native-function";
|
|
23
|
-
export * from "./is-number";
|
|
24
|
-
export * from "./is-numeric";
|
|
25
|
-
export * from "./is-plain-object";
|
|
26
|
-
export * from "./is-promise";
|
|
27
|
-
export * from "./is-set";
|
|
28
|
-
export * from "./is-string";
|
|
29
|
-
export * from "./is-url";
|
|
30
|
-
export * from "./is-valid-name";
|
|
31
|
-
export * from "./is-view-object";
|
|
32
|
-
export * from "./is-void";
|
|
33
|
-
export * from "./is-window";
|
|
9
|
+
export * from "./has-browser-color-picker.d.ts";
|
|
10
|
+
export * from "./is-abort-error.d.ts";
|
|
11
|
+
export * from "./is-array.d.ts";
|
|
12
|
+
export * from "./is-boolean.d.ts";
|
|
13
|
+
export * from "./is-equal.d.ts";
|
|
14
|
+
export * from "./is-function.d.ts";
|
|
15
|
+
export * from "./is-html.d.ts";
|
|
16
|
+
export * from "./is-html-from-word.d.ts";
|
|
17
|
+
export * from "./is-imp-interface.d.ts";
|
|
18
|
+
export * from "./is-int.d.ts";
|
|
19
|
+
export * from "./is-jodit-object.d.ts";
|
|
20
|
+
export * from "./is-license.d.ts";
|
|
21
|
+
export * from "./is-marker.d.ts";
|
|
22
|
+
export * from "./is-native-function.d.ts";
|
|
23
|
+
export * from "./is-number.d.ts";
|
|
24
|
+
export * from "./is-numeric.d.ts";
|
|
25
|
+
export * from "./is-plain-object.d.ts";
|
|
26
|
+
export * from "./is-promise.d.ts";
|
|
27
|
+
export * from "./is-set.d.ts";
|
|
28
|
+
export * from "./is-string.d.ts";
|
|
29
|
+
export * from "./is-url.d.ts";
|
|
30
|
+
export * from "./is-valid-name.d.ts";
|
|
31
|
+
export * from "./is-view-object.d.ts";
|
|
32
|
+
export * from "./is-void.d.ts";
|
|
33
|
+
export * from "./is-window.d.ts";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module helpers/html
|
|
8
8
|
*/
|
|
9
|
-
export * from "./apply-styles";
|
|
10
|
-
export * from "./clean-from-word";
|
|
11
|
-
export * from "./htmlspecialchars";
|
|
12
|
-
export * from "./nl2br";
|
|
13
|
-
export * from "./safe-html";
|
|
14
|
-
export * from "./strip-tags";
|
|
9
|
+
export * from "./apply-styles.d.ts";
|
|
10
|
+
export * from "./clean-from-word.d.ts";
|
|
11
|
+
export * from "./htmlspecialchars.d.ts";
|
|
12
|
+
export * from "./nl2br.d.ts";
|
|
13
|
+
export * from "./safe-html.d.ts";
|
|
14
|
+
export * from "./strip-tags.d.ts";
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module helpers/normalize
|
|
8
8
|
*/
|
|
9
|
-
export * from "./normalize-color";
|
|
10
|
-
export * from "./normalize-css-value";
|
|
11
|
-
export * from "./normalize-key-aliases";
|
|
12
|
-
export * from "./normalize-license";
|
|
13
|
-
export * from "./normalize-path";
|
|
14
|
-
export * from "./normalize-relative-path";
|
|
15
|
-
export * from "./normalize-size";
|
|
16
|
-
export * from "./normalize-url";
|
|
9
|
+
export * from "./normalize-color.d.ts";
|
|
10
|
+
export * from "./normalize-css-value.d.ts";
|
|
11
|
+
export * from "./normalize-key-aliases.d.ts";
|
|
12
|
+
export * from "./normalize-license.d.ts";
|
|
13
|
+
export * from "./normalize-path.d.ts";
|
|
14
|
+
export * from "./normalize-relative-path.d.ts";
|
|
15
|
+
export * from "./normalize-size.d.ts";
|
|
16
|
+
export * from "./normalize-url.d.ts";
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* @module helpers/size
|
|
8
8
|
*/
|
|
9
|
-
export * from "./get-content-width";
|
|
10
|
-
export * from "./get-scroll-parent";
|
|
11
|
-
export * from "./inner-width";
|
|
12
|
-
export * from "./object-size";
|
|
13
|
-
export * from "./offset";
|
|
14
|
-
export * from "./position";
|
|
9
|
+
export * from "./get-content-width.d.ts";
|
|
10
|
+
export * from "./get-scroll-parent.d.ts";
|
|
11
|
+
export * from "./inner-width.d.ts";
|
|
12
|
+
export * from "./object-size.d.ts";
|
|
13
|
+
export * from "./offset.d.ts";
|
|
14
|
+
export * from "./position.d.ts";
|