@syncfusion/ej2-richtexteditor 29.2.4-760237 → 29.2.4-771571

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.
Files changed (401) hide show
  1. package/.eslintrc.json +260 -262
  2. package/dist/ej2-richtexteditor.umd.min.js +1 -1
  3. package/dist/ej2-richtexteditor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-richtexteditor.es2015.js +22 -2
  5. package/dist/es6/ej2-richtexteditor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-richtexteditor.es5.js +23 -2
  7. package/dist/es6/ej2-richtexteditor.es5.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/common/util.js +21 -1
  10. package/src/editor-manager/plugin/inserthtml.js +2 -1
  11. package/styles/bds-lite.css +278 -29
  12. package/styles/bds.css +289 -30
  13. package/styles/bootstrap-dark-lite.css +276 -27
  14. package/styles/bootstrap-dark.css +288 -29
  15. package/styles/bootstrap-lite.css +278 -29
  16. package/styles/bootstrap.css +290 -31
  17. package/styles/bootstrap4-lite.css +276 -27
  18. package/styles/bootstrap4.css +287 -28
  19. package/styles/bootstrap5-dark-lite.css +278 -29
  20. package/styles/bootstrap5-dark.css +289 -30
  21. package/styles/bootstrap5-lite.css +278 -29
  22. package/styles/bootstrap5.3-lite.css +276 -27
  23. package/styles/bootstrap5.3.css +288 -29
  24. package/styles/bootstrap5.css +289 -30
  25. package/styles/fabric-dark-lite.css +276 -27
  26. package/styles/fabric-dark.css +287 -28
  27. package/styles/fabric-lite.css +276 -27
  28. package/styles/fabric.css +287 -28
  29. package/styles/fluent-dark-lite.css +278 -29
  30. package/styles/fluent-dark.css +289 -31
  31. package/styles/fluent-lite.css +278 -29
  32. package/styles/fluent.css +289 -31
  33. package/styles/fluent2-lite.css +280 -31
  34. package/styles/fluent2.css +292 -33
  35. package/styles/highcontrast-light-lite.css +276 -27
  36. package/styles/highcontrast-light.css +287 -28
  37. package/styles/highcontrast-lite.css +276 -27
  38. package/styles/highcontrast.css +287 -28
  39. package/styles/material-dark-lite.css +276 -27
  40. package/styles/material-dark.css +287 -28
  41. package/styles/material-lite.css +276 -27
  42. package/styles/material.css +287 -28
  43. package/styles/material3-dark-lite.css +278 -27
  44. package/styles/material3-dark.css +289 -28
  45. package/styles/material3-lite.css +278 -27
  46. package/styles/material3.css +289 -28
  47. package/styles/rich-text-editor/_bds-definition.scss +9 -1
  48. package/styles/rich-text-editor/_bigger.scss +16 -3
  49. package/styles/rich-text-editor/_bootstrap-dark-definition.scss +9 -1
  50. package/styles/rich-text-editor/_bootstrap-definition.scss +10 -2
  51. package/styles/rich-text-editor/_bootstrap4-definition.scss +9 -1
  52. package/styles/rich-text-editor/_bootstrap5-definition.scss +10 -2
  53. package/styles/rich-text-editor/_bootstrap5.3-definition.scss +9 -1
  54. package/styles/rich-text-editor/_fabric-dark-definition.scss +9 -1
  55. package/styles/rich-text-editor/_fabric-definition.scss +9 -1
  56. package/styles/rich-text-editor/_fluent-definition.scss +9 -2
  57. package/styles/rich-text-editor/_fluent2-definition.scss +10 -2
  58. package/styles/rich-text-editor/_fusionnew-definition.scss +8 -1
  59. package/styles/rich-text-editor/_highcontrast-definition.scss +9 -1
  60. package/styles/rich-text-editor/_highcontrast-light-definition.scss +9 -1
  61. package/styles/rich-text-editor/_layout.scss +208 -25
  62. package/styles/rich-text-editor/_material-dark-definition.scss +9 -1
  63. package/styles/rich-text-editor/_material-definition.scss +9 -1
  64. package/styles/rich-text-editor/_material3-definition.scss +9 -1
  65. package/styles/rich-text-editor/_tailwind-definition.scss +9 -1
  66. package/styles/rich-text-editor/_tailwind3-definition.scss +11 -3
  67. package/styles/rich-text-editor/_theme.scss +3 -0
  68. package/styles/rich-text-editor/bds.css +289 -30
  69. package/styles/rich-text-editor/bootstrap-dark.css +288 -29
  70. package/styles/rich-text-editor/bootstrap.css +290 -31
  71. package/styles/rich-text-editor/bootstrap4.css +287 -28
  72. package/styles/rich-text-editor/bootstrap5-dark.css +289 -30
  73. package/styles/rich-text-editor/bootstrap5.3.css +288 -29
  74. package/styles/rich-text-editor/bootstrap5.css +289 -30
  75. package/styles/rich-text-editor/fabric-dark.css +287 -28
  76. package/styles/rich-text-editor/fabric.css +287 -28
  77. package/styles/rich-text-editor/fluent-dark.css +289 -31
  78. package/styles/rich-text-editor/fluent.css +289 -31
  79. package/styles/rich-text-editor/fluent2.css +292 -33
  80. package/styles/rich-text-editor/highcontrast-light.css +287 -28
  81. package/styles/rich-text-editor/highcontrast.css +287 -28
  82. package/styles/rich-text-editor/icons/_bds.scss +4 -1
  83. package/styles/rich-text-editor/icons/_bootstrap-dark.scss +4 -1
  84. package/styles/rich-text-editor/icons/_bootstrap.scss +4 -2
  85. package/styles/rich-text-editor/icons/_bootstrap4.scss +4 -2
  86. package/styles/rich-text-editor/icons/_bootstrap5.3.scss +4 -2
  87. package/styles/rich-text-editor/icons/_bootstrap5.scss +4 -2
  88. package/styles/rich-text-editor/icons/_fabric-dark.scss +4 -2
  89. package/styles/rich-text-editor/icons/_fabric.scss +4 -2
  90. package/styles/rich-text-editor/icons/_fluent.scss +5 -1
  91. package/styles/rich-text-editor/icons/_fluent2.scss +4 -2
  92. package/styles/rich-text-editor/icons/_fusionnew.scss +4 -2
  93. package/styles/rich-text-editor/icons/_highcontrast-light.scss +5 -1
  94. package/styles/rich-text-editor/icons/_highcontrast.scss +5 -1
  95. package/styles/rich-text-editor/icons/_material-dark.scss +5 -1
  96. package/styles/rich-text-editor/icons/_material.scss +5 -1
  97. package/styles/rich-text-editor/icons/_material3.scss +5 -1
  98. package/styles/rich-text-editor/icons/_tailwind.scss +5 -1
  99. package/styles/rich-text-editor/icons/_tailwind3.scss +5 -1
  100. package/styles/rich-text-editor/material-dark.css +287 -28
  101. package/styles/rich-text-editor/material.css +287 -28
  102. package/styles/rich-text-editor/material3-dark.css +289 -28
  103. package/styles/rich-text-editor/material3.css +289 -28
  104. package/styles/rich-text-editor/tailwind-dark.css +289 -30
  105. package/styles/rich-text-editor/tailwind.css +289 -30
  106. package/styles/rich-text-editor/tailwind3.css +291 -32
  107. package/styles/tailwind-dark-lite.css +278 -29
  108. package/styles/tailwind-dark.css +289 -30
  109. package/styles/tailwind-lite.css +278 -29
  110. package/styles/tailwind.css +289 -30
  111. package/styles/tailwind3-lite.css +280 -31
  112. package/styles/tailwind3.css +291 -32
  113. package/aceconfig.js +0 -17
  114. package/blazorGlobalSrc/common/config.d.ts +0 -63
  115. package/blazorGlobalSrc/common/config.js +0 -123
  116. package/blazorGlobalSrc/common/constant.d.ts +0 -117
  117. package/blazorGlobalSrc/common/constant.js +0 -23
  118. package/blazorGlobalSrc/common/editor-styles.d.ts +0 -1
  119. package/blazorGlobalSrc/common/editor-styles.js +0 -5
  120. package/blazorGlobalSrc/common/index.d.ts +0 -7
  121. package/blazorGlobalSrc/common/index.js +0 -9
  122. package/blazorGlobalSrc/common/interface.d.ts +0 -119
  123. package/blazorGlobalSrc/common/interface.js +0 -4
  124. package/blazorGlobalSrc/common/types.d.ts +0 -25
  125. package/blazorGlobalSrc/common/types.js +0 -4
  126. package/blazorGlobalSrc/common/user-agent.d.ts +0 -41
  127. package/blazorGlobalSrc/common/user-agent.js +0 -71
  128. package/blazorGlobalSrc/common/util.d.ts +0 -70
  129. package/blazorGlobalSrc/common/util.js +0 -222
  130. package/blazorGlobalSrc/components.d.ts +0 -8
  131. package/blazorGlobalSrc/components.js +0 -12
  132. package/blazorGlobalSrc/editor-manager/base/classes.d.ts +0 -31
  133. package/blazorGlobalSrc/editor-manager/base/classes.js +0 -28
  134. package/blazorGlobalSrc/editor-manager/base/constant.d.ts +0 -97
  135. package/blazorGlobalSrc/editor-manager/base/constant.js +0 -41
  136. package/blazorGlobalSrc/editor-manager/base/editor-manager.d.ts +0 -95
  137. package/blazorGlobalSrc/editor-manager/base/editor-manager.js +0 -339
  138. package/blazorGlobalSrc/editor-manager/base/enum.d.ts +0 -17
  139. package/blazorGlobalSrc/editor-manager/base/enum.js +0 -4
  140. package/blazorGlobalSrc/editor-manager/base/interface.d.ts +0 -263
  141. package/blazorGlobalSrc/editor-manager/base/interface.js +0 -4
  142. package/blazorGlobalSrc/editor-manager/base/types.d.ts +0 -7
  143. package/blazorGlobalSrc/editor-manager/base/types.js +0 -4
  144. package/blazorGlobalSrc/editor-manager/base.d.ts +0 -8
  145. package/blazorGlobalSrc/editor-manager/base.js +0 -10
  146. package/blazorGlobalSrc/editor-manager/index.d.ts +0 -5
  147. package/blazorGlobalSrc/editor-manager/index.js +0 -9
  148. package/blazorGlobalSrc/editor-manager/plugin/alignments.d.ts +0 -26
  149. package/blazorGlobalSrc/editor-manager/plugin/alignments.js +0 -105
  150. package/blazorGlobalSrc/editor-manager/plugin/audio.d.ts +0 -34
  151. package/blazorGlobalSrc/editor-manager/plugin/audio.js +0 -145
  152. package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.d.ts +0 -24
  153. package/blazorGlobalSrc/editor-manager/plugin/clearformat-exec.js +0 -47
  154. package/blazorGlobalSrc/editor-manager/plugin/clearformat.d.ts +0 -29
  155. package/blazorGlobalSrc/editor-manager/plugin/clearformat.js +0 -249
  156. package/blazorGlobalSrc/editor-manager/plugin/dom-node.d.ts +0 -351
  157. package/blazorGlobalSrc/editor-manager/plugin/dom-node.js +0 -737
  158. package/blazorGlobalSrc/editor-manager/plugin/dom-tree.d.ts +0 -84
  159. package/blazorGlobalSrc/editor-manager/plugin/dom-tree.js +0 -164
  160. package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.d.ts +0 -10
  161. package/blazorGlobalSrc/editor-manager/plugin/emoji-picker-action.js +0 -86
  162. package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.d.ts +0 -47
  163. package/blazorGlobalSrc/editor-manager/plugin/format-painter-actions.js +0 -622
  164. package/blazorGlobalSrc/editor-manager/plugin/formats.d.ts +0 -43
  165. package/blazorGlobalSrc/editor-manager/plugin/formats.js +0 -597
  166. package/blazorGlobalSrc/editor-manager/plugin/image.d.ts +0 -48
  167. package/blazorGlobalSrc/editor-manager/plugin/image.js +0 -399
  168. package/blazorGlobalSrc/editor-manager/plugin/indents.d.ts +0 -24
  169. package/blazorGlobalSrc/editor-manager/plugin/indents.js +0 -106
  170. package/blazorGlobalSrc/editor-manager/plugin/insert-methods.d.ts +0 -48
  171. package/blazorGlobalSrc/editor-manager/plugin/insert-methods.js +0 -37
  172. package/blazorGlobalSrc/editor-manager/plugin/insert-text.d.ts +0 -22
  173. package/blazorGlobalSrc/editor-manager/plugin/insert-text.js +0 -36
  174. package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.d.ts +0 -22
  175. package/blazorGlobalSrc/editor-manager/plugin/inserthtml-exec.js +0 -49
  176. package/blazorGlobalSrc/editor-manager/plugin/inserthtml.d.ts +0 -51
  177. package/blazorGlobalSrc/editor-manager/plugin/inserthtml.js +0 -985
  178. package/blazorGlobalSrc/editor-manager/plugin/isformatted.d.ts +0 -89
  179. package/blazorGlobalSrc/editor-manager/plugin/isformatted.js +0 -199
  180. package/blazorGlobalSrc/editor-manager/plugin/link.d.ts +0 -41
  181. package/blazorGlobalSrc/editor-manager/plugin/link.js +0 -550
  182. package/blazorGlobalSrc/editor-manager/plugin/lists.d.ts +0 -74
  183. package/blazorGlobalSrc/editor-manager/plugin/lists.js +0 -1503
  184. package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.d.ts +0 -61
  185. package/blazorGlobalSrc/editor-manager/plugin/ms-word-clean-up.js +0 -1136
  186. package/blazorGlobalSrc/editor-manager/plugin/nodecutter.d.ts +0 -64
  187. package/blazorGlobalSrc/editor-manager/plugin/nodecutter.js +0 -167
  188. package/blazorGlobalSrc/editor-manager/plugin/selection-commands.d.ts +0 -41
  189. package/blazorGlobalSrc/editor-manager/plugin/selection-commands.js +0 -1069
  190. package/blazorGlobalSrc/editor-manager/plugin/selection-exec.d.ts +0 -24
  191. package/blazorGlobalSrc/editor-manager/plugin/selection-exec.js +0 -49
  192. package/blazorGlobalSrc/editor-manager/plugin/table-selection.d.ts +0 -26
  193. package/blazorGlobalSrc/editor-manager/plugin/table-selection.js +0 -210
  194. package/blazorGlobalSrc/editor-manager/plugin/table.d.ts +0 -56
  195. package/blazorGlobalSrc/editor-manager/plugin/table.js +0 -1100
  196. package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.d.ts +0 -39
  197. package/blazorGlobalSrc/editor-manager/plugin/toolbar-status.js +0 -384
  198. package/blazorGlobalSrc/editor-manager/plugin/undo.d.ts +0 -85
  199. package/blazorGlobalSrc/editor-manager/plugin/undo.js +0 -216
  200. package/blazorGlobalSrc/editor-manager/plugin/video.d.ts +0 -38
  201. package/blazorGlobalSrc/editor-manager/plugin/video.js +0 -311
  202. package/blazorGlobalSrc/editor-manager/plugin.d.ts +0 -27
  203. package/blazorGlobalSrc/editor-manager/plugin.js +0 -31
  204. package/blazorGlobalSrc/global.d.ts +0 -1
  205. package/blazorGlobalSrc/global.js +0 -3
  206. package/blazorGlobalSrc/index.d.ts +0 -8
  207. package/blazorGlobalSrc/index.js +0 -12
  208. package/blazorGlobalSrc/markdown-parser/base/constant.d.ts +0 -39
  209. package/blazorGlobalSrc/markdown-parser/base/constant.js +0 -10
  210. package/blazorGlobalSrc/markdown-parser/base/interface.d.ts +0 -169
  211. package/blazorGlobalSrc/markdown-parser/base/interface.js +0 -4
  212. package/blazorGlobalSrc/markdown-parser/base/markdown-parser.d.ts +0 -69
  213. package/blazorGlobalSrc/markdown-parser/base/markdown-parser.js +0 -87
  214. package/blazorGlobalSrc/markdown-parser/base/types.d.ts +0 -7
  215. package/blazorGlobalSrc/markdown-parser/base/types.js +0 -4
  216. package/blazorGlobalSrc/markdown-parser/base.d.ts +0 -7
  217. package/blazorGlobalSrc/markdown-parser/base.js +0 -9
  218. package/blazorGlobalSrc/markdown-parser/index.d.ts +0 -5
  219. package/blazorGlobalSrc/markdown-parser/index.js +0 -9
  220. package/blazorGlobalSrc/markdown-parser/plugin/clearformat.d.ts +0 -28
  221. package/blazorGlobalSrc/markdown-parser/plugin/clearformat.js +0 -110
  222. package/blazorGlobalSrc/markdown-parser/plugin/formats.d.ts +0 -32
  223. package/blazorGlobalSrc/markdown-parser/plugin/formats.js +0 -225
  224. package/blazorGlobalSrc/markdown-parser/plugin/insert-text.d.ts +0 -24
  225. package/blazorGlobalSrc/markdown-parser/plugin/insert-text.js +0 -49
  226. package/blazorGlobalSrc/markdown-parser/plugin/link.d.ts +0 -24
  227. package/blazorGlobalSrc/markdown-parser/plugin/link.js +0 -50
  228. package/blazorGlobalSrc/markdown-parser/plugin/lists.d.ts +0 -39
  229. package/blazorGlobalSrc/markdown-parser/plugin/lists.js +0 -462
  230. package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.d.ts +0 -140
  231. package/blazorGlobalSrc/markdown-parser/plugin/markdown-selection.js +0 -104
  232. package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.d.ts +0 -31
  233. package/blazorGlobalSrc/markdown-parser/plugin/md-selection-formats.js +0 -335
  234. package/blazorGlobalSrc/markdown-parser/plugin/table.d.ts +0 -52
  235. package/blazorGlobalSrc/markdown-parser/plugin/table.js +0 -216
  236. package/blazorGlobalSrc/markdown-parser/plugin/undo.d.ts +0 -83
  237. package/blazorGlobalSrc/markdown-parser/plugin/undo.js +0 -147
  238. package/blazorGlobalSrc/markdown-parser/plugin.d.ts +0 -11
  239. package/blazorGlobalSrc/markdown-parser/plugin.js +0 -15
  240. package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.d.ts +0 -114
  241. package/blazorGlobalSrc/rich-text-editor/actions/base-quick-toolbar.js +0 -465
  242. package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.d.ts +0 -58
  243. package/blazorGlobalSrc/rich-text-editor/actions/base-toolbar.js +0 -216
  244. package/blazorGlobalSrc/rich-text-editor/actions/color-picker.d.ts +0 -52
  245. package/blazorGlobalSrc/rich-text-editor/actions/color-picker.js +0 -241
  246. package/blazorGlobalSrc/rich-text-editor/actions/count.d.ts +0 -55
  247. package/blazorGlobalSrc/rich-text-editor/actions/count.js +0 -117
  248. package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.d.ts +0 -72
  249. package/blazorGlobalSrc/rich-text-editor/actions/dropdown-buttons.js +0 -552
  250. package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.d.ts +0 -51
  251. package/blazorGlobalSrc/rich-text-editor/actions/emoji-picker.js +0 -853
  252. package/blazorGlobalSrc/rich-text-editor/actions/enter-key.d.ts +0 -28
  253. package/blazorGlobalSrc/rich-text-editor/actions/enter-key.js +0 -821
  254. package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.d.ts +0 -11
  255. package/blazorGlobalSrc/rich-text-editor/actions/execute-command-callback.js +0 -28
  256. package/blazorGlobalSrc/rich-text-editor/actions/file-manager.d.ts +0 -45
  257. package/blazorGlobalSrc/rich-text-editor/actions/file-manager.js +0 -249
  258. package/blazorGlobalSrc/rich-text-editor/actions/format-painter.d.ts +0 -25
  259. package/blazorGlobalSrc/rich-text-editor/actions/format-painter.js +0 -156
  260. package/blazorGlobalSrc/rich-text-editor/actions/full-screen.d.ts +0 -40
  261. package/blazorGlobalSrc/rich-text-editor/actions/full-screen.js +0 -148
  262. package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.d.ts +0 -15
  263. package/blazorGlobalSrc/rich-text-editor/actions/html-attributes.js +0 -50
  264. package/blazorGlobalSrc/rich-text-editor/actions/html-editor.d.ts +0 -120
  265. package/blazorGlobalSrc/rich-text-editor/actions/html-editor.js +0 -1244
  266. package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.d.ts +0 -14
  267. package/blazorGlobalSrc/rich-text-editor/actions/html-toolbar-status.js +0 -47
  268. package/blazorGlobalSrc/rich-text-editor/actions/import-export.d.ts +0 -21
  269. package/blazorGlobalSrc/rich-text-editor/actions/import-export.js +0 -117
  270. package/blazorGlobalSrc/rich-text-editor/actions/keyboard-model.d.ts +0 -30
  271. package/blazorGlobalSrc/rich-text-editor/actions/keyboard.d.ts +0 -110
  272. package/blazorGlobalSrc/rich-text-editor/actions/keyboard.js +0 -163
  273. package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.d.ts +0 -66
  274. package/blazorGlobalSrc/rich-text-editor/actions/markdown-editor.js +0 -142
  275. package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.d.ts +0 -23
  276. package/blazorGlobalSrc/rich-text-editor/actions/markdown-toolbar-status.js +0 -124
  277. package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.d.ts +0 -86
  278. package/blazorGlobalSrc/rich-text-editor/actions/paste-clean-up.js +0 -1071
  279. package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.d.ts +0 -151
  280. package/blazorGlobalSrc/rich-text-editor/actions/quick-toolbar.js +0 -548
  281. package/blazorGlobalSrc/rich-text-editor/actions/resize.d.ts +0 -37
  282. package/blazorGlobalSrc/rich-text-editor/actions/resize.js +0 -188
  283. package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.d.ts +0 -11
  284. package/blazorGlobalSrc/rich-text-editor/actions/sanitize-helper.js +0 -168
  285. package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.d.ts +0 -18
  286. package/blazorGlobalSrc/rich-text-editor/actions/toolbar-action.js +0 -76
  287. package/blazorGlobalSrc/rich-text-editor/actions/toolbar.d.ts +0 -185
  288. package/blazorGlobalSrc/rich-text-editor/actions/toolbar.js +0 -512
  289. package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.d.ts +0 -25
  290. package/blazorGlobalSrc/rich-text-editor/actions/xhtml-validation.js +0 -166
  291. package/blazorGlobalSrc/rich-text-editor/actions.d.ts +0 -26
  292. package/blazorGlobalSrc/rich-text-editor/actions.js +0 -30
  293. package/blazorGlobalSrc/rich-text-editor/audio.d.ts +0 -4
  294. package/blazorGlobalSrc/rich-text-editor/audio.js +0 -8
  295. package/blazorGlobalSrc/rich-text-editor/base/classes.d.ts +0 -628
  296. package/blazorGlobalSrc/rich-text-editor/base/classes.js +0 -129
  297. package/blazorGlobalSrc/rich-text-editor/base/constant.d.ts +0 -808
  298. package/blazorGlobalSrc/rich-text-editor/base/constant.js +0 -334
  299. package/blazorGlobalSrc/rich-text-editor/base/enum.d.ts +0 -81
  300. package/blazorGlobalSrc/rich-text-editor/base/enum.js +0 -37
  301. package/blazorGlobalSrc/rich-text-editor/base/interface.d.ts +0 -1577
  302. package/blazorGlobalSrc/rich-text-editor/base/interface.js +0 -194
  303. package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor-model.d.ts +0 -1032
  304. package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.d.ts +0 -1699
  305. package/blazorGlobalSrc/rich-text-editor/base/rich-text-editor.js +0 -2645
  306. package/blazorGlobalSrc/rich-text-editor/base/util.d.ts +0 -212
  307. package/blazorGlobalSrc/rich-text-editor/base/util.js +0 -610
  308. package/blazorGlobalSrc/rich-text-editor/base.d.ts +0 -10
  309. package/blazorGlobalSrc/rich-text-editor/base.js +0 -13
  310. package/blazorGlobalSrc/rich-text-editor/formatter/formatter.d.ts +0 -87
  311. package/blazorGlobalSrc/rich-text-editor/formatter/formatter.js +0 -223
  312. package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.d.ts +0 -34
  313. package/blazorGlobalSrc/rich-text-editor/formatter/html-formatter.js +0 -44
  314. package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.d.ts +0 -39
  315. package/blazorGlobalSrc/rich-text-editor/formatter/markdown-formatter.js +0 -48
  316. package/blazorGlobalSrc/rich-text-editor/formatter.d.ts +0 -6
  317. package/blazorGlobalSrc/rich-text-editor/formatter.js +0 -10
  318. package/blazorGlobalSrc/rich-text-editor/html-editor.d.ts +0 -4
  319. package/blazorGlobalSrc/rich-text-editor/html-editor.js +0 -8
  320. package/blazorGlobalSrc/rich-text-editor/image.d.ts +0 -4
  321. package/blazorGlobalSrc/rich-text-editor/image.js +0 -8
  322. package/blazorGlobalSrc/rich-text-editor/index.d.ts +0 -9
  323. package/blazorGlobalSrc/rich-text-editor/index.js +0 -12
  324. package/blazorGlobalSrc/rich-text-editor/link.d.ts +0 -4
  325. package/blazorGlobalSrc/rich-text-editor/link.js +0 -8
  326. package/blazorGlobalSrc/rich-text-editor/markdown-editor.d.ts +0 -4
  327. package/blazorGlobalSrc/rich-text-editor/markdown-editor.js +0 -8
  328. package/blazorGlobalSrc/rich-text-editor/models/default-locale.d.ts +0 -25
  329. package/blazorGlobalSrc/rich-text-editor/models/default-locale.js +0 -391
  330. package/blazorGlobalSrc/rich-text-editor/models/iframe-settings-model.d.ts +0 -68
  331. package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.d.ts +0 -61
  332. package/blazorGlobalSrc/rich-text-editor/models/iframe-settings.js +0 -60
  333. package/blazorGlobalSrc/rich-text-editor/models/inline-mode-model.d.ts +0 -24
  334. package/blazorGlobalSrc/rich-text-editor/models/inline-mode.d.ts +0 -20
  335. package/blazorGlobalSrc/rich-text-editor/models/inline-mode.js +0 -37
  336. package/blazorGlobalSrc/rich-text-editor/models/items.d.ts +0 -36
  337. package/blazorGlobalSrc/rich-text-editor/models/items.js +0 -1011
  338. package/blazorGlobalSrc/rich-text-editor/models/models.d.ts +0 -7
  339. package/blazorGlobalSrc/rich-text-editor/models/models.js +0 -4
  340. package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings-model.d.ts +0 -40
  341. package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.d.ts +0 -50
  342. package/blazorGlobalSrc/rich-text-editor/models/slash-menu-settings.js +0 -143
  343. package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings-model.d.ts +0 -1130
  344. package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.d.ts +0 -992
  345. package/blazorGlobalSrc/rich-text-editor/models/toolbar-settings.js +0 -510
  346. package/blazorGlobalSrc/rich-text-editor/models.d.ts +0 -4
  347. package/blazorGlobalSrc/rich-text-editor/models.js +0 -4
  348. package/blazorGlobalSrc/rich-text-editor/quick-toolbar.d.ts +0 -4
  349. package/blazorGlobalSrc/rich-text-editor/quick-toolbar.js +0 -8
  350. package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.d.ts +0 -82
  351. package/blazorGlobalSrc/rich-text-editor/renderer/audio-module.js +0 -886
  352. package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.d.ts +0 -65
  353. package/blazorGlobalSrc/rich-text-editor/renderer/content-renderer.js +0 -49
  354. package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.d.ts +0 -39
  355. package/blazorGlobalSrc/rich-text-editor/renderer/dialog-renderer.js +0 -111
  356. package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.d.ts +0 -33
  357. package/blazorGlobalSrc/rich-text-editor/renderer/iframe-content-renderer.js +0 -101
  358. package/blazorGlobalSrc/rich-text-editor/renderer/image-module.d.ts +0 -199
  359. package/blazorGlobalSrc/rich-text-editor/renderer/image-module.js +0 -2494
  360. package/blazorGlobalSrc/rich-text-editor/renderer/link-module.d.ts +0 -63
  361. package/blazorGlobalSrc/rich-text-editor/renderer/link-module.js +0 -596
  362. package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.d.ts +0 -65
  363. package/blazorGlobalSrc/rich-text-editor/renderer/markdown-renderer.js +0 -38
  364. package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.d.ts +0 -54
  365. package/blazorGlobalSrc/rich-text-editor/renderer/popup-renderer.js +0 -35
  366. package/blazorGlobalSrc/rich-text-editor/renderer/render.d.ts +0 -46
  367. package/blazorGlobalSrc/rich-text-editor/renderer/render.js +0 -70
  368. package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.d.ts +0 -20
  369. package/blazorGlobalSrc/rich-text-editor/renderer/slash-menu.js +0 -224
  370. package/blazorGlobalSrc/rich-text-editor/renderer/table-module.d.ts +0 -155
  371. package/blazorGlobalSrc/rich-text-editor/renderer/table-module.js +0 -2206
  372. package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.d.ts +0 -131
  373. package/blazorGlobalSrc/rich-text-editor/renderer/toolbar-renderer.js +0 -747
  374. package/blazorGlobalSrc/rich-text-editor/renderer/video-module.d.ts +0 -120
  375. package/blazorGlobalSrc/rich-text-editor/renderer/video-module.js +0 -1507
  376. package/blazorGlobalSrc/rich-text-editor/renderer/view-source.d.ts +0 -74
  377. package/blazorGlobalSrc/rich-text-editor/renderer/view-source.js +0 -225
  378. package/blazorGlobalSrc/rich-text-editor/renderer.d.ts +0 -17
  379. package/blazorGlobalSrc/rich-text-editor/renderer.js +0 -21
  380. package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.d.ts +0 -33
  381. package/blazorGlobalSrc/rich-text-editor/services/renderer-factory.js +0 -29
  382. package/blazorGlobalSrc/rich-text-editor/services/service-locator.d.ts +0 -29
  383. package/blazorGlobalSrc/rich-text-editor/services/service-locator.js +0 -25
  384. package/blazorGlobalSrc/rich-text-editor/services.d.ts +0 -5
  385. package/blazorGlobalSrc/rich-text-editor/services.js +0 -9
  386. package/blazorGlobalSrc/rich-text-editor/toolbar.d.ts +0 -4
  387. package/blazorGlobalSrc/rich-text-editor/toolbar.js +0 -8
  388. package/blazorGlobalSrc/rich-text-editor/video.d.ts +0 -4
  389. package/blazorGlobalSrc/rich-text-editor/video.js +0 -8
  390. package/blazorGlobalSrc/rich-text-editor.d.ts +0 -4
  391. package/blazorGlobalSrc/rich-text-editor.js +0 -8
  392. package/blazorGlobalSrc/selection/index.d.ts +0 -4
  393. package/blazorGlobalSrc/selection/index.js +0 -8
  394. package/blazorGlobalSrc/selection/selection.d.ts +0 -244
  395. package/blazorGlobalSrc/selection/selection.js +0 -309
  396. package/helpers/e2e/index.d.ts +0 -1
  397. package/helpers/e2e/index.js +0 -8
  398. package/helpers/e2e/rte-helper.d.ts +0 -79
  399. package/helpers/e2e/rte-helper.js +0 -81
  400. package/src/global.d.ts +0 -1
  401. package/tslint.json +0 -111
@@ -1,853 +0,0 @@
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
- });