jodit-pro 4.11.26 → 4.11.28
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 +115 -1
- package/es2015/jodit.css +32 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +6 -6
- package/es2015/jodit.js +39 -9
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +3 -3
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +105 -3
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +4 -4
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +58 -7
- package/es2015/plugins/style/style.min.js +2 -2
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +6 -6
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +23 -23
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +2 -2
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +32 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +6 -6
- package/es2021/jodit.js +39 -8
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +105 -3
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +5 -5
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +56 -5
- package/es2021/plugins/style/style.min.js +2 -2
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +32 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +6 -6
- package/es2021.en/jodit.js +39 -8
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +3 -3
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +105 -3
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +26 -26
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +56 -5
- package/es2021.en/plugins/style/style.min.js +2 -2
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +37 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +43 -9
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +169 -3
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +114 -25
- package/es5/plugins/style/style.min.js +2 -2
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +2 -0
- package/esm/plugins/ai-assistant-pro/ai-assistant-pro.d.ts +3 -0
- package/esm/plugins/ai-assistant-pro/ai-assistant-pro.js +2 -2
- package/esm/plugins/ai-assistant-pro/config.js +1 -1
- package/esm/plugins/ai-assistant-pro/interface/options.d.ts +40 -0
- package/esm/plugins/ai-assistant-pro/providers/jodit-ai-adapter.js +1 -1
- package/esm/plugins/autocomplete/autocomplete.js +1 -1
- package/esm/plugins/autocomplete/config.d.ts +2 -1
- package/esm/plugins/autocomplete/config.js +1 -1
- package/esm/plugins/autocomplete/interface.d.ts +1 -0
- package/esm/plugins/autocomplete/ui/autocomplete.d.ts +3 -1
- package/esm/plugins/autocomplete/ui/autocomplete.js +1 -1
- package/esm/plugins/autocomplete/ui/item.d.ts +2 -0
- package/esm/plugins/autocomplete/ui/item.js +1 -1
- package/esm/plugins/style/helpers/apply-style.js +1 -1
- package/esm/plugins/style/helpers/detect-active-style.js +1 -1
- package/esm/plugins/style/interface.d.ts +2 -1
- package/esm/plugins/style/ui/style-popup.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +2 -0
- package/types/plugins/ai-assistant-pro/ai-assistant-pro.d.ts +3 -0
- package/types/plugins/ai-assistant-pro/interface/options.d.ts +40 -0
- package/types/plugins/autocomplete/config.d.ts +2 -1
- package/types/plugins/autocomplete/interface.d.ts +1 -0
- package/types/plugins/autocomplete/ui/autocomplete.d.ts +3 -1
- package/types/plugins/autocomplete/ui/item.d.ts +2 -0
- package/types/plugins/style/interface.d.ts +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.28
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -288,11 +288,75 @@ class aiAssistantPro extends jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_18__
|
|
|
288
288
|
});
|
|
289
289
|
return dialog;
|
|
290
290
|
}
|
|
291
|
+
setupTextAutocomplete() {
|
|
292
|
+
const { textAutocompleteEnabled, textAutocompleteApiRequest, textAutocompleteMinQueryLength, textAutocompleteMaxSuggestions, textAutocompleteDebounceMs, textAutocompleteCacheTTL, textAutocompleteCacheMaxSize } = this.j.o.aiAssistantPro;
|
|
293
|
+
if (!textAutocompleteEnabled || !textAutocompleteApiRequest) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
// Shallow copy to avoid mutating prototype
|
|
297
|
+
this.j.o.autocomplete = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, this.j.o.autocomplete), {
|
|
298
|
+
displayMode: 'inline'
|
|
299
|
+
});
|
|
300
|
+
const cache = this.textAutocompleteCache;
|
|
301
|
+
let debounceTimer = null;
|
|
302
|
+
this.textAutocompleteSource = (query)=>{
|
|
303
|
+
if (query.length < textAutocompleteMinQueryLength) {
|
|
304
|
+
return [];
|
|
305
|
+
}
|
|
306
|
+
const cacheKey = `${query}:${textAutocompleteMaxSuggestions}`;
|
|
307
|
+
if (textAutocompleteCacheTTL > 0) {
|
|
308
|
+
const cached = cache.get(cacheKey);
|
|
309
|
+
if (cached && Date.now() - cached.ts < textAutocompleteCacheTTL) {
|
|
310
|
+
return cached.data.map((s)=>({
|
|
311
|
+
value: s,
|
|
312
|
+
title: s
|
|
313
|
+
}));
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (debounceTimer) {
|
|
317
|
+
clearTimeout(debounceTimer);
|
|
318
|
+
}
|
|
319
|
+
const controller = new AbortController();
|
|
320
|
+
return new Promise((resolve)=>{
|
|
321
|
+
debounceTimer = setTimeout(()=>(0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function*() {
|
|
322
|
+
try {
|
|
323
|
+
const suggestions = yield textAutocompleteApiRequest(query, textAutocompleteMaxSuggestions, controller.signal);
|
|
324
|
+
if (Array.isArray(suggestions)) {
|
|
325
|
+
const result = suggestions.slice(0, textAutocompleteMaxSuggestions);
|
|
326
|
+
if (textAutocompleteCacheTTL > 0) {
|
|
327
|
+
if (cache.size >= textAutocompleteCacheMaxSize) {
|
|
328
|
+
const oldest = cache.keys().next().value;
|
|
329
|
+
if (oldest != null) {
|
|
330
|
+
cache.delete(oldest);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
cache.set(cacheKey, {
|
|
334
|
+
ts: Date.now(),
|
|
335
|
+
data: result
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
resolve(result.map((s)=>({
|
|
339
|
+
value: s,
|
|
340
|
+
title: s
|
|
341
|
+
})));
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
resolve([]);
|
|
345
|
+
} catch (unused) {
|
|
346
|
+
resolve([]);
|
|
347
|
+
}
|
|
348
|
+
})(), textAutocompleteDebounceMs);
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
this.j.e.fire('registerAutocompleteSource', this.textAutocompleteSource);
|
|
352
|
+
}
|
|
291
353
|
afterInit() {
|
|
292
354
|
// Register i18n
|
|
293
355
|
(0,jodit_esm_core_global__WEBPACK_IMPORTED_MODULE_16__.extendLang)(_langs__WEBPACK_IMPORTED_MODULE_13__);
|
|
294
356
|
// Setup event listeners
|
|
295
357
|
this.setupEventListeners();
|
|
358
|
+
// Setup text autocomplete if enabled
|
|
359
|
+
this.setupTextAutocomplete();
|
|
296
360
|
// Auto-open assistant if configured
|
|
297
361
|
this.j.async.promise((resolve)=>{
|
|
298
362
|
const { initiallyOpened, persistOpenState } = this.j.o.aiAssistantPro;
|
|
@@ -997,6 +1061,11 @@ ${selectedText}`.trim();
|
|
|
997
1061
|
}
|
|
998
1062
|
beforeDestruct() {
|
|
999
1063
|
var _cached, _cached1, _cached2, _cached3, _cached4, _cached5, _cached_close, _cached6;
|
|
1064
|
+
if (this.textAutocompleteSource) {
|
|
1065
|
+
this.j.e.fire('unregisterAutocompleteSource', this.textAutocompleteSource);
|
|
1066
|
+
this.textAutocompleteSource = null;
|
|
1067
|
+
}
|
|
1068
|
+
this.textAutocompleteCache.clear();
|
|
1000
1069
|
this.__closeFlightMode();
|
|
1001
1070
|
(_cached = (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_15__.cached)(this, 'toolRegistry')) === null || _cached === void 0 ? void 0 : _cached.destruct();
|
|
1002
1071
|
(_cached1 = (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_15__.cached)(this, 'permissionManager')) === null || _cached1 === void 0 ? void 0 : _cached1.destruct();
|
|
@@ -1016,11 +1085,12 @@ ${selectedText}`.trim();
|
|
|
1016
1085
|
name: 'aiCommandsPro',
|
|
1017
1086
|
group: 'insert'
|
|
1018
1087
|
}
|
|
1019
|
-
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "__initedPromise", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "__openedMode", null);
|
|
1088
|
+
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "textAutocompleteSource", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "textAutocompleteCache", new Map()), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "__initedPromise", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "__openedMode", null);
|
|
1020
1089
|
}
|
|
1021
1090
|
}
|
|
1022
1091
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(aiAssistantPro, "requires", [
|
|
1023
|
-
'license'
|
|
1092
|
+
'license',
|
|
1093
|
+
'autocomplete'
|
|
1024
1094
|
]);
|
|
1025
1095
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
1026
1096
|
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_15__.cache
|
|
@@ -1237,6 +1307,14 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_13__.Config.prototype.aiAssistantPro =
|
|
|
1237
1307
|
closeAfterInsert: false,
|
|
1238
1308
|
enableSoundNotifications: false,
|
|
1239
1309
|
debug: false,
|
|
1310
|
+
// ===== Text Autocomplete Settings =====
|
|
1311
|
+
textAutocompleteEnabled: false,
|
|
1312
|
+
textAutocompleteApiRequest: null,
|
|
1313
|
+
textAutocompleteMinQueryLength: 3,
|
|
1314
|
+
textAutocompleteMaxSuggestions: 3,
|
|
1315
|
+
textAutocompleteDebounceMs: 500,
|
|
1316
|
+
textAutocompleteCacheTTL: 30000,
|
|
1317
|
+
textAutocompleteCacheMaxSize: 50,
|
|
1240
1318
|
// ===== Quick Commands Settings =====
|
|
1241
1319
|
quickCommandsSilentMode: false,
|
|
1242
1320
|
quickCommandsDisplayMode: 'flight',
|
|
@@ -3843,6 +3921,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3843
3921
|
return {
|
|
3844
3922
|
apiMode: 'incremental',
|
|
3845
3923
|
maxRetries: 0,
|
|
3924
|
+
textAutocompleteEnabled: true,
|
|
3925
|
+
textAutocompleteApiRequest: (query, maxSuggestions, signal)=>(0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_1__._)(function*() {
|
|
3926
|
+
var _data_result;
|
|
3927
|
+
const ajax = new jodit_esm_core_request_ajax__WEBPACK_IMPORTED_MODULE_7__.Ajax({
|
|
3928
|
+
url: `${url}/ai/autocomplete?query=${encodeURIComponent(query)}&key=${encodeURIComponent(config.apiKey)}`,
|
|
3929
|
+
method: 'POST',
|
|
3930
|
+
contentType: 'application/json',
|
|
3931
|
+
data: {
|
|
3932
|
+
provider,
|
|
3933
|
+
context: {
|
|
3934
|
+
maxSuggestions
|
|
3935
|
+
}
|
|
3936
|
+
}
|
|
3937
|
+
});
|
|
3938
|
+
signal.addEventListener('abort', ()=>ajax.abort(), {
|
|
3939
|
+
once: true
|
|
3940
|
+
});
|
|
3941
|
+
const response = yield ajax.send();
|
|
3942
|
+
const data = yield response.json();
|
|
3943
|
+
if (data.success && ((_data_result = data.result) === null || _data_result === void 0 ? void 0 : _data_result.suggestions)) {
|
|
3944
|
+
return data.result.suggestions;
|
|
3945
|
+
}
|
|
3946
|
+
return [];
|
|
3947
|
+
})(),
|
|
3846
3948
|
apiRequest: (context, signal)=>(0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_1__._)(function*() {
|
|
3847
3949
|
const ajax = new jodit_esm_core_request_ajax__WEBPACK_IMPORTED_MODULE_7__.Ajax({
|
|
3848
3950
|
url: `${url}/ai/request?key=${encodeURIComponent(config.apiKey)}`,
|