@syncfusion/ej2-richtexteditor 29.2.4-738301 → 29.2.4-760237
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/.eslintrc.json +262 -260
- package/aceconfig.js +17 -0
- package/blazorGlobalSrc/common/config.d.ts +63 -0
- package/blazorGlobalSrc/common/config.js +123 -0
- package/blazorGlobalSrc/common/constant.d.ts +117 -0
- package/blazorGlobalSrc/common/constant.js +23 -0
- package/blazorGlobalSrc/common/editor-styles.d.ts +1 -0
- package/blazorGlobalSrc/common/editor-styles.js +5 -0
- package/blazorGlobalSrc/common/index.d.ts +7 -0
- package/blazorGlobalSrc/common/index.js +9 -0
- package/blazorGlobalSrc/common/interface.d.ts +119 -0
- package/blazorGlobalSrc/common/interface.js +4 -0
- package/blazorGlobalSrc/common/types.d.ts +25 -0
- package/blazorGlobalSrc/common/types.js +4 -0
- package/blazorGlobalSrc/common/user-agent.d.ts +41 -0
- package/blazorGlobalSrc/common/user-agent.js +71 -0
- package/blazorGlobalSrc/common/util.d.ts +70 -0
- package/blazorGlobalSrc/common/util.js +222 -0
- package/blazorGlobalSrc/components.d.ts +8 -0
- package/blazorGlobalSrc/components.js +12 -0
- package/blazorGlobalSrc/editor-manager/base/classes.d.ts +31 -0
- package/blazorGlobalSrc/editor-manager/base/classes.js +28 -0
- package/blazorGlobalSrc/editor-manager/base/constant.d.ts +97 -0
- package/blazorGlobalSrc/editor-manager/base/constant.js +41 -0
- package/blazorGlobalSrc/editor-manager/base/editor-manager.d.ts +95 -0
- package/blazorGlobalSrc/editor-manager/base/editor-manager.js +339 -0
- package/blazorGlobalSrc/editor-manager/base/enum.d.ts +17 -0
- package/blazorGlobalSrc/editor-manager/base/enum.js +4 -0
- package/blazorGlobalSrc/editor-manager/base/interface.d.ts +263 -0
- package/blazorGlobalSrc/editor-manager/base/interface.js +4 -0
- package/blazorGlobalSrc/editor-manager/base/types.d.ts +7 -0
- package/blazorGlobalSrc/editor-manager/base/types.js +4 -0
- package/blazorGlobalSrc/editor-manager/base.d.ts +8 -0
- package/blazorGlobalSrc/editor-manager/base.js +10 -0
- package/blazorGlobalSrc/editor-manager/index.d.ts +5 -0
- package/blazorGlobalSrc/editor-manager/index.js +9 -0
- package/blazorGlobalSrc/editor-manager/plugin/alignments.d.ts +26 -0
- package/blazorGlobalSrc/editor-manager/plugin/alignments.js +105 -0
- package/blazorGlobalSrc/editor-manager/plugin/audio.d.ts +34 -0
- package/blazorGlobalSrc/editor-manager/plugin/audio.js +145 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.d.ts +24 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.js +47 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat.d.ts +29 -0
- package/blazorGlobalSrc/editor-manager/plugin/clearformat.js +249 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-node.d.ts +351 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-node.js +737 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-tree.d.ts +84 -0
- package/blazorGlobalSrc/editor-manager/plugin/dom-tree.js +164 -0
- package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.d.ts +10 -0
- package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.js +86 -0
- package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.d.ts +47 -0
- package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.js +622 -0
- package/blazorGlobalSrc/editor-manager/plugin/formats.d.ts +43 -0
- package/blazorGlobalSrc/editor-manager/plugin/formats.js +597 -0
- package/blazorGlobalSrc/editor-manager/plugin/image.d.ts +48 -0
- package/blazorGlobalSrc/editor-manager/plugin/image.js +399 -0
- package/blazorGlobalSrc/editor-manager/plugin/indents.d.ts +24 -0
- package/blazorGlobalSrc/editor-manager/plugin/indents.js +106 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-methods.d.ts +48 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-methods.js +37 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-text.d.ts +22 -0
- package/blazorGlobalSrc/editor-manager/plugin/insert-text.js +36 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.d.ts +22 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.js +49 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml.d.ts +51 -0
- package/blazorGlobalSrc/editor-manager/plugin/inserthtml.js +985 -0
- package/blazorGlobalSrc/editor-manager/plugin/isformatted.d.ts +89 -0
- package/blazorGlobalSrc/editor-manager/plugin/isformatted.js +199 -0
- package/blazorGlobalSrc/editor-manager/plugin/link.d.ts +41 -0
- package/blazorGlobalSrc/editor-manager/plugin/link.js +550 -0
- package/blazorGlobalSrc/editor-manager/plugin/lists.d.ts +74 -0
- package/blazorGlobalSrc/editor-manager/plugin/lists.js +1503 -0
- package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.d.ts +61 -0
- package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.js +1136 -0
- package/blazorGlobalSrc/editor-manager/plugin/nodecutter.d.ts +64 -0
- package/blazorGlobalSrc/editor-manager/plugin/nodecutter.js +167 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-commands.d.ts +41 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-commands.js +1069 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-exec.d.ts +24 -0
- package/blazorGlobalSrc/editor-manager/plugin/selection-exec.js +49 -0
- package/blazorGlobalSrc/editor-manager/plugin/table-selection.d.ts +26 -0
- package/blazorGlobalSrc/editor-manager/plugin/table-selection.js +210 -0
- package/blazorGlobalSrc/editor-manager/plugin/table.d.ts +56 -0
- package/blazorGlobalSrc/editor-manager/plugin/table.js +1100 -0
- package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.d.ts +39 -0
- package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.js +384 -0
- package/blazorGlobalSrc/editor-manager/plugin/undo.d.ts +85 -0
- package/blazorGlobalSrc/editor-manager/plugin/undo.js +216 -0
- package/blazorGlobalSrc/editor-manager/plugin/video.d.ts +38 -0
- package/blazorGlobalSrc/editor-manager/plugin/video.js +311 -0
- package/blazorGlobalSrc/editor-manager/plugin.d.ts +27 -0
- package/blazorGlobalSrc/editor-manager/plugin.js +31 -0
- package/blazorGlobalSrc/global.d.ts +1 -0
- package/blazorGlobalSrc/global.js +3 -0
- package/blazorGlobalSrc/index.d.ts +8 -0
- package/blazorGlobalSrc/index.js +12 -0
- package/blazorGlobalSrc/markdown-parser/base/constant.d.ts +39 -0
- package/blazorGlobalSrc/markdown-parser/base/constant.js +10 -0
- package/blazorGlobalSrc/markdown-parser/base/interface.d.ts +169 -0
- package/blazorGlobalSrc/markdown-parser/base/interface.js +4 -0
- package/blazorGlobalSrc/markdown-parser/base/markdown-parser.d.ts +69 -0
- package/blazorGlobalSrc/markdown-parser/base/markdown-parser.js +87 -0
- package/blazorGlobalSrc/markdown-parser/base/types.d.ts +7 -0
- package/blazorGlobalSrc/markdown-parser/base/types.js +4 -0
- package/blazorGlobalSrc/markdown-parser/base.d.ts +7 -0
- package/blazorGlobalSrc/markdown-parser/base.js +9 -0
- package/blazorGlobalSrc/markdown-parser/index.d.ts +5 -0
- package/blazorGlobalSrc/markdown-parser/index.js +9 -0
- package/blazorGlobalSrc/markdown-parser/plugin/clearformat.d.ts +28 -0
- package/blazorGlobalSrc/markdown-parser/plugin/clearformat.js +110 -0
- package/blazorGlobalSrc/markdown-parser/plugin/formats.d.ts +32 -0
- package/blazorGlobalSrc/markdown-parser/plugin/formats.js +225 -0
- package/blazorGlobalSrc/markdown-parser/plugin/insert-text.d.ts +24 -0
- package/blazorGlobalSrc/markdown-parser/plugin/insert-text.js +49 -0
- package/blazorGlobalSrc/markdown-parser/plugin/link.d.ts +24 -0
- package/blazorGlobalSrc/markdown-parser/plugin/link.js +50 -0
- package/blazorGlobalSrc/markdown-parser/plugin/lists.d.ts +39 -0
- package/blazorGlobalSrc/markdown-parser/plugin/lists.js +462 -0
- package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.d.ts +140 -0
- package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.js +104 -0
- package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.d.ts +31 -0
- package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.js +335 -0
- package/blazorGlobalSrc/markdown-parser/plugin/table.d.ts +52 -0
- package/blazorGlobalSrc/markdown-parser/plugin/table.js +216 -0
- package/blazorGlobalSrc/markdown-parser/plugin/undo.d.ts +83 -0
- package/blazorGlobalSrc/markdown-parser/plugin/undo.js +147 -0
- package/blazorGlobalSrc/markdown-parser/plugin.d.ts +11 -0
- package/blazorGlobalSrc/markdown-parser/plugin.js +15 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.d.ts +114 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.js +465 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.d.ts +58 -0
- package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.js +216 -0
- package/blazorGlobalSrc/rich-text-editor/actions/color-picker.d.ts +52 -0
- package/blazorGlobalSrc/rich-text-editor/actions/color-picker.js +241 -0
- package/blazorGlobalSrc/rich-text-editor/actions/count.d.ts +55 -0
- package/blazorGlobalSrc/rich-text-editor/actions/count.js +117 -0
- package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.d.ts +72 -0
- package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.js +552 -0
- package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.d.ts +51 -0
- package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.js +853 -0
- package/blazorGlobalSrc/rich-text-editor/actions/enter-key.d.ts +28 -0
- package/blazorGlobalSrc/rich-text-editor/actions/enter-key.js +821 -0
- package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.d.ts +11 -0
- package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.js +28 -0
- package/blazorGlobalSrc/rich-text-editor/actions/file-manager.d.ts +45 -0
- package/blazorGlobalSrc/rich-text-editor/actions/file-manager.js +249 -0
- package/blazorGlobalSrc/rich-text-editor/actions/format-painter.d.ts +25 -0
- package/blazorGlobalSrc/rich-text-editor/actions/format-painter.js +156 -0
- package/blazorGlobalSrc/rich-text-editor/actions/full-screen.d.ts +40 -0
- package/blazorGlobalSrc/rich-text-editor/actions/full-screen.js +148 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.d.ts +15 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.js +50 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-editor.d.ts +120 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-editor.js +1244 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.d.ts +14 -0
- package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.js +47 -0
- package/blazorGlobalSrc/rich-text-editor/actions/import-export.d.ts +21 -0
- package/blazorGlobalSrc/rich-text-editor/actions/import-export.js +117 -0
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard-model.d.ts +30 -0
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard.d.ts +110 -0
- package/blazorGlobalSrc/rich-text-editor/actions/keyboard.js +163 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.d.ts +66 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.js +142 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.d.ts +23 -0
- package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.js +124 -0
- package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.d.ts +86 -0
- package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.js +1071 -0
- package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.d.ts +151 -0
- package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.js +548 -0
- package/blazorGlobalSrc/rich-text-editor/actions/resize.d.ts +37 -0
- package/blazorGlobalSrc/rich-text-editor/actions/resize.js +188 -0
- package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.d.ts +11 -0
- package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.js +168 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.d.ts +18 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.js +76 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar.d.ts +185 -0
- package/blazorGlobalSrc/rich-text-editor/actions/toolbar.js +512 -0
- package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.d.ts +25 -0
- package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.js +166 -0
- package/blazorGlobalSrc/rich-text-editor/actions.d.ts +26 -0
- package/blazorGlobalSrc/rich-text-editor/actions.js +30 -0
- package/blazorGlobalSrc/rich-text-editor/audio.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/audio.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/base/classes.d.ts +628 -0
- package/blazorGlobalSrc/rich-text-editor/base/classes.js +129 -0
- package/blazorGlobalSrc/rich-text-editor/base/constant.d.ts +808 -0
- package/blazorGlobalSrc/rich-text-editor/base/constant.js +334 -0
- package/blazorGlobalSrc/rich-text-editor/base/enum.d.ts +81 -0
- package/blazorGlobalSrc/rich-text-editor/base/enum.js +37 -0
- package/blazorGlobalSrc/rich-text-editor/base/interface.d.ts +1577 -0
- package/blazorGlobalSrc/rich-text-editor/base/interface.js +194 -0
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor-model.d.ts +1032 -0
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.d.ts +1699 -0
- package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.js +2645 -0
- package/blazorGlobalSrc/rich-text-editor/base/util.d.ts +212 -0
- package/blazorGlobalSrc/rich-text-editor/base/util.js +610 -0
- package/blazorGlobalSrc/rich-text-editor/base.d.ts +10 -0
- package/blazorGlobalSrc/rich-text-editor/base.js +13 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/formatter.d.ts +87 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/formatter.js +223 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.d.ts +34 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.js +44 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.d.ts +39 -0
- package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.js +48 -0
- package/blazorGlobalSrc/rich-text-editor/formatter.d.ts +6 -0
- package/blazorGlobalSrc/rich-text-editor/formatter.js +10 -0
- package/blazorGlobalSrc/rich-text-editor/html-editor.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/html-editor.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/image.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/image.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/index.d.ts +9 -0
- package/blazorGlobalSrc/rich-text-editor/index.js +12 -0
- package/blazorGlobalSrc/rich-text-editor/link.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/link.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/markdown-editor.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/markdown-editor.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/models/default-locale.d.ts +25 -0
- package/blazorGlobalSrc/rich-text-editor/models/default-locale.js +391 -0
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings-model.d.ts +68 -0
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.d.ts +61 -0
- package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.js +60 -0
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode-model.d.ts +24 -0
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode.d.ts +20 -0
- package/blazorGlobalSrc/rich-text-editor/models/inline-mode.js +37 -0
- package/blazorGlobalSrc/rich-text-editor/models/items.d.ts +36 -0
- package/blazorGlobalSrc/rich-text-editor/models/items.js +1011 -0
- package/blazorGlobalSrc/rich-text-editor/models/models.d.ts +7 -0
- package/blazorGlobalSrc/rich-text-editor/models/models.js +4 -0
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings-model.d.ts +40 -0
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.d.ts +50 -0
- package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.js +143 -0
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings-model.d.ts +1130 -0
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.d.ts +992 -0
- package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.js +510 -0
- package/blazorGlobalSrc/rich-text-editor/models.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/models.js +4 -0
- package/blazorGlobalSrc/rich-text-editor/quick-toolbar.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/quick-toolbar.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.d.ts +82 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.js +886 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.d.ts +65 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.js +49 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.d.ts +39 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.js +111 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.d.ts +33 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.js +101 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/image-module.d.ts +199 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/image-module.js +2494 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/link-module.d.ts +63 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/link-module.js +596 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.d.ts +65 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.js +38 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.d.ts +54 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.js +35 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/render.d.ts +46 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/render.js +70 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.d.ts +20 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.js +224 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/table-module.d.ts +155 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/table-module.js +2206 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.d.ts +131 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.js +747 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/video-module.d.ts +120 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/video-module.js +1507 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/view-source.d.ts +74 -0
- package/blazorGlobalSrc/rich-text-editor/renderer/view-source.js +225 -0
- package/blazorGlobalSrc/rich-text-editor/renderer.d.ts +17 -0
- package/blazorGlobalSrc/rich-text-editor/renderer.js +21 -0
- package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.d.ts +33 -0
- package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.js +29 -0
- package/blazorGlobalSrc/rich-text-editor/services/service-locator.d.ts +29 -0
- package/blazorGlobalSrc/rich-text-editor/services/service-locator.js +25 -0
- package/blazorGlobalSrc/rich-text-editor/services.d.ts +5 -0
- package/blazorGlobalSrc/rich-text-editor/services.js +9 -0
- package/blazorGlobalSrc/rich-text-editor/toolbar.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/toolbar.js +8 -0
- package/blazorGlobalSrc/rich-text-editor/video.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor/video.js +8 -0
- package/blazorGlobalSrc/rich-text-editor.d.ts +4 -0
- package/blazorGlobalSrc/rich-text-editor.js +8 -0
- package/blazorGlobalSrc/selection/index.d.ts +4 -0
- package/blazorGlobalSrc/selection/index.js +8 -0
- package/blazorGlobalSrc/selection/selection.d.ts +244 -0
- package/blazorGlobalSrc/selection/selection.js +309 -0
- package/dist/ej2-richtexteditor.umd.min.js +1 -1
- package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es2015.js +6 -4
- package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
- package/dist/es6/ej2-richtexteditor.es5.js +6 -4
- package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
- package/helpers/e2e/index.d.ts +1 -0
- package/helpers/e2e/index.js +8 -0
- package/helpers/e2e/rte-helper.d.ts +79 -0
- package/helpers/e2e/rte-helper.js +81 -0
- package/package.json +1 -1
- package/src/editor-manager/plugin/dom-tree.js +6 -4
- package/src/global.d.ts +1 -0
- package/styles/bds-lite.css +7 -17
- package/styles/bds.css +11 -22
- package/styles/bootstrap-dark-lite.css +3 -13
- package/styles/bootstrap-dark.css +3 -14
- package/styles/bootstrap-lite.css +3 -13
- package/styles/bootstrap.css +3 -14
- package/styles/bootstrap4-lite.css +3 -13
- package/styles/bootstrap4.css +3 -14
- package/styles/bootstrap5-dark-lite.css +3 -13
- package/styles/bootstrap5-dark.css +3 -14
- package/styles/bootstrap5-lite.css +3 -13
- package/styles/bootstrap5.3-lite.css +3 -13
- package/styles/bootstrap5.3.css +3 -14
- package/styles/bootstrap5.css +3 -14
- package/styles/fabric-dark-lite.css +3 -13
- package/styles/fabric-dark.css +3 -14
- package/styles/fabric-lite.css +3 -13
- package/styles/fabric.css +3 -14
- package/styles/fluent-dark-lite.css +3 -13
- package/styles/fluent-dark.css +3 -14
- package/styles/fluent-lite.css +3 -13
- package/styles/fluent.css +3 -14
- package/styles/fluent2-lite.css +3 -13
- package/styles/fluent2.css +3 -14
- package/styles/highcontrast-light-lite.css +3 -13
- package/styles/highcontrast-light.css +3 -14
- package/styles/highcontrast-lite.css +3 -13
- package/styles/highcontrast.css +3 -14
- package/styles/material-dark-lite.css +3 -13
- package/styles/material-dark.css +3 -14
- package/styles/material-lite.css +3 -13
- package/styles/material.css +3 -14
- package/styles/material3-dark-lite.css +3 -13
- package/styles/material3-dark.css +3 -14
- package/styles/material3-lite.css +3 -13
- package/styles/material3.css +3 -14
- package/styles/rich-text-editor/_bds-definition.scss +2 -2
- package/styles/rich-text-editor/_bigger.scss +0 -1
- package/styles/rich-text-editor/_layout.scss +0 -9
- package/styles/rich-text-editor/_theme.scss +3 -0
- package/styles/rich-text-editor/bds.css +11 -22
- package/styles/rich-text-editor/bootstrap-dark.css +3 -14
- package/styles/rich-text-editor/bootstrap.css +3 -14
- package/styles/rich-text-editor/bootstrap4.css +3 -14
- package/styles/rich-text-editor/bootstrap5-dark.css +3 -14
- package/styles/rich-text-editor/bootstrap5.3.css +3 -14
- package/styles/rich-text-editor/bootstrap5.css +3 -14
- package/styles/rich-text-editor/fabric-dark.css +3 -14
- package/styles/rich-text-editor/fabric.css +3 -14
- package/styles/rich-text-editor/fluent-dark.css +3 -14
- package/styles/rich-text-editor/fluent.css +3 -14
- package/styles/rich-text-editor/fluent2.css +3 -14
- package/styles/rich-text-editor/highcontrast-light.css +3 -14
- package/styles/rich-text-editor/highcontrast.css +3 -14
- package/styles/rich-text-editor/material-dark.css +3 -14
- package/styles/rich-text-editor/material.css +3 -14
- package/styles/rich-text-editor/material3-dark.css +3 -14
- package/styles/rich-text-editor/material3.css +3 -14
- package/styles/rich-text-editor/tailwind-dark.css +3 -14
- package/styles/rich-text-editor/tailwind.css +3 -14
- package/styles/rich-text-editor/tailwind3.css +3 -14
- package/styles/tailwind-dark-lite.css +3 -13
- package/styles/tailwind-dark.css +3 -14
- package/styles/tailwind-lite.css +3 -13
- package/styles/tailwind.css +3 -14
- package/styles/tailwind3-lite.css +3 -13
- package/styles/tailwind3.css +3 -14
- package/tslint.json +111 -0
|
@@ -0,0 +1,853 @@
|
|
|
1
|
+
define(["require", "exports", "../base/constant", "@syncfusion/ej2-base", "@syncfusion/ej2-popups", "@syncfusion/ej2-navigations", "@syncfusion/ej2-inputs"], function (require, exports, events, ej2_base_1, ej2_popups_1, ej2_navigations_1, ej2_inputs_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var EmojiPicker = (function () {
|
|
5
|
+
function EmojiPicker(parent, serviceLocator) {
|
|
6
|
+
this.noResultsFoundCount = 0;
|
|
7
|
+
this.parent = parent;
|
|
8
|
+
this.locator = serviceLocator;
|
|
9
|
+
this.i10n = serviceLocator.getService('rteLocale');
|
|
10
|
+
this.renderFactory = this.locator.getService('rendererFactory');
|
|
11
|
+
this.addEventListener();
|
|
12
|
+
this.isDestroyed = false;
|
|
13
|
+
this.isPopupDestroyed = false;
|
|
14
|
+
}
|
|
15
|
+
EmojiPicker.prototype.destroy = function () {
|
|
16
|
+
if (this.isDestroyed) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
this.removeEventListener();
|
|
20
|
+
this.isDestroyed = true;
|
|
21
|
+
};
|
|
22
|
+
EmojiPicker.prototype.childDestroy = function () {
|
|
23
|
+
if (this.isPopupDestroyed) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (this.popupObj && !this.popupObj.isDestroyed) {
|
|
27
|
+
if (this.popupObj.element && this.popupObj.element.querySelector('.e-rte-emoji-search')) {
|
|
28
|
+
var textBox = ej2_base_1.getComponent(this.popupObj.element.querySelector('.e-rte-emoji-search'), 'textbox');
|
|
29
|
+
if (textBox && !textBox.isDestroyed) {
|
|
30
|
+
textBox.destroy();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (this.popupObj.element && this.popupObj.element.querySelector('.e-rte-emojipicker-toolbar')) {
|
|
34
|
+
var toolbar_1 = ej2_base_1.getComponent(this.popupObj.element.querySelector('.e-rte-emojipicker-toolbar'), 'toolbar');
|
|
35
|
+
if (toolbar_1 && !toolbar_1.isDestroyed) {
|
|
36
|
+
toolbar_1.destroy();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
var closeIcon = this.popupObj.element.querySelector('.e-clear-icon');
|
|
40
|
+
if (!ej2_base_1.isNullOrUndefined(closeIcon)) {
|
|
41
|
+
ej2_base_1.EventHandler.remove(closeIcon, 'mousedown', this.searchFilter);
|
|
42
|
+
}
|
|
43
|
+
this.popupObj.destroy();
|
|
44
|
+
this.isPopupDestroyed = true;
|
|
45
|
+
}
|
|
46
|
+
if (this.popDiv) {
|
|
47
|
+
ej2_base_1.EventHandler.remove(this.popDiv, 'keydown', this.onKeyDown);
|
|
48
|
+
ej2_base_1.EventHandler.remove(this.popDiv, 'keyup', this.searchFilter);
|
|
49
|
+
if (this.popDiv.querySelector('.e-rte-emojipicker-btn')) {
|
|
50
|
+
var btn = this.popDiv.querySelector('.e-rte-emojipicker-btn');
|
|
51
|
+
ej2_base_1.EventHandler.remove(btn, 'scroll', this.scrollEvent);
|
|
52
|
+
ej2_base_1.EventHandler.remove(btn, 'click', this.emojiBtnClick);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
EmojiPicker.prototype.addEventListener = function () {
|
|
57
|
+
this.parent.on(events.emojiPicker, this.toolbarClick, this);
|
|
58
|
+
this.parent.on(events.docClick, this.docClick, this);
|
|
59
|
+
this.parent.on(events.iframeMouseDown, this.onIframeMouseDown, this);
|
|
60
|
+
this.parent.on(events.keyDown, this.onkeyPress, this);
|
|
61
|
+
this.parent.on(events.keyUp, this.onkeyUp, this);
|
|
62
|
+
this.parent.on(events.contentscroll, this.contentscroll, this);
|
|
63
|
+
this.parent.on(events.scroll, this.contentscroll, this);
|
|
64
|
+
this.parent.on(events.destroy, this.destroy, this);
|
|
65
|
+
};
|
|
66
|
+
EmojiPicker.prototype.toolbarClick = function (args) {
|
|
67
|
+
var _this = this;
|
|
68
|
+
var _a, _b;
|
|
69
|
+
this.noResultsFoundCount = 0;
|
|
70
|
+
var spanElement;
|
|
71
|
+
if (!ej2_base_1.isNullOrUndefined(this.parent.element.querySelector('.e-emoji'))) {
|
|
72
|
+
spanElement = this.parent.element.querySelector('.e-emoji');
|
|
73
|
+
}
|
|
74
|
+
else if (this.parent.inlineMode.enable) {
|
|
75
|
+
spanElement = this.parent.element.ownerDocument.querySelector('.e-emoji');
|
|
76
|
+
}
|
|
77
|
+
this.divElement = spanElement.closest('div');
|
|
78
|
+
if (!(this.parent.inputElement.contains(this.parent.formatter.editorManager.nodeSelection.
|
|
79
|
+
getRange(this.parent.contentModule.getDocument()).startContainer))) {
|
|
80
|
+
this.parent.contentModule.getEditPanel().focus();
|
|
81
|
+
}
|
|
82
|
+
var range = this.parent.formatter.editorManager.nodeSelection.getRange(this.parent.contentModule.getDocument());
|
|
83
|
+
this.save = this.parent.formatter.editorManager.nodeSelection.save(range, this.parent.contentModule.getDocument());
|
|
84
|
+
this.clickEvent = args.args;
|
|
85
|
+
var emojiPicker = this.parent.emojiPickerSettings.iconsSet;
|
|
86
|
+
if (this.popupObj) {
|
|
87
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
88
|
+
if (this.popupObj.element.querySelector('.e-rte-emoji-search') || !this.parent.emojiPickerSettings.showSearchBox) {
|
|
89
|
+
this.popupObj.hide();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.popupObj.hide();
|
|
93
|
+
}
|
|
94
|
+
this.popDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-popup', id: this.parent.getID() + '_emojiPicker' });
|
|
95
|
+
if (!ej2_base_1.isNullOrUndefined(this.parent.getToolbar()) && !this.parent.inlineMode.enable) {
|
|
96
|
+
this.parent.getToolbar().parentElement.appendChild(this.popDiv);
|
|
97
|
+
}
|
|
98
|
+
else if (this.parent.inlineMode.enable) {
|
|
99
|
+
this.parent.rootContainer.appendChild(this.popDiv);
|
|
100
|
+
}
|
|
101
|
+
ej2_base_1.EventHandler.add(this.popDiv, 'keydown', this.onKeyDown, this);
|
|
102
|
+
ej2_base_1.EventHandler.add(this.popDiv, 'keyup', this.searchFilter, this);
|
|
103
|
+
var extendEle = this.parent.element.querySelector('.e-toolbar-extended');
|
|
104
|
+
var zIndex;
|
|
105
|
+
if (!ej2_base_1.isNullOrUndefined(extendEle)) {
|
|
106
|
+
var computedStyle = window.getComputedStyle(extendEle);
|
|
107
|
+
zIndex = computedStyle.getPropertyValue('z-index');
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
zIndex = '10001';
|
|
111
|
+
}
|
|
112
|
+
var target;
|
|
113
|
+
var xValue;
|
|
114
|
+
var yValue;
|
|
115
|
+
if (!ej2_base_1.isNullOrUndefined(args.args) && !this.parent.inlineMode.enable &&
|
|
116
|
+
ej2_base_1.isNullOrUndefined(this.parent.quickToolbarSettings.text)) {
|
|
117
|
+
target = args.args.originalEvent.target;
|
|
118
|
+
target = target.classList.contains('e-toolbar-item') ? target.firstChild : target.parentElement;
|
|
119
|
+
xValue = 'left';
|
|
120
|
+
yValue = 'bottom';
|
|
121
|
+
}
|
|
122
|
+
else if (ej2_base_1.isNullOrUndefined(args.x) && ej2_base_1.isNullOrUndefined(args.y) && !this.parent.inlineMode.enable && ej2_base_1.isNullOrUndefined(this.parent.quickToolbarSettings.text)) {
|
|
123
|
+
target = this.parent.inputElement;
|
|
124
|
+
if (this.parent.contentModule.getDocument().getSelection().rangeCount > 0) {
|
|
125
|
+
var coordinates = this.getCoordinates();
|
|
126
|
+
xValue = coordinates.left;
|
|
127
|
+
yValue = coordinates.top;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (ej2_base_1.isNullOrUndefined(args.x) && ej2_base_1.isNullOrUndefined(args.y) && (this.parent.inlineMode.enable || !ej2_base_1.isNullOrUndefined(this.parent.quickToolbarSettings.text))) {
|
|
131
|
+
this.parent.notify(events.hidePopup, {});
|
|
132
|
+
if (this.parent.contentModule.getDocument().getSelection().rangeCount > 0) {
|
|
133
|
+
var coordinates = this.getCoordinates();
|
|
134
|
+
xValue = coordinates.left;
|
|
135
|
+
yValue = coordinates.top;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
target = this.parent.inputElement;
|
|
140
|
+
xValue = args.x;
|
|
141
|
+
yValue = args.y;
|
|
142
|
+
}
|
|
143
|
+
this.popupObj = new ej2_popups_1.Popup(this.popDiv, {
|
|
144
|
+
targetType: 'relative',
|
|
145
|
+
relateTo: target,
|
|
146
|
+
collision: { X: 'fit', Y: 'none' },
|
|
147
|
+
offsetY: 8,
|
|
148
|
+
viewPortElement: this.parent.element,
|
|
149
|
+
position: { X: xValue, Y: yValue },
|
|
150
|
+
enableRtl: this.parent.enableRtl,
|
|
151
|
+
zIndex: parseInt(zIndex, 10) + 1,
|
|
152
|
+
actionOnScroll: 'hide',
|
|
153
|
+
close: function () {
|
|
154
|
+
_this.parent.isBlur = false;
|
|
155
|
+
_this.childDestroy();
|
|
156
|
+
_this.popupObj.element.parentElement.style.zIndex = '';
|
|
157
|
+
ej2_base_1.detach(_this.popupObj.element);
|
|
158
|
+
_this.popupObj = null;
|
|
159
|
+
var activeElement = _this.divElement.firstChild;
|
|
160
|
+
activeElement.focus();
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
this.isPopupDestroyed = false;
|
|
164
|
+
ej2_base_1.addClass([this.popupObj.element], 'e-popup-open');
|
|
165
|
+
this.popupObj.element.parentElement.style.zIndex = '11';
|
|
166
|
+
this.popupObj.refreshPosition(target);
|
|
167
|
+
if ((!ej2_base_1.isNullOrUndefined(args.args) || (ej2_base_1.isNullOrUndefined(args.x) && ej2_base_1.isNullOrUndefined(args.y))) &&
|
|
168
|
+
this.parent.emojiPickerSettings.showSearchBox) {
|
|
169
|
+
var inputEle = ej2_base_1.createElement('input', { id: 'e-rte-emoji-search', className: 'e-rte-emoji-search' });
|
|
170
|
+
this.popDiv.append(inputEle);
|
|
171
|
+
var inputobj = new ej2_inputs_1.TextBox({
|
|
172
|
+
placeholder: this.i10n.getConstant('emojiPickerTypeToFind'),
|
|
173
|
+
showClearButton: true
|
|
174
|
+
});
|
|
175
|
+
inputobj.appendTo(inputEle);
|
|
176
|
+
if (this.parent.userAgentData.isSafari() && this.parent.inputElement.contains(this.parent.getRange().startContainer)) {
|
|
177
|
+
this.parent.notify(events.selectionSave, {});
|
|
178
|
+
}
|
|
179
|
+
inputEle.focus();
|
|
180
|
+
}
|
|
181
|
+
var closeIcon = this.popupObj.element.querySelector('.e-clear-icon');
|
|
182
|
+
if (!ej2_base_1.isNullOrUndefined(closeIcon)) {
|
|
183
|
+
ej2_base_1.EventHandler.add(closeIcon, 'mousedown', this.searchFilter, this);
|
|
184
|
+
}
|
|
185
|
+
var emojiToolBar = this.parent.createElement('div', { className: 'e-rte-emojipicker-toolbar' });
|
|
186
|
+
this.popDiv.appendChild(emojiToolBar);
|
|
187
|
+
var pushToolBar = [];
|
|
188
|
+
for (var i = 0; i < this.parent.emojiPickerSettings.iconsSet.length; i++) {
|
|
189
|
+
if (!ej2_base_1.isNullOrUndefined(this.parent.emojiPickerSettings.iconsSet[i].iconCss)) {
|
|
190
|
+
pushToolBar.push({ prefixIcon: this.parent.emojiPickerSettings.iconsSet[i].iconCss, htmlAttributes: (_a = {}, _a['title'] = this.parent.emojiPickerSettings.iconsSet[i].name, _a) });
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
pushToolBar.push({ text: '&#x' + this.parent.emojiPickerSettings.iconsSet[i].code + ';', htmlAttributes: (_b = {}, _b['title'] = this.parent.emojiPickerSettings.iconsSet[i].name, _b) });
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
var toolbarObj = new ej2_navigations_1.Toolbar({
|
|
197
|
+
items: pushToolBar,
|
|
198
|
+
clicked: this.emojiToolbarClick.bind(this)
|
|
199
|
+
});
|
|
200
|
+
toolbarObj.appendTo(emojiToolBar);
|
|
201
|
+
var emojiBtnDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-btn' });
|
|
202
|
+
this.popDiv.appendChild(emojiBtnDiv);
|
|
203
|
+
var height;
|
|
204
|
+
var popupBorder = window.getComputedStyle(this.popDiv);
|
|
205
|
+
if ((ej2_base_1.isNullOrUndefined(args.args) && !(ej2_base_1.isNullOrUndefined(args.x) && ej2_base_1.isNullOrUndefined(args.y))) ||
|
|
206
|
+
!this.parent.emojiPickerSettings.showSearchBox) {
|
|
207
|
+
height = (this.popDiv.getBoundingClientRect().height - emojiToolBar.getBoundingClientRect().height - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
208
|
+
emojiBtnDiv.style.setProperty('height', height, 'important');
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
var inputELe = this.parent.element.querySelector('.e-rte-emoji-search').parentElement;
|
|
212
|
+
var getComputedStyle_1 = window.getComputedStyle(inputELe);
|
|
213
|
+
height = (this.popDiv.getBoundingClientRect().height - emojiToolBar.getBoundingClientRect().height
|
|
214
|
+
- inputELe.getBoundingClientRect().height
|
|
215
|
+
- parseFloat(getComputedStyle_1.marginTop) - parseFloat(getComputedStyle_1.marginBottom)
|
|
216
|
+
- (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
217
|
+
emojiBtnDiv.style.setProperty('height', height, 'important');
|
|
218
|
+
}
|
|
219
|
+
for (var i = 0; i < emojiPicker.length; i++) {
|
|
220
|
+
var emojiGroupDiv = this.parent.createElement('div', { className: 'e-rte-emojipicker-group' });
|
|
221
|
+
emojiBtnDiv.appendChild(emojiGroupDiv);
|
|
222
|
+
var emojiName = this.parent.createElement('div', { className: 'e-rte-emojipicker-name' });
|
|
223
|
+
emojiName.innerText = this.parent.emojiPickerSettings.iconsSet[i].name;
|
|
224
|
+
emojiName.setAttribute('aria-label', this.parent.emojiPickerSettings.iconsSet[i].name);
|
|
225
|
+
emojiGroupDiv.appendChild(emojiName);
|
|
226
|
+
var emojiBtn = this.parent.createElement('div', { className: 'e-rte-emojipickerbtn-group' });
|
|
227
|
+
emojiGroupDiv.appendChild(emojiBtn);
|
|
228
|
+
for (var j = 0; j < emojiPicker[i].icons.length; j++) {
|
|
229
|
+
var button = this.parent.createElement('button', { className: 'e-btn ' + ' ' + 'e-control' });
|
|
230
|
+
button.innerHTML = this.buttoncode(this.parent.emojiPickerSettings.iconsSet[i].icons[j].code);
|
|
231
|
+
button.setAttribute('aria-label', (this.parent.emojiPickerSettings.iconsSet[i].icons[j].desc));
|
|
232
|
+
button.setAttribute('title', (this.parent.emojiPickerSettings.iconsSet[i].icons[j].desc));
|
|
233
|
+
emojiBtn.appendChild(button);
|
|
234
|
+
if (button.innerHTML.length > 2) {
|
|
235
|
+
button.style.fontSize = '17px';
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
ej2_base_1.EventHandler.add(emojiBtnDiv, 'scroll', this.scrollEvent, this);
|
|
240
|
+
ej2_base_1.EventHandler.add(emojiBtnDiv, 'click', this.emojiBtnClick, this);
|
|
241
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
242
|
+
if (ej2_base_1.isNullOrUndefined(this.parent.element.querySelector('.e-rte-emoji-search')) && !ej2_base_1.isNullOrUndefined(args.args)) {
|
|
243
|
+
emojiButtons[0].focus();
|
|
244
|
+
ej2_base_1.addClass([emojiButtons[0]], 'e-focus');
|
|
245
|
+
}
|
|
246
|
+
var popup = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
247
|
+
var toolbarName = this.parent.element.querySelectorAll('.e-rte-emojipicker-toolbar button');
|
|
248
|
+
var scrollTop;
|
|
249
|
+
if (!ej2_base_1.isNullOrUndefined(popup)) {
|
|
250
|
+
scrollTop = Math.round(popup.scrollTop);
|
|
251
|
+
}
|
|
252
|
+
if (scrollTop < toolbarName[0].offsetHeight) {
|
|
253
|
+
ej2_base_1.addClass([toolbarName[0]], 'e-selected');
|
|
254
|
+
}
|
|
255
|
+
if (this.popupObj) {
|
|
256
|
+
ej2_base_1.addClass([this.divElement], 'e-active');
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
EmojiPicker.prototype.onIframeMouseDown = function (e) {
|
|
260
|
+
if (this.popupObj) {
|
|
261
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
262
|
+
this.popupObj.hide();
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
EmojiPicker.prototype.buttoncode = function (value) {
|
|
266
|
+
var valueLength = value.split('-');
|
|
267
|
+
var joinedEmoji = valueLength.map(function (cp) { return String.fromCodePoint(parseInt(cp, 16)); }).join('\u200D');
|
|
268
|
+
return joinedEmoji;
|
|
269
|
+
};
|
|
270
|
+
EmojiPicker.prototype.docClick = function (e) {
|
|
271
|
+
var target = e.args.target;
|
|
272
|
+
if (target && target.classList && ((this.popupObj && !ej2_base_1.closest(target, '[id=' + '\'' + this.popupObj.element.id + '\'' + ']')))
|
|
273
|
+
&& (!target.classList.contains('e-emoji') && !target.classList.contains('e-toolbar-item'))) {
|
|
274
|
+
if (this.popupObj) {
|
|
275
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
276
|
+
this.popupObj.hide();
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
EmojiPicker.prototype.scrollEvent = function () {
|
|
281
|
+
var popup = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
282
|
+
var emojiSet = this.parent.element.querySelectorAll('.e-rte-emojipicker-group');
|
|
283
|
+
var toolbarName = this.parent.element.querySelectorAll('.e-rte-emojipicker-toolbar button');
|
|
284
|
+
var scrollTop;
|
|
285
|
+
if (!ej2_base_1.isNullOrUndefined(popup)) {
|
|
286
|
+
scrollTop = Math.round(popup.scrollTop);
|
|
287
|
+
}
|
|
288
|
+
var firstSetWidth = 0;
|
|
289
|
+
for (var j = 0; j < toolbarName.length; j++) {
|
|
290
|
+
if (scrollTop < toolbarName[0].offsetHeight) {
|
|
291
|
+
if (!ej2_base_1.isNullOrUndefined(toolbarName[j + 1])) {
|
|
292
|
+
ej2_base_1.removeClass([toolbarName[j + 1]], 'e-selected');
|
|
293
|
+
}
|
|
294
|
+
ej2_base_1.addClass([toolbarName[0]], 'e-selected');
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
for (var i = 0; i < emojiSet.length; i++) {
|
|
298
|
+
firstSetWidth += Math.round(emojiSet[i].offsetHeight);
|
|
299
|
+
if (scrollTop >= firstSetWidth) {
|
|
300
|
+
for (var k = 0; k < toolbarName.length; k++) {
|
|
301
|
+
if (toolbarName[k].classList.contains('e-selected')) {
|
|
302
|
+
ej2_base_1.removeClass([toolbarName[k]], 'e-selected');
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
if (!ej2_base_1.isNullOrUndefined(toolbarName[i + 1])) {
|
|
306
|
+
ej2_base_1.addClass([toolbarName[i + 1]], 'e-selected');
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
EmojiPicker.prototype.contentscroll = function () {
|
|
312
|
+
if (ej2_base_1.isNullOrUndefined(this.clickEvent) && this.popupObj) {
|
|
313
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
314
|
+
this.popupObj.hide();
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
EmojiPicker.prototype.emojiToolbarClick = function (e) {
|
|
319
|
+
var args = {
|
|
320
|
+
text: e.item.htmlAttributes.title,
|
|
321
|
+
};
|
|
322
|
+
var currentEleName = args.text;
|
|
323
|
+
var emojiGroups = this.parent.element.querySelectorAll('.e-rte-emojipicker-group');
|
|
324
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
325
|
+
var toolbarName = this.parent.element.querySelectorAll('.e-rte-emojipicker-toolbar button');
|
|
326
|
+
for (var i = 0; i < toolbarName.length; i++) {
|
|
327
|
+
if (toolbarName[i].classList.contains('e-selected')) {
|
|
328
|
+
ej2_base_1.removeClass([toolbarName[i]], 'e-selected');
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
332
|
+
if (emojiButtons[i].classList.contains('e-focus')) {
|
|
333
|
+
ej2_base_1.removeClass([emojiButtons[i]], 'e-focus');
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
var emojiGroupsheight = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
337
|
+
var emojiHeight = 0;
|
|
338
|
+
emojiGroups.forEach(function (group) {
|
|
339
|
+
var childNodes = group.childNodes[0];
|
|
340
|
+
var focusBtn = group.childNodes[1].childNodes[0];
|
|
341
|
+
var ariaLabel = childNodes.getAttribute('aria-label');
|
|
342
|
+
if (currentEleName === ariaLabel) {
|
|
343
|
+
if (childNodes) {
|
|
344
|
+
emojiGroupsheight.scrollTop = emojiHeight + 10;
|
|
345
|
+
ej2_base_1.addClass([focusBtn], 'e-focus');
|
|
346
|
+
focusBtn.focus();
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
emojiHeight += group.scrollHeight;
|
|
351
|
+
ej2_base_1.removeClass([focusBtn], 'e-focus');
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
};
|
|
355
|
+
EmojiPicker.prototype.onKeyDown = function (e) {
|
|
356
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
357
|
+
var emojiGroups = this.parent.element.querySelectorAll('.e-rte-emojipickerbtn-group');
|
|
358
|
+
var searchKeyHandler = this.parent.element.querySelector('.e-rte-emojisearch-btn button');
|
|
359
|
+
if (e.keyCode === 27) {
|
|
360
|
+
if (this.popupObj) {
|
|
361
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
362
|
+
this.popupObj.hide();
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
if (e.keyCode === 13) {
|
|
366
|
+
var activeEle = document.activeElement;
|
|
367
|
+
if (activeEle.classList.contains('e-btn')) {
|
|
368
|
+
this.emojiBtnClick(e);
|
|
369
|
+
e.preventDefault();
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
var srcElement = e.srcElement;
|
|
373
|
+
if (!ej2_base_1.isNullOrUndefined(srcElement)) {
|
|
374
|
+
if (srcElement.classList.contains('e-rte-emoji-search') && e.keyCode === 40) {
|
|
375
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
376
|
+
if (emojiButtons[i].classList.contains('e-focus')) {
|
|
377
|
+
ej2_base_1.removeClass([emojiButtons[i]], 'e-focus');
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
if (!ej2_base_1.isNullOrUndefined(searchKeyHandler)) {
|
|
383
|
+
this.filterKeyHandler(e);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
387
|
+
var focusIndex = i;
|
|
388
|
+
if (emojiButtons[i].classList.contains('e-focus')) {
|
|
389
|
+
if (e.keyCode === 40) {
|
|
390
|
+
if (emojiButtons.length - 4 > i) {
|
|
391
|
+
var count = 0;
|
|
392
|
+
for (var j = 0; j < emojiGroups.length; j++) {
|
|
393
|
+
for (var k = 0; k < emojiGroups[j].childNodes.length; k++) {
|
|
394
|
+
var childNodes = emojiGroups[j].childNodes[k];
|
|
395
|
+
if (childNodes.classList.contains('e-focus') && count !== 1) {
|
|
396
|
+
var currentIndex = k;
|
|
397
|
+
var lastChild = emojiGroups[j].lastChild;
|
|
398
|
+
var lastRowIndex = Math.floor((k) % 6);
|
|
399
|
+
var lastEleLength = emojiGroups[j].childNodes.length - 1;
|
|
400
|
+
var lastEleIndex = Math.floor((lastEleLength) % 6);
|
|
401
|
+
if (currentIndex !== -1) {
|
|
402
|
+
var nextRowIndex = currentIndex + 6;
|
|
403
|
+
if (!ej2_base_1.isNullOrUndefined(emojiGroups[j].childNodes[nextRowIndex])) {
|
|
404
|
+
var firstFocusEle = emojiButtons[i];
|
|
405
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
406
|
+
var focusEle = emojiButtons[focusIndex += 6];
|
|
407
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
408
|
+
focusEle.focus();
|
|
409
|
+
break;
|
|
410
|
+
}
|
|
411
|
+
else if (ej2_base_1.isNullOrUndefined(emojiGroups[j].childNodes[nextRowIndex]) && !lastChild.classList.contains('e-focus') && lastEleIndex < lastRowIndex) {
|
|
412
|
+
var firstFocusEle = emojiButtons[i];
|
|
413
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
414
|
+
var focusEle = emojiGroups[j].lastChild;
|
|
415
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
416
|
+
focusEle.focus();
|
|
417
|
+
count = 1;
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
var firstFocusEle = emojiButtons[i];
|
|
422
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
423
|
+
var focusEle = emojiGroups[j + 1]
|
|
424
|
+
.childNodes[lastRowIndex];
|
|
425
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
426
|
+
focusEle.focus();
|
|
427
|
+
count = 1;
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
break;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
else if (e.keyCode === 38) {
|
|
438
|
+
if (i >= 6) {
|
|
439
|
+
var count = 0;
|
|
440
|
+
for (var j = 0; j < emojiGroups.length; j++) {
|
|
441
|
+
for (var k = 0; k < emojiGroups[j].childNodes.length; k++) {
|
|
442
|
+
var childNodes = emojiGroups[j].childNodes[k];
|
|
443
|
+
if (childNodes.classList.contains('e-focus') && count !== 1) {
|
|
444
|
+
var currentIndex = k;
|
|
445
|
+
var previousRowLength = ej2_base_1.isNullOrUndefined(emojiGroups[j - 1]) ? null :
|
|
446
|
+
emojiGroups[j - 1].childNodes.length % 6 || 6;
|
|
447
|
+
if (currentIndex !== -1) {
|
|
448
|
+
var previousRowIndex = currentIndex - 6;
|
|
449
|
+
if (!ej2_base_1.isNullOrUndefined(emojiGroups[j].childNodes[previousRowIndex])) {
|
|
450
|
+
var firstFocusEle = emojiButtons[i];
|
|
451
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
452
|
+
var focusEle = emojiButtons[focusIndex -= 6];
|
|
453
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
454
|
+
focusEle.focus();
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
else if (ej2_base_1.isNullOrUndefined(emojiGroups[j - 1].childNodes[emojiGroups[j - 1]
|
|
458
|
+
.childNodes.length - (previousRowLength - k)])) {
|
|
459
|
+
var firstFocusEle = emojiButtons[i];
|
|
460
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
461
|
+
var focusEle = emojiGroups[j - 1].lastChild;
|
|
462
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
463
|
+
focusEle.focus();
|
|
464
|
+
count = 1;
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
var firstFocusEle = emojiButtons[i];
|
|
469
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
470
|
+
var focusEle = emojiGroups[j - 1].childNodes[emojiGroups[j - 1].
|
|
471
|
+
childNodes.length - (previousRowLength - k)];
|
|
472
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
473
|
+
focusEle.focus();
|
|
474
|
+
count = 1;
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
else {
|
|
483
|
+
var firstFocusEle = emojiButtons[i];
|
|
484
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
485
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
486
|
+
var inputELe = this.popupObj.element.querySelector('.e-rte-emoji-search');
|
|
487
|
+
if (ej2_base_1.isNullOrUndefined(focusEle) && !ej2_base_1.isNullOrUndefined(inputELe)) {
|
|
488
|
+
inputELe.focus();
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
492
|
+
focusEle.focus();
|
|
493
|
+
}
|
|
494
|
+
break;
|
|
495
|
+
}
|
|
496
|
+
else if (e.keyCode === 39) {
|
|
497
|
+
if (emojiButtons.length !== i + 1) {
|
|
498
|
+
var firstFocusEle = emojiButtons[i];
|
|
499
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
500
|
+
var focusEle = emojiButtons[focusIndex += 1];
|
|
501
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
502
|
+
emojiButtons[focusIndex].focus();
|
|
503
|
+
}
|
|
504
|
+
break;
|
|
505
|
+
}
|
|
506
|
+
else if (e.keyCode === 37) {
|
|
507
|
+
if (i > 0) {
|
|
508
|
+
var firstFocusEle = emojiButtons[i];
|
|
509
|
+
ej2_base_1.removeClass([firstFocusEle], 'e-focus');
|
|
510
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
511
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
512
|
+
emojiButtons[focusIndex].focus();
|
|
513
|
+
}
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (e.keyCode === 40) {
|
|
520
|
+
var firstFocusEle = this.parent.element.querySelector('.e-focus');
|
|
521
|
+
if (ej2_base_1.isNullOrUndefined(firstFocusEle)) {
|
|
522
|
+
var focusEle = emojiButtons[0];
|
|
523
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
524
|
+
if (this.parent.userAgentData.isSafari() && this.parent.inputElement.contains(this.parent.getRange().startContainer)) {
|
|
525
|
+
this.parent.notify(events.selectionSave, {});
|
|
526
|
+
}
|
|
527
|
+
emojiButtons[0].focus();
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
EmojiPicker.prototype.filterKeyHandler = function (e) {
|
|
532
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojisearch-btn button');
|
|
533
|
+
var firstFocusEle = this.parent.element.querySelector('.e-focus');
|
|
534
|
+
if (ej2_base_1.isNullOrUndefined(firstFocusEle) && e.keyCode === 40) {
|
|
535
|
+
var focusEle = emojiButtons[0];
|
|
536
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
537
|
+
if (this.parent.userAgentData.isSafari()) {
|
|
538
|
+
this.parent.notify(events.selectionSave, {});
|
|
539
|
+
}
|
|
540
|
+
emojiButtons[0].focus();
|
|
541
|
+
}
|
|
542
|
+
else {
|
|
543
|
+
for (var i = 0; i < emojiButtons.length; i++) {
|
|
544
|
+
var focusIndex = i;
|
|
545
|
+
var childNodes = emojiButtons[i];
|
|
546
|
+
if (childNodes.classList.contains('e-focus')) {
|
|
547
|
+
if (e.keyCode === 38) {
|
|
548
|
+
if (i >= 6) {
|
|
549
|
+
var firstFocusEle_1 = emojiButtons[i];
|
|
550
|
+
ej2_base_1.removeClass([firstFocusEle_1], 'e-focus');
|
|
551
|
+
var focusEle = emojiButtons[focusIndex -= 6];
|
|
552
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
553
|
+
focusEle.focus();
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
var firstFocusEle_2 = emojiButtons[i];
|
|
558
|
+
ej2_base_1.removeClass([firstFocusEle_2], 'e-focus');
|
|
559
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
560
|
+
var inputELe = this.popupObj.element.querySelector('.e-rte-emoji-search');
|
|
561
|
+
if (ej2_base_1.isNullOrUndefined(focusEle) && !ej2_base_1.isNullOrUndefined(inputELe)) {
|
|
562
|
+
inputELe.focus();
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
566
|
+
focusEle.focus();
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
else if (e.keyCode === 40) {
|
|
570
|
+
if (emojiButtons.length - 6 > i) {
|
|
571
|
+
var firstFocusEle_3 = emojiButtons[i];
|
|
572
|
+
ej2_base_1.removeClass([firstFocusEle_3], 'e-focus');
|
|
573
|
+
var focusEle = emojiButtons[focusIndex += 6];
|
|
574
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
575
|
+
focusEle.focus();
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
else if (e.keyCode === 39) {
|
|
580
|
+
if (emojiButtons.length !== i + 1) {
|
|
581
|
+
var firstFocusEle_4 = emojiButtons[i];
|
|
582
|
+
ej2_base_1.removeClass([firstFocusEle_4], 'e-focus');
|
|
583
|
+
var focusEle = emojiButtons[focusIndex += 1];
|
|
584
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
585
|
+
emojiButtons[focusIndex].focus();
|
|
586
|
+
}
|
|
587
|
+
break;
|
|
588
|
+
}
|
|
589
|
+
else if (e.keyCode === 37) {
|
|
590
|
+
if (i > 0) {
|
|
591
|
+
var firstFocusEle_5 = emojiButtons[i];
|
|
592
|
+
ej2_base_1.removeClass([firstFocusEle_5], 'e-focus');
|
|
593
|
+
var focusEle = emojiButtons[focusIndex -= 1];
|
|
594
|
+
ej2_base_1.addClass([focusEle], 'e-focus');
|
|
595
|
+
emojiButtons[focusIndex].focus();
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
EmojiPicker.prototype.searchFilter = function (e, value, hasInternalCall) {
|
|
604
|
+
if (hasInternalCall === void 0) { hasInternalCall = false; }
|
|
605
|
+
var inputElement = this.parent.element.querySelector('.e-rte-emoji-search');
|
|
606
|
+
var contentELe = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel() :
|
|
607
|
+
this.parent.element.querySelector('.e-content');
|
|
608
|
+
if (document.activeElement === inputElement || document.activeElement === contentELe) {
|
|
609
|
+
var trimmedStr = void 0;
|
|
610
|
+
if (value !== ':' && !ej2_base_1.isNullOrUndefined(value)) {
|
|
611
|
+
trimmedStr = value.replace(/^:/, '');
|
|
612
|
+
}
|
|
613
|
+
else if (!ej2_base_1.isNullOrUndefined(value)) {
|
|
614
|
+
trimmedStr = value;
|
|
615
|
+
}
|
|
616
|
+
var inputValue = ej2_base_1.isNullOrUndefined(inputElement) ? trimmedStr : inputElement.value;
|
|
617
|
+
var emojiButtons = this.parent.element.querySelectorAll('.e-rte-emojipicker-btn button');
|
|
618
|
+
var emojipickerAll = this.parent.element.querySelector('.e-rte-emojipicker-btn');
|
|
619
|
+
var emojiGroups = this.parent.element.querySelectorAll('.e-rte-emojipicker-group');
|
|
620
|
+
var toolbarGroup = this.parent.element.querySelector('.e-rte-emojipicker-toolbar');
|
|
621
|
+
var excludedDiv_1 = this.parent.element.querySelector('.e-rte-emojisearch-btn');
|
|
622
|
+
var firstChild = this.popDiv.childNodes[0];
|
|
623
|
+
var getComputedStyle_2 = window.getComputedStyle(firstChild);
|
|
624
|
+
var inputHeight = firstChild.nodeName === 'SPAN' ? (firstChild.getBoundingClientRect().height + parseFloat(getComputedStyle_2.marginTop) +
|
|
625
|
+
parseFloat(getComputedStyle_2.marginBottom)) : 0;
|
|
626
|
+
var popupBorder = window.getComputedStyle(this.popDiv);
|
|
627
|
+
var filteredButtons = ej2_base_1.isNullOrUndefined(excludedDiv_1) ? emojiButtons :
|
|
628
|
+
Array.from(emojiButtons).filter(function (button) { return !excludedDiv_1.contains(button); });
|
|
629
|
+
if (!ej2_base_1.isNullOrUndefined(toolbarGroup) && !ej2_base_1.isNullOrUndefined(emojipickerAll) && !ej2_base_1.isNullOrUndefined(inputValue)) {
|
|
630
|
+
if (inputValue === '' || value === ':') {
|
|
631
|
+
toolbarGroup.style.display = '';
|
|
632
|
+
emojipickerAll.style.height = (this.popDiv.getBoundingClientRect().height - toolbarGroup.getBoundingClientRect().height - inputHeight - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
633
|
+
emojiGroups.forEach(function (element) {
|
|
634
|
+
element.style.display = '';
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
emojiGroups.forEach(function (element) {
|
|
639
|
+
element.style.display = 'none';
|
|
640
|
+
});
|
|
641
|
+
toolbarGroup.style.display = 'none';
|
|
642
|
+
emojipickerAll.style.height = (this.popDiv.getBoundingClientRect().height - inputHeight - (2 * parseFloat(popupBorder.borderWidth))) + 'px';
|
|
643
|
+
}
|
|
644
|
+
var emojiBtnDiv = this.parent.createElement('div', { className: 'e-rte-emojisearch-btn' });
|
|
645
|
+
var emojis = this.parent.element.querySelector('.e-rte-emojisearch-btn');
|
|
646
|
+
if (emojis) {
|
|
647
|
+
emojis.remove();
|
|
648
|
+
}
|
|
649
|
+
var noEMoji = true;
|
|
650
|
+
for (var i = 0; i < filteredButtons.length; i++) {
|
|
651
|
+
if (!ej2_base_1.isNullOrUndefined(filteredButtons[i].getAttribute('title'))) {
|
|
652
|
+
var title = filteredButtons[i].getAttribute('title').toLowerCase();
|
|
653
|
+
var titleLength = title.split(' ');
|
|
654
|
+
for (var j = 0; j < titleLength.length; j++) {
|
|
655
|
+
if (titleLength[j].startsWith(inputValue.toLowerCase()) && inputValue !== '') {
|
|
656
|
+
var emoji = filteredButtons[i].cloneNode(true);
|
|
657
|
+
emojiBtnDiv.appendChild(emoji);
|
|
658
|
+
noEMoji = false;
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
var noEmojiObj = this.parent.createElement('div', { className: 'e-rte-emojiSearch-noEmoji' });
|
|
665
|
+
if (noEMoji && !this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') && (inputValue !== '' && value !== ':' && value !== ': :')) {
|
|
666
|
+
if (!ej2_base_1.isNullOrUndefined(noEmojiObj)) {
|
|
667
|
+
noEmojiObj.innerHTML = '<span style="color: rgba(0, 0, 0, 0.75); font-weight: 500; font-size: 16px;">' + this.i10n.getConstant('emojiPickerNoResultFound') + ' 😥 </span>' + '<br>' + '<span style="color: rgba(0, 0, 0, 0.75);"> ' + this.i10n.getConstant('emojiPickerTrySomethingElse') + ' ? </span>';
|
|
668
|
+
noEmojiObj.style.margin = '55px';
|
|
669
|
+
emojipickerAll.appendChild(noEmojiObj);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
else if (!noEMoji && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji') || (inputValue === '' && value === ':') || (inputValue === '' && this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'))) {
|
|
673
|
+
emojipickerAll.removeChild(this.parent.element.querySelector('.e-rte-emojiSearch-noEmoji'));
|
|
674
|
+
}
|
|
675
|
+
emojipickerAll.appendChild(emojiBtnDiv);
|
|
676
|
+
if (hasInternalCall) {
|
|
677
|
+
if (noEMoji && value !== ':') {
|
|
678
|
+
this.noResultsFoundCount += 1;
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
681
|
+
this.noResultsFoundCount = 0;
|
|
682
|
+
}
|
|
683
|
+
if (this.noResultsFoundCount >= 9) {
|
|
684
|
+
if (!ej2_base_1.isNullOrUndefined(this.popupObj)) {
|
|
685
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
686
|
+
this.popupObj.hide();
|
|
687
|
+
this.noResultsFoundCount = 0;
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
else {
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
else {
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
};
|
|
701
|
+
EmojiPicker.prototype.emojiBtnClick = function (e) {
|
|
702
|
+
var event = new MouseEvent('mouseleave', { bubbles: true, cancelable: true });
|
|
703
|
+
var emotePickerTooltips = this.parent.element.querySelectorAll('.e-rte-emojipicker-popup [data-tooltip-id]');
|
|
704
|
+
for (var i = 0; i < emotePickerTooltips.length; i++) {
|
|
705
|
+
emotePickerTooltips[i].dispatchEvent(event);
|
|
706
|
+
}
|
|
707
|
+
var targetEle = e.target;
|
|
708
|
+
if (targetEle.tagName !== 'BUTTON') {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
targetEle.focus();
|
|
712
|
+
var startOffset = this.save.startOffset;
|
|
713
|
+
var textContent = this.save.range.startContainer.textContent;
|
|
714
|
+
var previousText = textContent.substring(startOffset, startOffset + 1);
|
|
715
|
+
if (!ej2_base_1.isNullOrUndefined(this.clickEvent) || previousText !== ':') {
|
|
716
|
+
this.save.restore();
|
|
717
|
+
}
|
|
718
|
+
if (this.popupObj) {
|
|
719
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
720
|
+
this.popupObj.hide();
|
|
721
|
+
}
|
|
722
|
+
if (this.parent.userAgentData.isSafari() && e.type === 'keydown') {
|
|
723
|
+
this.parent.notify(events.selectionRestore, {});
|
|
724
|
+
}
|
|
725
|
+
var originalEvent = e;
|
|
726
|
+
this.parent.formatter.process(this.parent, {
|
|
727
|
+
item: {
|
|
728
|
+
'command': 'EmojiPicker',
|
|
729
|
+
'subCommand': 'EmojiPicker',
|
|
730
|
+
value: targetEle.innerHTML
|
|
731
|
+
},
|
|
732
|
+
originalEvent: originalEvent
|
|
733
|
+
}, e, originalEvent);
|
|
734
|
+
};
|
|
735
|
+
EmojiPicker.prototype.onkeyPress = function (e) {
|
|
736
|
+
var originalEvent = e.args;
|
|
737
|
+
var selection = (this.parent.iframeSettings.enable) ?
|
|
738
|
+
this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
739
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
740
|
+
if (selection.rangeCount <= 0) {
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
var range = selection.getRangeAt(0);
|
|
744
|
+
var cursorPos = range.startOffset;
|
|
745
|
+
var prevChar = selection.focusNode.textContent.substring(cursorPos - 1, cursorPos);
|
|
746
|
+
var isPrevSpace = /\s/.test(prevChar);
|
|
747
|
+
var isPrevColon = selection.focusNode.textContent.substring(cursorPos - 1, cursorPos) === ':';
|
|
748
|
+
var colon = selection.focusNode.textContent.charAt(cursorPos - 1) === ':';
|
|
749
|
+
if (originalEvent.keyCode === 186 && originalEvent.shiftKey && (isPrevSpace || selection.focusOffset === 0)) {
|
|
750
|
+
var coordinates = this.getCoordinates();
|
|
751
|
+
this.parent.showEmojiPicker(coordinates.left, coordinates.top);
|
|
752
|
+
}
|
|
753
|
+
if (originalEvent.keyCode === 8 && colon && this.popupObj) {
|
|
754
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
755
|
+
this.popupObj.hide();
|
|
756
|
+
}
|
|
757
|
+
if (originalEvent.keyCode === 32 && isPrevColon && this.popupObj) {
|
|
758
|
+
ej2_base_1.removeClass([this.divElement], 'e-active');
|
|
759
|
+
var currentDocument = this.parent.iframeSettings.enable ? this.parent.contentModule.getPanel().ownerDocument :
|
|
760
|
+
this.parent.contentModule.getDocument();
|
|
761
|
+
if (this.parent.showTooltip && !ej2_base_1.isNullOrUndefined(currentDocument.querySelector('.e-tooltip-wrap'))) {
|
|
762
|
+
this.parent.notify(events.destroyTooltip, { args: event });
|
|
763
|
+
}
|
|
764
|
+
this.popupObj.hide();
|
|
765
|
+
}
|
|
766
|
+
if (this.popupObj && (originalEvent.keyCode === 37 || originalEvent.keyCode === 38 || originalEvent.keyCode === 39
|
|
767
|
+
|| originalEvent.keyCode === 27 || originalEvent.keyCode === 40)) {
|
|
768
|
+
this.onKeyDown(originalEvent);
|
|
769
|
+
originalEvent.preventDefault();
|
|
770
|
+
}
|
|
771
|
+
};
|
|
772
|
+
EmojiPicker.prototype.onkeyUp = function (e) {
|
|
773
|
+
var originalEvent = e.args;
|
|
774
|
+
var selection = (this.parent.iframeSettings.enable) ?
|
|
775
|
+
this.parent.contentModule.getPanel().contentWindow.getSelection() :
|
|
776
|
+
this.parent.contentModule.getDocument().getSelection();
|
|
777
|
+
if (selection.rangeCount <= 0) {
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
var range = selection.getRangeAt(0);
|
|
781
|
+
var cursorPos = range.startOffset;
|
|
782
|
+
var selectedValue;
|
|
783
|
+
var count = 0;
|
|
784
|
+
for (var i = cursorPos - 1; i >= (cursorPos - selection.focusNode.textContent.length); i--) {
|
|
785
|
+
var prevChar = selection.focusNode.textContent.substring(i - 1, i);
|
|
786
|
+
var isPrevSpace = /:$/.test(prevChar);
|
|
787
|
+
if (isPrevSpace && !ej2_base_1.isNullOrUndefined(this.popDiv) && count === 0) {
|
|
788
|
+
selectedValue = range.startContainer.textContent.substring(i - 1, cursorPos);
|
|
789
|
+
this.searchFilter(originalEvent, selectedValue, true);
|
|
790
|
+
count = 1;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
var colon = selection.focusNode.textContent.substring(cursorPos - 1, cursorPos);
|
|
794
|
+
if (colon === ':' && !ej2_base_1.isNullOrUndefined(this.popupObj)) {
|
|
795
|
+
selectedValue = colon;
|
|
796
|
+
this.searchFilter(originalEvent, selectedValue, true);
|
|
797
|
+
}
|
|
798
|
+
};
|
|
799
|
+
EmojiPicker.prototype.getCoordinates = function () {
|
|
800
|
+
var coordinates;
|
|
801
|
+
var selection = (this.parent.iframeSettings.enable) ?
|
|
802
|
+
this.parent.contentModule.getPanel().contentWindow.getSelection() : window.getSelection();
|
|
803
|
+
var range = selection.getRangeAt(0);
|
|
804
|
+
var firstChild;
|
|
805
|
+
if (range.startContainer.nodeName === 'P' || range.startContainer.nodeName === 'DIV') {
|
|
806
|
+
if (range.startContainer.childNodes[0].nodeName !== '#text') {
|
|
807
|
+
firstChild = range.startContainer.childNodes[0];
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
var rect = ej2_base_1.isNullOrUndefined(firstChild) ? range.getBoundingClientRect() : firstChild.getBoundingClientRect();
|
|
811
|
+
var rteContent = this.parent.element.querySelector('.e-rte-content');
|
|
812
|
+
var rteEle = this.parent.element;
|
|
813
|
+
var toolbarHeight = rteEle.offsetHeight - rteContent.offsetHeight;
|
|
814
|
+
var cursorTop = rect.top - this.parent.inputElement.getBoundingClientRect().top;
|
|
815
|
+
var cursorLeft = rect.left - this.parent.inputElement.getBoundingClientRect().left;
|
|
816
|
+
var screenHeight = window.innerHeight;
|
|
817
|
+
var popupHeight = 330;
|
|
818
|
+
var popupTop = cursorTop;
|
|
819
|
+
var popupLeft = cursorLeft + rect.width;
|
|
820
|
+
if (rteEle.getBoundingClientRect().top < 0 && !this.parent.inlineMode.enable) {
|
|
821
|
+
popupTop = popupTop + rteContent.getBoundingClientRect().top - toolbarHeight;
|
|
822
|
+
}
|
|
823
|
+
if (rect.top < popupHeight) {
|
|
824
|
+
popupTop = popupTop;
|
|
825
|
+
}
|
|
826
|
+
else if (rect.top + popupHeight > screenHeight) {
|
|
827
|
+
popupTop -= popupHeight + 20;
|
|
828
|
+
}
|
|
829
|
+
if (this.parent.inputElement) {
|
|
830
|
+
coordinates = {
|
|
831
|
+
top: popupTop + 60,
|
|
832
|
+
left: popupLeft + 8
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
return coordinates;
|
|
836
|
+
};
|
|
837
|
+
EmojiPicker.prototype.removeEventListener = function () {
|
|
838
|
+
this.parent.off(events.emojiPicker, this.toolbarClick);
|
|
839
|
+
this.parent.off(events.docClick, this.docClick);
|
|
840
|
+
this.parent.off(events.iframeMouseDown, this.onIframeMouseDown);
|
|
841
|
+
this.parent.off(events.keyDown, this.onkeyPress);
|
|
842
|
+
this.parent.off(events.keyUp, this.onkeyUp);
|
|
843
|
+
this.parent.off(events.contentscroll, this.contentscroll);
|
|
844
|
+
this.parent.off(events.scroll, this.contentscroll);
|
|
845
|
+
this.parent.off(events.destroy, this.destroy);
|
|
846
|
+
};
|
|
847
|
+
EmojiPicker.prototype.getModuleName = function () {
|
|
848
|
+
return 'emojiPicker';
|
|
849
|
+
};
|
|
850
|
+
return EmojiPicker;
|
|
851
|
+
}());
|
|
852
|
+
exports.EmojiPicker = EmojiPicker;
|
|
853
|
+
});
|