argous 1.2.132 → 1.2.136

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 (554) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/api/index.js +18 -1
  3. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +21 -0
  4. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
  5. package/dist/components/Compartilhar/Compartilhar.js +1 -1
  6. package/lib/actions/index.ts +57 -0
  7. package/lib/api/WebSocket.js +148 -0
  8. package/lib/api/index.js +402 -0
  9. package/lib/api/ws.js +27 -0
  10. package/lib/components/Alert/Alert.d.ts +8 -0
  11. package/lib/components/Alert/Alert.js +49 -0
  12. package/lib/components/Alert/index.d.ts +2 -0
  13. package/lib/components/Alert/index.js +1 -0
  14. package/lib/components/ArgousAction/ArgousAction.d.ts +8 -0
  15. package/lib/components/ArgousAction/ArgousAction.js +78 -0
  16. package/lib/components/ArgousAction/index.d.ts +2 -0
  17. package/lib/components/ArgousAction/index.js +1 -0
  18. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
  19. package/lib/components/ArgousAvatar/ArgousAvatar.js +79 -0
  20. package/lib/components/ArgousAvatar/index.d.ts +2 -0
  21. package/lib/components/ArgousAvatar/index.js +1 -0
  22. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
  23. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +182 -0
  24. package/lib/components/ArgousComplexPagination/index.d.ts +2 -0
  25. package/lib/components/ArgousComplexPagination/index.js +1 -0
  26. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
  27. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +360 -0
  28. package/lib/components/ArgousComplexTable/index.d.ts +2 -0
  29. package/lib/components/ArgousComplexTable/index.js +1 -0
  30. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
  31. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +162 -0
  32. package/lib/components/ArgousComplexTableBody/index.d.ts +2 -0
  33. package/lib/components/ArgousComplexTableBody/index.js +1 -0
  34. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
  35. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +98 -0
  36. package/lib/components/ArgousComplexTableHead/index.d.ts +2 -0
  37. package/lib/components/ArgousComplexTableHead/index.js +1 -0
  38. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
  39. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +66 -0
  40. package/lib/components/ArgousComplexTableToolbar/index.d.ts +2 -0
  41. package/lib/components/ArgousComplexTableToolbar/index.js +1 -0
  42. package/lib/components/ArgousInput/ArgousInput.d.ts +8 -0
  43. package/lib/components/ArgousInput/ArgousInput.js +616 -0
  44. package/lib/components/ArgousInput/index.d.ts +2 -0
  45. package/lib/components/ArgousInput/index.js +1 -0
  46. package/lib/components/ArgousPagination/ArgousPagination.d.ts +8 -0
  47. package/lib/components/ArgousPagination/ArgousPagination.js +43 -0
  48. package/lib/components/ArgousPagination/index.d.ts +2 -0
  49. package/lib/components/ArgousPagination/index.js +1 -0
  50. package/lib/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
  51. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +167 -0
  52. package/lib/components/ArgousProgressBar/index.d.ts +2 -0
  53. package/lib/components/ArgousProgressBar/index.js +1 -0
  54. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
  55. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +241 -0
  56. package/lib/components/ArgousSimpleTable/index.d.ts +2 -0
  57. package/lib/components/ArgousSimpleTable/index.js +1 -0
  58. package/lib/components/AutoComplete/AutoComplete.d.ts +8 -0
  59. package/lib/components/AutoComplete/AutoComplete.js +189 -0
  60. package/lib/components/AutoComplete/index.d.ts +2 -0
  61. package/lib/components/AutoComplete/index.js +1 -0
  62. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +298 -0
  63. package/lib/components/BarChart/BarChart.d.ts +8 -0
  64. package/lib/components/BarChart/BarChart.js +92 -0
  65. package/lib/components/BarChart/index.d.ts +2 -0
  66. package/lib/components/BarChart/index.js +1 -0
  67. package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
  68. package/lib/components/BarraFerramentas/BarraFerramentas.js +277 -0
  69. package/lib/components/BarraFerramentas/index.d.ts +2 -0
  70. package/lib/components/BarraFerramentas/index.js +1 -0
  71. package/lib/components/Button/Button.d.ts +8 -0
  72. package/lib/components/Button/Button.js +135 -0
  73. package/lib/components/Button/index.d.ts +2 -0
  74. package/lib/components/Button/index.js +1 -0
  75. package/lib/components/Cabecalho/Cabecalho.d.ts +8 -0
  76. package/lib/components/Cabecalho/Cabecalho.js +245 -0
  77. package/lib/components/Cabecalho/index.d.ts +2 -0
  78. package/lib/components/Cabecalho/index.js +1 -0
  79. package/lib/components/Calendar/Calendar.d.ts +8 -0
  80. package/lib/components/Calendar/Calendar.js +156 -0
  81. package/lib/components/Calendar/index.d.ts +2 -0
  82. package/lib/components/Calendar/index.js +1 -0
  83. package/lib/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
  84. package/lib/components/CartaoUsuario/CartaoUsuario.js +108 -0
  85. package/lib/components/CartaoUsuario/index.d.ts +2 -0
  86. package/lib/components/CartaoUsuario/index.js +1 -0
  87. package/lib/components/Collapse/Collapse.d.ts +60 -0
  88. package/lib/components/Collapse/Collapse.js +317 -0
  89. package/lib/components/Collapse/index.d.ts +3 -0
  90. package/lib/components/Collapse/index.js +1 -0
  91. package/lib/components/Compartilhar/Compartilhar.d.ts +7 -0
  92. package/lib/components/Compartilhar/Compartilhar.js +314 -0
  93. package/lib/components/Compartilhar/index.d.ts +2 -0
  94. package/lib/components/Compartilhar/index.js +1 -0
  95. package/lib/components/ConfirmModal/BasicModal.tsx +63 -0
  96. package/lib/components/ConfirmModal/ModalProvider.tsx +81 -0
  97. package/lib/components/ConfirmModal/WrapperModal.tsx +33 -0
  98. package/lib/components/ConfirmModal/index.d.ts +20 -0
  99. package/lib/components/ConfirmModal/index.js +8 -0
  100. package/lib/components/DropArea/DropArea.d.ts +21 -0
  101. package/lib/components/DropArea/DropArea.js +90 -0
  102. package/lib/components/DropArea/Html5FileSelector.js +164 -0
  103. package/lib/components/DropArea/index.d.ts +2 -0
  104. package/lib/components/DropArea/index.js +1 -0
  105. package/lib/components/Editor/Events.ts +83 -0
  106. package/lib/components/Editor/ScriptLoader.ts +96 -0
  107. package/lib/components/Editor/TinyMCE.ts +19 -0
  108. package/lib/components/Editor/Utils.ts +95 -0
  109. package/lib/components/Editor/components/Editor.tsx +375 -0
  110. package/lib/components/Editor/components/EditorPropTypes.ts +106 -0
  111. package/lib/components/Editor/index.tsx +11 -0
  112. package/lib/components/Editor/skins/content/dark/content.css +72 -0
  113. package/lib/components/Editor/skins/content/dark/content.min.css +8 -0
  114. package/lib/components/Editor/skins/content/dark/content.min.css.map +1 -0
  115. package/lib/components/Editor/skins/content/default/content.css +67 -0
  116. package/lib/components/Editor/skins/content/default/content.min.css +8 -0
  117. package/lib/components/Editor/skins/content/default/content.min.css.map +1 -0
  118. package/lib/components/Editor/skins/content/document/content.css +72 -0
  119. package/lib/components/Editor/skins/content/document/content.min.css +8 -0
  120. package/lib/components/Editor/skins/content/document/content.min.css.map +1 -0
  121. package/lib/components/Editor/skins/content/writer/content.css +68 -0
  122. package/lib/components/Editor/skins/content/writer/content.min.css +8 -0
  123. package/lib/components/Editor/skins/content/writer/content.min.css.map +1 -0
  124. package/lib/components/Editor/skins/ui/dark/content.css +714 -0
  125. package/lib/components/Editor/skins/ui/dark/content.inline.css +726 -0
  126. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +8 -0
  127. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +1 -0
  128. package/lib/components/Editor/skins/ui/dark/content.min.css +8 -0
  129. package/lib/components/Editor/skins/ui/dark/content.min.css.map +1 -0
  130. package/lib/components/Editor/skins/ui/dark/content.mobile.css +29 -0
  131. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +8 -0
  132. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +1 -0
  133. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  134. package/lib/components/Editor/skins/ui/dark/skin.css +3034 -0
  135. package/lib/components/Editor/skins/ui/dark/skin.min.css +8 -0
  136. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +1 -0
  137. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +673 -0
  138. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +8 -0
  139. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +1 -0
  140. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.css +37 -0
  141. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +8 -0
  142. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +1 -0
  143. package/lib/components/Editor/skins/ui/default/content.css +732 -0
  144. package/lib/components/Editor/skins/ui/default/content.inline.css +726 -0
  145. package/lib/components/Editor/skins/ui/default/content.inline.min.css +8 -0
  146. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +1 -0
  147. package/lib/components/Editor/skins/ui/default/content.min.css +8 -0
  148. package/lib/components/Editor/skins/ui/default/content.min.css.map +1 -0
  149. package/lib/components/Editor/skins/ui/default/content.mobile.css +29 -0
  150. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +8 -0
  151. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +1 -0
  152. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  153. package/lib/components/Editor/skins/ui/default/skin.css +3034 -0
  154. package/lib/components/Editor/skins/ui/default/skin.min.css +8 -0
  155. package/lib/components/Editor/skins/ui/default/skin.min.css.map +1 -0
  156. package/lib/components/Editor/skins/ui/default/skin.mobile.css +673 -0
  157. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +8 -0
  158. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +1 -0
  159. package/lib/components/Editor/skins/ui/default/skin.shadowdom.css +37 -0
  160. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +8 -0
  161. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +1 -0
  162. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  163. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +1641 -0
  164. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +8 -0
  165. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +1 -0
  166. package/lib/components/Editor/tinymce/README.md +63 -0
  167. package/lib/components/Editor/tinymce/icons/default/icons.js +172 -0
  168. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -0
  169. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +92 -0
  170. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  171. package/lib/components/Editor/tinymce/langs/pt_BR.js +419 -0
  172. package/lib/components/Editor/tinymce/license.txt +504 -0
  173. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +280 -0
  174. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +9 -0
  175. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +216 -0
  176. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +9 -0
  177. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +185 -0
  178. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +9 -0
  179. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +171 -0
  180. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +9 -0
  181. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +212 -0
  182. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +9 -0
  183. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +99 -0
  184. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +9 -0
  185. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +1706 -0
  186. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +9 -0
  187. package/lib/components/Editor/tinymce/plugins/code/plugin.js +92 -0
  188. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +9 -0
  189. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2332 -0
  190. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +9 -0
  191. package/{dist/components/Editor/tinymce/plugins/textcolor → lib/components/Editor/tinymce/plugins/colorpicker}/plugin.js +8 -5
  192. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  193. package/{dist/components/Editor/tinymce/plugins/colorpicker → lib/components/Editor/tinymce/plugins/contextmenu}/plugin.js +8 -5
  194. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  195. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +320 -0
  196. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +9 -0
  197. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
  198. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  199. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +9423 -0
  200. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  201. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +605 -0
  202. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +9 -0
  203. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +544 -0
  204. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +9 -0
  205. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +979 -0
  206. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  207. package/lib/components/Editor/tinymce/plugins/help/plugin.js +873 -0
  208. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +9 -0
  209. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +46 -0
  210. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +9 -0
  211. package/lib/components/Editor/tinymce/plugins/image/plugin.js +1661 -0
  212. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +9 -0
  213. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +1354 -0
  214. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +9 -0
  215. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +343 -0
  216. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +9 -0
  217. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +177 -0
  218. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  219. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +199 -0
  220. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  221. package/lib/components/Editor/tinymce/plugins/link/plugin.js +1287 -0
  222. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +9 -0
  223. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +2286 -0
  224. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +9 -0
  225. package/lib/components/Editor/tinymce/plugins/media/plugin.js +1382 -0
  226. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +9 -0
  227. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +101 -0
  228. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  229. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +117 -0
  230. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +9 -0
  231. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +105 -0
  232. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  233. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +1764 -0
  234. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +9 -0
  235. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +127 -0
  236. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +9 -0
  237. package/lib/components/Editor/tinymce/plugins/print/plugin.js +53 -0
  238. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +9 -0
  239. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +489 -0
  240. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +9 -0
  241. package/lib/components/Editor/tinymce/plugins/save/plugin.js +119 -0
  242. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +9 -0
  243. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +1163 -0
  244. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  245. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +731 -0
  246. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  247. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +129 -0
  248. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  249. package/lib/components/Editor/tinymce/plugins/table/plugin.js +10938 -0
  250. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +9 -0
  251. package/lib/components/Editor/tinymce/plugins/template/plugin.js +577 -0
  252. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +9 -0
  253. package/{dist/components/Editor/tinymce/plugins/contextmenu → lib/components/Editor/tinymce/plugins/textcolor}/plugin.js +8 -5
  254. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +9 -0
  255. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +1394 -0
  256. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +9 -0
  257. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +236 -0
  258. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +9 -0
  259. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +104 -0
  260. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  261. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +541 -0
  262. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +9 -0
  263. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +416 -0
  264. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +9 -0
  265. package/lib/components/Editor/tinymce/skins/content/dark/content.css +72 -0
  266. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +8 -0
  267. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -0
  268. package/lib/components/Editor/tinymce/skins/content/default/content.css +67 -0
  269. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +8 -0
  270. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -0
  271. package/lib/components/Editor/tinymce/skins/content/document/content.css +72 -0
  272. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +8 -0
  273. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -0
  274. package/lib/components/Editor/tinymce/skins/content/writer/content.css +68 -0
  275. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +8 -0
  276. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -0
  277. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +732 -0
  278. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +726 -0
  279. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
  280. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -0
  281. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +8 -0
  282. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -0
  283. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  284. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +8 -0
  285. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +1 -0
  286. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  287. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +3034 -0
  288. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +8 -0
  289. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -0
  290. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  291. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +8 -0
  292. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +1 -0
  293. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  294. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +8 -0
  295. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
  296. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +714 -0
  297. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  298. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
  299. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -0
  300. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
  301. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -0
  302. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  303. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +8 -0
  304. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +1 -0
  305. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  306. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +3034 -0
  307. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
  308. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -0
  309. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  310. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +8 -0
  311. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +1 -0
  312. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  313. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
  314. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
  315. package/lib/components/Editor/tinymce/themes/mobile/theme.js +13587 -0
  316. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +9 -0
  317. package/lib/components/Editor/tinymce/themes/silver/theme.js +32480 -0
  318. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +9 -0
  319. package/lib/components/Editor/tinymce/tinymce.d.ts +2963 -0
  320. package/lib/components/Editor/tinymce/tinymce.js +30106 -0
  321. package/lib/components/Editor/tinymce/tinymce.min.js +30106 -0
  322. package/lib/components/FilePreparer/FilePreparer.d.ts +26 -0
  323. package/lib/components/FilePreparer/FilePreparer.js +247 -0
  324. package/lib/components/FilePreparer/index.d.ts +2 -0
  325. package/lib/components/FilePreparer/index.js +1 -0
  326. package/lib/components/FileUploader/FileUploader.d.ts +9 -0
  327. package/lib/components/FileUploader/FileUploader.js +318 -0
  328. package/lib/components/FileUploader/index.d.ts +2 -0
  329. package/lib/components/FileUploader/index.js +1 -0
  330. package/lib/components/FormVisualizer/FormVisualizer.d.ts +92 -0
  331. package/lib/components/FormVisualizer/FormVisualizer.js +289 -0
  332. package/lib/components/FormVisualizer/index.d.ts +2 -0
  333. package/lib/components/FormVisualizer/index.js +1 -0
  334. package/lib/components/Highlight/Highlight.d.ts +7 -0
  335. package/lib/components/Highlight/Highlight.js +51 -0
  336. package/lib/components/Highlight/index.d.ts +2 -0
  337. package/lib/components/Highlight/index.js +1 -0
  338. package/lib/components/ImageResize/ImageResize.d.ts +28 -0
  339. package/lib/components/ImageResize/ImageResize.js +479 -0
  340. package/lib/components/ImageResize/index.d.ts +2 -0
  341. package/lib/components/ImageResize/index.js +1 -0
  342. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
  343. package/lib/components/ImageResizeButton/ImageResizeButton.js +65 -0
  344. package/lib/components/ImageResizeButton/index.d.ts +2 -0
  345. package/lib/components/ImageResizeButton/index.js +1 -0
  346. package/lib/components/Input/Input.d.ts +8 -0
  347. package/lib/components/Input/Input.js +353 -0
  348. package/lib/components/Input/index.d.ts +2 -0
  349. package/lib/components/Input/index.js +1 -0
  350. package/lib/components/InputTags/InputTags.d.ts +8 -0
  351. package/lib/components/InputTags/InputTags.js +94 -0
  352. package/lib/components/InputTags/index.d.ts +2 -0
  353. package/lib/components/InputTags/index.js +1 -0
  354. package/lib/components/ListSelect/ListSelect.d.ts +8 -0
  355. package/lib/components/ListSelect/ListSelect.js +94 -0
  356. package/lib/components/ListSelect/index.d.ts +2 -0
  357. package/lib/components/ListSelect/index.js +1 -0
  358. package/lib/components/MaterialButton/MaterialButton.d.ts +13 -0
  359. package/lib/components/MaterialButton/MaterialButton.js +177 -0
  360. package/lib/components/MaterialButton/index.d.ts +2 -0
  361. package/lib/components/MaterialButton/index.js +1 -0
  362. package/lib/components/MenuBar/MenuBar.d.ts +8 -0
  363. package/lib/components/MenuBar/MenuBar.js +139 -0
  364. package/lib/components/MenuBar/index.d.ts +2 -0
  365. package/lib/components/MenuBar/index.js +1 -0
  366. package/lib/components/MonthPicker/MonthPicker.d.ts +8 -0
  367. package/lib/components/MonthPicker/MonthPicker.js +313 -0
  368. package/lib/components/MonthPicker/index.d.ts +2 -0
  369. package/lib/components/MonthPicker/index.js +1 -0
  370. package/lib/components/MultipleSelect/MultipleSelect.d.ts +8 -0
  371. package/lib/components/MultipleSelect/MultipleSelect.js +106 -0
  372. package/lib/components/MultipleSelect/index.d.ts +2 -0
  373. package/lib/components/MultipleSelect/index.js +1 -0
  374. package/lib/components/OtpInput/OtpInput.tsx +244 -0
  375. package/lib/components/OtpInput/index.d.ts +2 -0
  376. package/lib/components/OtpInput/index.js +1 -0
  377. package/lib/components/OutputText/OutputText.d.ts +8 -0
  378. package/lib/components/OutputText/OutputText.js +57 -0
  379. package/lib/components/OutputText/index.d.ts +2 -0
  380. package/lib/components/OutputText/index.js +1 -0
  381. package/lib/components/Pagination/Pagination.d.ts +8 -0
  382. package/lib/components/Pagination/Pagination.js +32 -0
  383. package/lib/components/Pagination/index.d.ts +2 -0
  384. package/lib/components/Pagination/index.js +1 -0
  385. package/lib/components/Programa/Programa.d.ts +31 -0
  386. package/lib/components/Programa/Programa.js +172 -0
  387. package/lib/components/Programa/index.d.ts +2 -0
  388. package/lib/components/Programa/index.js +1 -0
  389. package/lib/components/ProgressBar/ProgressBar.d.ts +8 -0
  390. package/lib/components/ProgressBar/ProgressBar.js +71 -0
  391. package/lib/components/ProgressBar/index.d.ts +2 -0
  392. package/lib/components/ProgressBar/index.js +1 -0
  393. package/lib/components/Select/Select.d.ts +8 -0
  394. package/lib/components/Select/Select.js +117 -0
  395. package/lib/components/Select/index.d.ts +2 -0
  396. package/lib/components/Select/index.js +1 -0
  397. package/lib/components/SimpleTable/SimpleTable.d.ts +13 -0
  398. package/lib/components/SimpleTable/SimpleTable.js +504 -0
  399. package/lib/components/SimpleTable/index.d.ts +2 -0
  400. package/lib/components/SimpleTable/index.js +2 -0
  401. package/lib/components/Stepper/Stepper.d.ts +54 -0
  402. package/lib/components/Stepper/Stepper.js +222 -0
  403. package/lib/components/Stepper/index.d.ts +2 -0
  404. package/lib/components/Stepper/index.js +1 -0
  405. package/lib/components/TablePicker/TablePicker.d.ts +8 -0
  406. package/lib/components/TablePicker/TablePicker.js +238 -0
  407. package/lib/components/TablePicker/index.d.ts +2 -0
  408. package/lib/components/TablePicker/index.js +1 -0
  409. package/lib/components/Tabs/Tabs.d.ts +8 -0
  410. package/lib/components/Tabs/Tabs.js +59 -0
  411. package/lib/components/Tabs/index.d.ts +2 -0
  412. package/lib/components/Tabs/index.js +1 -0
  413. package/lib/components/TextArea/TextArea.d.ts +8 -0
  414. package/lib/components/TextArea/TextArea.js +123 -0
  415. package/lib/components/TextArea/index.d.ts +2 -0
  416. package/lib/components/TextArea/index.js +1 -0
  417. package/lib/components/ThreadLog/ThreadLog.d.ts +8 -0
  418. package/lib/components/ThreadLog/ThreadLog.js +189 -0
  419. package/lib/components/ThreadLog/index.d.ts +2 -0
  420. package/lib/components/ThreadLog/index.js +1 -0
  421. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
  422. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +130 -0
  423. package/lib/components/UtilAutoComplete/index.d.ts +2 -0
  424. package/lib/components/UtilAutoComplete/index.js +1 -0
  425. package/lib/components/index.d.ts +148 -0
  426. package/lib/components/index.js +146 -0
  427. package/lib/fieldsRedux/createField.d.ts +8 -0
  428. package/lib/fieldsRedux/createField.js +120 -0
  429. package/lib/fieldsRedux/fieldsRedux.d.ts +71 -0
  430. package/lib/fieldsRedux/fieldsRedux.js +391 -0
  431. package/lib/fieldsRedux/index.d.ts +4 -0
  432. package/lib/fieldsRedux/index.js +5 -0
  433. package/lib/fieldsRedux/passFields.d.ts +5 -0
  434. package/lib/fieldsRedux/passFields.js +76 -0
  435. package/lib/reducers/argous.ts +103 -0
  436. package/lib/reducers/index.ts +6 -0
  437. package/lib/types.d.ts +144 -0
  438. package/lib/utils/api.ts +153 -0
  439. package/lib/utils/config.ts +12 -0
  440. package/lib/utils/date.ts +63 -0
  441. package/lib/utils/index.ts +314 -0
  442. package/lib/utils/rippleEffect.js +211 -0
  443. package/lib/utils/store.ts +11 -0
  444. package/lib/utils/xmlToJson.js +117 -0
  445. package/package.json +1 -1
  446. package/dist/components/ArgousComplexTableBody/dnd/Container.d.ts +0 -55
  447. package/dist/components/ArgousComplexTableBody/dnd/Container.js +0 -173
  448. package/dist/components/ArgousComplexTableBody/dnd/Draggable.d.ts +0 -14
  449. package/dist/components/ArgousComplexTableBody/dnd/Draggable.js +0 -73
  450. package/dist/components/ArgousComplexTableBody/dnd/index.d.ts +0 -2
  451. package/dist/components/ArgousComplexTableBody/dnd/index.js +0 -10
  452. package/dist/components/ConfirmModal/useModal.d.ts +0 -2
  453. package/dist/components/ConfirmModal/useModal.js +0 -9
  454. package/dist/components/DropArea/worker.d.ts +0 -1
  455. package/dist/components/DropArea/worker.js +0 -55
  456. package/dist/components/Editor/tinymce/icons/default/icons.d.ts +0 -0
  457. package/dist/components/Editor/tinymce/icons/default/icons.js +0 -173
  458. package/dist/components/Editor/tinymce/plugins/advlist/plugin.d.ts +0 -0
  459. package/dist/components/Editor/tinymce/plugins/advlist/plugin.js +0 -271
  460. package/dist/components/Editor/tinymce/plugins/anchor/plugin.d.ts +0 -0
  461. package/dist/components/Editor/tinymce/plugins/anchor/plugin.js +0 -207
  462. package/dist/components/Editor/tinymce/plugins/autolink/plugin.d.ts +0 -0
  463. package/dist/components/Editor/tinymce/plugins/autolink/plugin.js +0 -187
  464. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.d.ts +0 -0
  465. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.js +0 -163
  466. package/dist/components/Editor/tinymce/plugins/autosave/plugin.d.ts +0 -0
  467. package/dist/components/Editor/tinymce/plugins/autosave/plugin.js +0 -199
  468. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.d.ts +0 -0
  469. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -94
  470. package/dist/components/Editor/tinymce/plugins/charmap/plugin.d.ts +0 -0
  471. package/dist/components/Editor/tinymce/plugins/charmap/plugin.js +0 -1691
  472. package/dist/components/Editor/tinymce/plugins/code/plugin.d.ts +0 -0
  473. package/dist/components/Editor/tinymce/plugins/code/plugin.js +0 -85
  474. package/dist/components/Editor/tinymce/plugins/codesample/plugin.js +0 -2331
  475. package/dist/components/Editor/tinymce/plugins/colorpicker/plugin.d.ts +0 -0
  476. package/dist/components/Editor/tinymce/plugins/contextmenu/plugin.d.ts +0 -0
  477. package/dist/components/Editor/tinymce/plugins/directionality/plugin.d.ts +0 -0
  478. package/dist/components/Editor/tinymce/plugins/directionality/plugin.js +0 -300
  479. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.d.ts +0 -0
  480. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +0 -9425
  481. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.d.ts +0 -0
  482. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.js +0 -9424
  483. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.d.ts +0 -0
  484. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.js +0 -585
  485. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.d.ts +0 -0
  486. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -539
  487. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.d.ts +0 -0
  488. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.js +0 -962
  489. package/dist/components/Editor/tinymce/plugins/help/plugin.d.ts +0 -0
  490. package/dist/components/Editor/tinymce/plugins/help/plugin.js +0 -850
  491. package/dist/components/Editor/tinymce/plugins/hr/plugin.d.ts +0 -0
  492. package/dist/components/Editor/tinymce/plugins/hr/plugin.js +0 -41
  493. package/dist/components/Editor/tinymce/plugins/image/plugin.d.ts +0 -0
  494. package/dist/components/Editor/tinymce/plugins/image/plugin.js +0 -1673
  495. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.d.ts +0 -0
  496. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1335
  497. package/dist/components/Editor/tinymce/plugins/importcss/plugin.d.ts +0 -0
  498. package/dist/components/Editor/tinymce/plugins/importcss/plugin.js +0 -346
  499. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.d.ts +0 -0
  500. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.js +0 -171
  501. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.d.ts +0 -0
  502. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -193
  503. package/dist/components/Editor/tinymce/plugins/link/plugin.d.ts +0 -0
  504. package/dist/components/Editor/tinymce/plugins/link/plugin.js +0 -1282
  505. package/dist/components/Editor/tinymce/plugins/lists/plugin.d.ts +0 -0
  506. package/dist/components/Editor/tinymce/plugins/lists/plugin.js +0 -2256
  507. package/dist/components/Editor/tinymce/plugins/media/plugin.d.ts +0 -0
  508. package/dist/components/Editor/tinymce/plugins/media/plugin.js +0 -1374
  509. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.d.ts +0 -0
  510. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.js +0 -93
  511. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.d.ts +0 -0
  512. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -114
  513. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.d.ts +0 -0
  514. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.js +0 -96
  515. package/dist/components/Editor/tinymce/plugins/paste/plugin.d.ts +0 -0
  516. package/dist/components/Editor/tinymce/plugins/paste/plugin.js +0 -1747
  517. package/dist/components/Editor/tinymce/plugins/preview/plugin.d.ts +0 -0
  518. package/dist/components/Editor/tinymce/plugins/preview/plugin.js +0 -119
  519. package/dist/components/Editor/tinymce/plugins/print/plugin.d.ts +0 -0
  520. package/dist/components/Editor/tinymce/plugins/print/plugin.js +0 -48
  521. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.d.ts +0 -0
  522. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.js +0 -475
  523. package/dist/components/Editor/tinymce/plugins/save/plugin.d.ts +0 -0
  524. package/dist/components/Editor/tinymce/plugins/save/plugin.js +0 -112
  525. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.d.ts +0 -0
  526. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.js +0 -1149
  527. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.d.ts +0 -0
  528. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -723
  529. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.d.ts +0 -0
  530. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -124
  531. package/dist/components/Editor/tinymce/plugins/table/plugin.d.ts +0 -0
  532. package/dist/components/Editor/tinymce/plugins/table/plugin.js +0 -10853
  533. package/dist/components/Editor/tinymce/plugins/template/plugin.d.ts +0 -0
  534. package/dist/components/Editor/tinymce/plugins/template/plugin.js +0 -561
  535. package/dist/components/Editor/tinymce/plugins/textcolor/plugin.d.ts +0 -0
  536. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.d.ts +0 -0
  537. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1393
  538. package/dist/components/Editor/tinymce/plugins/toc/plugin.d.ts +0 -0
  539. package/dist/components/Editor/tinymce/plugins/toc/plugin.js +0 -227
  540. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.d.ts +0 -0
  541. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.js +0 -94
  542. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.d.ts +0 -0
  543. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.js +0 -521
  544. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.d.ts +0 -0
  545. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.js +0 -397
  546. package/dist/components/Editor/tinymce/themes/mobile/theme.js +0 -13348
  547. package/dist/components/Editor/tinymce/themes/silver/theme.js +0 -32028
  548. package/dist/components/Editor/tinymce/tinymce.js +0 -30486
  549. package/dist/components/FilePreparer/worker.d.ts +0 -2
  550. package/dist/components/FilePreparer/worker.js +0 -31
  551. package/dist/convertReacticons.d.ts +0 -1
  552. package/dist/convertReacticons.js +0 -62
  553. package/dist/utils/Fields.d.ts +0 -0
  554. package/dist/utils/Fields.js +0 -1
@@ -0,0 +1,1163 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.9.0 (TBD)
8
+ */
9
+ (function () {
10
+ 'use strict';
11
+
12
+ var Cell = function (initial) {
13
+ var value = initial;
14
+ var get = function () {
15
+ return value;
16
+ };
17
+ var set = function (v) {
18
+ value = v;
19
+ };
20
+ return {
21
+ get: get,
22
+ set: set
23
+ };
24
+ };
25
+
26
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
27
+
28
+ var __assign = function () {
29
+ __assign = Object.assign || function __assign(t) {
30
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
31
+ s = arguments[i];
32
+ for (var p in s)
33
+ if (Object.prototype.hasOwnProperty.call(s, p))
34
+ t[p] = s[p];
35
+ }
36
+ return t;
37
+ };
38
+ return __assign.apply(this, arguments);
39
+ };
40
+
41
+ var typeOf = function (x) {
42
+ var t = typeof x;
43
+ if (x === null) {
44
+ return 'null';
45
+ } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
46
+ return 'array';
47
+ } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
48
+ return 'string';
49
+ } else {
50
+ return t;
51
+ }
52
+ };
53
+ var isType = function (type) {
54
+ return function (value) {
55
+ return typeOf(value) === type;
56
+ };
57
+ };
58
+ var isSimpleType = function (type) {
59
+ return function (value) {
60
+ return typeof value === type;
61
+ };
62
+ };
63
+ var isString = isType('string');
64
+ var isArray = isType('array');
65
+ var isBoolean = isSimpleType('boolean');
66
+ var isNumber = isSimpleType('number');
67
+
68
+ var noop = function () {
69
+ };
70
+ var constant = function (value) {
71
+ return function () {
72
+ return value;
73
+ };
74
+ };
75
+ var never = constant(false);
76
+ var always = constant(true);
77
+
78
+ var punctuationStr = '[!-#%-*,-\\/:;?@\\[-\\]_{}\xA1\xAB\xB7\xBB\xBF;\xB7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uff3f\uFF5B\uFF5D\uFF5F-\uFF65]';
79
+
80
+ var punctuation = constant(punctuationStr);
81
+
82
+ var none = function () {
83
+ return NONE;
84
+ };
85
+ var NONE = function () {
86
+ var eq = function (o) {
87
+ return o.isNone();
88
+ };
89
+ var call = function (thunk) {
90
+ return thunk();
91
+ };
92
+ var id = function (n) {
93
+ return n;
94
+ };
95
+ var me = {
96
+ fold: function (n, _s) {
97
+ return n();
98
+ },
99
+ is: never,
100
+ isSome: never,
101
+ isNone: always,
102
+ getOr: id,
103
+ getOrThunk: call,
104
+ getOrDie: function (msg) {
105
+ throw new Error(msg || 'error: getOrDie called on none.');
106
+ },
107
+ getOrNull: constant(null),
108
+ getOrUndefined: constant(undefined),
109
+ or: id,
110
+ orThunk: call,
111
+ map: none,
112
+ each: noop,
113
+ bind: none,
114
+ exists: never,
115
+ forall: always,
116
+ filter: none,
117
+ equals: eq,
118
+ equals_: eq,
119
+ toArray: function () {
120
+ return [];
121
+ },
122
+ toString: constant('none()')
123
+ };
124
+ return me;
125
+ }();
126
+ var some = function (a) {
127
+ var constant_a = constant(a);
128
+ var self = function () {
129
+ return me;
130
+ };
131
+ var bind = function (f) {
132
+ return f(a);
133
+ };
134
+ var me = {
135
+ fold: function (n, s) {
136
+ return s(a);
137
+ },
138
+ is: function (v) {
139
+ return a === v;
140
+ },
141
+ isSome: always,
142
+ isNone: never,
143
+ getOr: constant_a,
144
+ getOrThunk: constant_a,
145
+ getOrDie: constant_a,
146
+ getOrNull: constant_a,
147
+ getOrUndefined: constant_a,
148
+ or: self,
149
+ orThunk: self,
150
+ map: function (f) {
151
+ return some(f(a));
152
+ },
153
+ each: function (f) {
154
+ f(a);
155
+ },
156
+ bind: bind,
157
+ exists: bind,
158
+ forall: bind,
159
+ filter: function (f) {
160
+ return f(a) ? me : NONE;
161
+ },
162
+ toArray: function () {
163
+ return [a];
164
+ },
165
+ toString: function () {
166
+ return 'some(' + a + ')';
167
+ },
168
+ equals: function (o) {
169
+ return o.is(a);
170
+ },
171
+ equals_: function (o, elementEq) {
172
+ return o.fold(never, function (b) {
173
+ return elementEq(a, b);
174
+ });
175
+ }
176
+ };
177
+ return me;
178
+ };
179
+ var from = function (value) {
180
+ return value === null || value === undefined ? NONE : some(value);
181
+ };
182
+ var Optional = {
183
+ some: some,
184
+ none: none,
185
+ from: from
186
+ };
187
+
188
+ var punctuation$1 = punctuation;
189
+
190
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
191
+
192
+ var nativeSlice = Array.prototype.slice;
193
+ var nativePush = Array.prototype.push;
194
+ var map = function (xs, f) {
195
+ var len = xs.length;
196
+ var r = new Array(len);
197
+ for (var i = 0; i < len; i++) {
198
+ var x = xs[i];
199
+ r[i] = f(x, i);
200
+ }
201
+ return r;
202
+ };
203
+ var each = function (xs, f) {
204
+ for (var i = 0, len = xs.length; i < len; i++) {
205
+ var x = xs[i];
206
+ f(x, i);
207
+ }
208
+ };
209
+ var eachr = function (xs, f) {
210
+ for (var i = xs.length - 1; i >= 0; i--) {
211
+ var x = xs[i];
212
+ f(x, i);
213
+ }
214
+ };
215
+ var groupBy = function (xs, f) {
216
+ if (xs.length === 0) {
217
+ return [];
218
+ } else {
219
+ var wasType = f(xs[0]);
220
+ var r = [];
221
+ var group = [];
222
+ for (var i = 0, len = xs.length; i < len; i++) {
223
+ var x = xs[i];
224
+ var type = f(x);
225
+ if (type !== wasType) {
226
+ r.push(group);
227
+ group = [];
228
+ }
229
+ wasType = type;
230
+ group.push(x);
231
+ }
232
+ if (group.length !== 0) {
233
+ r.push(group);
234
+ }
235
+ return r;
236
+ }
237
+ };
238
+ var foldl = function (xs, f, acc) {
239
+ each(xs, function (x) {
240
+ acc = f(acc, x);
241
+ });
242
+ return acc;
243
+ };
244
+ var flatten = function (xs) {
245
+ var r = [];
246
+ for (var i = 0, len = xs.length; i < len; ++i) {
247
+ if (!isArray(xs[i])) {
248
+ throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
249
+ }
250
+ nativePush.apply(r, xs[i]);
251
+ }
252
+ return r;
253
+ };
254
+ var bind = function (xs, f) {
255
+ return flatten(map(xs, f));
256
+ };
257
+ var sort = function (xs, comparator) {
258
+ var copy = nativeSlice.call(xs, 0);
259
+ copy.sort(comparator);
260
+ return copy;
261
+ };
262
+
263
+ var hasOwnProperty = Object.hasOwnProperty;
264
+ var has = function (obj, key) {
265
+ return hasOwnProperty.call(obj, key);
266
+ };
267
+
268
+ var Global = typeof window !== 'undefined' ? window : Function('return this;')();
269
+
270
+ var DOCUMENT = 9;
271
+ var DOCUMENT_FRAGMENT = 11;
272
+ var ELEMENT = 1;
273
+ var TEXT = 3;
274
+
275
+ var type = function (element) {
276
+ return element.dom.nodeType;
277
+ };
278
+ var isType$1 = function (t) {
279
+ return function (element) {
280
+ return type(element) === t;
281
+ };
282
+ };
283
+ var isText = isType$1(TEXT);
284
+
285
+ var rawSet = function (dom, key, value) {
286
+ if (isString(value) || isBoolean(value) || isNumber(value)) {
287
+ dom.setAttribute(key, value + '');
288
+ } else {
289
+ console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
290
+ throw new Error('Attribute value was not simple');
291
+ }
292
+ };
293
+ var set = function (element, key, value) {
294
+ rawSet(element.dom, key, value);
295
+ };
296
+
297
+ var compareDocumentPosition = function (a, b, match) {
298
+ return (a.compareDocumentPosition(b) & match) !== 0;
299
+ };
300
+ var documentPositionPreceding = function (a, b) {
301
+ return compareDocumentPosition(a, b, Node.DOCUMENT_POSITION_PRECEDING);
302
+ };
303
+
304
+ var fromHtml = function (html, scope) {
305
+ var doc = scope || document;
306
+ var div = doc.createElement('div');
307
+ div.innerHTML = html;
308
+ if (!div.hasChildNodes() || div.childNodes.length > 1) {
309
+ console.error('HTML does not have a single root node', html);
310
+ throw new Error('HTML must have a single root node');
311
+ }
312
+ return fromDom(div.childNodes[0]);
313
+ };
314
+ var fromTag = function (tag, scope) {
315
+ var doc = scope || document;
316
+ var node = doc.createElement(tag);
317
+ return fromDom(node);
318
+ };
319
+ var fromText = function (text, scope) {
320
+ var doc = scope || document;
321
+ var node = doc.createTextNode(text);
322
+ return fromDom(node);
323
+ };
324
+ var fromDom = function (node) {
325
+ if (node === null || node === undefined) {
326
+ throw new Error('Node cannot be null or undefined');
327
+ }
328
+ return { dom: node };
329
+ };
330
+ var fromPoint = function (docElm, x, y) {
331
+ return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
332
+ };
333
+ var SugarElement = {
334
+ fromHtml: fromHtml,
335
+ fromTag: fromTag,
336
+ fromText: fromText,
337
+ fromDom: fromDom,
338
+ fromPoint: fromPoint
339
+ };
340
+
341
+ var bypassSelector = function (dom) {
342
+ return dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
343
+ };
344
+ var all = function (selector, scope) {
345
+ var base = scope === undefined ? document : scope.dom;
346
+ return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);
347
+ };
348
+
349
+ var parent = function (element) {
350
+ return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
351
+ };
352
+ var children = function (element) {
353
+ return map(element.dom.childNodes, SugarElement.fromDom);
354
+ };
355
+ var spot = function (element, offset) {
356
+ return {
357
+ element: element,
358
+ offset: offset
359
+ };
360
+ };
361
+ var leaf = function (element, offset) {
362
+ var cs = children(element);
363
+ return cs.length > 0 && offset < cs.length ? spot(cs[offset], 0) : spot(element, offset);
364
+ };
365
+
366
+ var before = function (marker, element) {
367
+ var parent$1 = parent(marker);
368
+ parent$1.each(function (v) {
369
+ v.dom.insertBefore(element.dom, marker.dom);
370
+ });
371
+ };
372
+ var append = function (parent, element) {
373
+ parent.dom.appendChild(element.dom);
374
+ };
375
+ var wrap = function (element, wrapper) {
376
+ before(element, wrapper);
377
+ append(wrapper, element);
378
+ };
379
+
380
+ var NodeValue = function (is, name) {
381
+ var get = function (element) {
382
+ if (!is(element)) {
383
+ throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
384
+ }
385
+ return getOption(element).getOr('');
386
+ };
387
+ var getOption = function (element) {
388
+ return is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();
389
+ };
390
+ var set = function (element, value) {
391
+ if (!is(element)) {
392
+ throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
393
+ }
394
+ element.dom.nodeValue = value;
395
+ };
396
+ return {
397
+ get: get,
398
+ getOption: getOption,
399
+ set: set
400
+ };
401
+ };
402
+
403
+ var api = NodeValue(isText, 'text');
404
+ var get = function (element) {
405
+ return api.get(element);
406
+ };
407
+
408
+ var descendants = function (scope, selector) {
409
+ return all(selector, scope);
410
+ };
411
+
412
+ var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
413
+
414
+ var isSimpleBoundary = function (dom, node) {
415
+ return dom.isBlock(node) || has(dom.schema.getShortEndedElements(), node.nodeName);
416
+ };
417
+ var isContentEditableFalse = function (dom, node) {
418
+ return dom.getContentEditable(node) === 'false';
419
+ };
420
+ var isContentEditableTrueInCef = function (dom, node) {
421
+ return dom.getContentEditable(node) === 'true' && dom.getContentEditableParent(node.parentNode) === 'false';
422
+ };
423
+ var isHidden = function (dom, node) {
424
+ return !dom.isBlock(node) && has(dom.schema.getWhiteSpaceElements(), node.nodeName);
425
+ };
426
+ var isBoundary = function (dom, node) {
427
+ return isSimpleBoundary(dom, node) || isContentEditableFalse(dom, node) || isHidden(dom, node) || isContentEditableTrueInCef(dom, node);
428
+ };
429
+ var isText$1 = function (node) {
430
+ return node.nodeType === 3;
431
+ };
432
+ var nuSection = function () {
433
+ return {
434
+ sOffset: 0,
435
+ fOffset: 0,
436
+ elements: []
437
+ };
438
+ };
439
+ var toLeaf = function (node, offset) {
440
+ return leaf(SugarElement.fromDom(node), offset);
441
+ };
442
+ var walk = function (dom, walkerFn, startNode, callbacks, endNode, skipStart) {
443
+ if (skipStart === void 0) {
444
+ skipStart = true;
445
+ }
446
+ var next = skipStart ? walkerFn(false) : startNode;
447
+ while (next) {
448
+ var isCefNode = isContentEditableFalse(dom, next);
449
+ if (isCefNode || isHidden(dom, next)) {
450
+ var stopWalking = isCefNode ? callbacks.cef(next) : callbacks.boundary(next);
451
+ if (stopWalking) {
452
+ break;
453
+ } else {
454
+ next = walkerFn(true);
455
+ continue;
456
+ }
457
+ } else if (isSimpleBoundary(dom, next)) {
458
+ if (callbacks.boundary(next)) {
459
+ break;
460
+ }
461
+ } else if (isText$1(next)) {
462
+ callbacks.text(next);
463
+ }
464
+ if (next === endNode) {
465
+ break;
466
+ } else {
467
+ next = walkerFn(false);
468
+ }
469
+ }
470
+ };
471
+ var collectTextToBoundary = function (dom, section, node, rootNode, forwards) {
472
+ if (isBoundary(dom, node)) {
473
+ return;
474
+ }
475
+ var rootBlock = dom.getParent(rootNode, dom.isBlock);
476
+ var walker = new global$2(node, rootBlock);
477
+ var walkerFn = forwards ? walker.next.bind(walker) : walker.prev.bind(walker);
478
+ walk(dom, walkerFn, node, {
479
+ boundary: always,
480
+ cef: always,
481
+ text: function (next) {
482
+ if (forwards) {
483
+ section.fOffset += next.length;
484
+ } else {
485
+ section.sOffset += next.length;
486
+ }
487
+ section.elements.push(SugarElement.fromDom(next));
488
+ }
489
+ });
490
+ };
491
+ var collect = function (dom, rootNode, startNode, endNode, callbacks, skipStart) {
492
+ if (skipStart === void 0) {
493
+ skipStart = true;
494
+ }
495
+ var walker = new global$2(startNode, rootNode);
496
+ var sections = [];
497
+ var current = nuSection();
498
+ collectTextToBoundary(dom, current, startNode, rootNode, false);
499
+ var finishSection = function () {
500
+ if (current.elements.length > 0) {
501
+ sections.push(current);
502
+ current = nuSection();
503
+ }
504
+ return false;
505
+ };
506
+ walk(dom, walker.next.bind(walker), startNode, {
507
+ boundary: finishSection,
508
+ cef: function (node) {
509
+ finishSection();
510
+ if (callbacks) {
511
+ sections.push.apply(sections, callbacks.cef(node));
512
+ }
513
+ return false;
514
+ },
515
+ text: function (next) {
516
+ current.elements.push(SugarElement.fromDom(next));
517
+ if (callbacks) {
518
+ callbacks.text(next, current);
519
+ }
520
+ }
521
+ }, endNode, skipStart);
522
+ if (endNode) {
523
+ collectTextToBoundary(dom, current, endNode, rootNode, true);
524
+ }
525
+ finishSection();
526
+ return sections;
527
+ };
528
+ var collectRangeSections = function (dom, rng) {
529
+ var start = toLeaf(rng.startContainer, rng.startOffset);
530
+ var startNode = start.element.dom;
531
+ var end = toLeaf(rng.endContainer, rng.endOffset);
532
+ var endNode = end.element.dom;
533
+ return collect(dom, rng.commonAncestorContainer, startNode, endNode, {
534
+ text: function (node, section) {
535
+ if (node === endNode) {
536
+ section.fOffset += node.length - end.offset;
537
+ } else if (node === startNode) {
538
+ section.sOffset += start.offset;
539
+ }
540
+ },
541
+ cef: function (node) {
542
+ var sections = bind(descendants(SugarElement.fromDom(node), '*[contenteditable=true]'), function (e) {
543
+ var ceTrueNode = e.dom;
544
+ return collect(dom, ceTrueNode, ceTrueNode);
545
+ });
546
+ return sort(sections, function (a, b) {
547
+ return documentPositionPreceding(a.elements[0].dom, b.elements[0].dom) ? 1 : -1;
548
+ });
549
+ }
550
+ }, false);
551
+ };
552
+ var fromRng = function (dom, rng) {
553
+ return rng.collapsed ? [] : collectRangeSections(dom, rng);
554
+ };
555
+ var fromNode = function (dom, node) {
556
+ var rng = dom.createRng();
557
+ rng.selectNode(node);
558
+ return fromRng(dom, rng);
559
+ };
560
+ var fromNodes = function (dom, nodes) {
561
+ return bind(nodes, function (node) {
562
+ return fromNode(dom, node);
563
+ });
564
+ };
565
+
566
+ var find = function (text, pattern, start, finish) {
567
+ if (start === void 0) {
568
+ start = 0;
569
+ }
570
+ if (finish === void 0) {
571
+ finish = text.length;
572
+ }
573
+ var regex = pattern.regex;
574
+ regex.lastIndex = start;
575
+ var results = [];
576
+ var match;
577
+ while (match = regex.exec(text)) {
578
+ var matchedText = match[pattern.matchIndex];
579
+ var matchStart = match.index + match[0].indexOf(matchedText);
580
+ var matchFinish = matchStart + matchedText.length;
581
+ if (matchFinish > finish) {
582
+ break;
583
+ }
584
+ results.push({
585
+ start: matchStart,
586
+ finish: matchFinish
587
+ });
588
+ regex.lastIndex = matchFinish;
589
+ }
590
+ return results;
591
+ };
592
+ var extract = function (elements, matches) {
593
+ var nodePositions = foldl(elements, function (acc, element) {
594
+ var content = get(element);
595
+ var start = acc.last;
596
+ var finish = start + content.length;
597
+ var positions = bind(matches, function (match, matchIdx) {
598
+ if (match.start < finish && match.finish > start) {
599
+ return [{
600
+ element: element,
601
+ start: Math.max(start, match.start) - start,
602
+ finish: Math.min(finish, match.finish) - start,
603
+ matchId: matchIdx
604
+ }];
605
+ } else {
606
+ return [];
607
+ }
608
+ });
609
+ return {
610
+ results: acc.results.concat(positions),
611
+ last: finish
612
+ };
613
+ }, {
614
+ results: [],
615
+ last: 0
616
+ }).results;
617
+ return groupBy(nodePositions, function (position) {
618
+ return position.matchId;
619
+ });
620
+ };
621
+
622
+ var find$1 = function (pattern, sections) {
623
+ return bind(sections, function (section) {
624
+ var elements = section.elements;
625
+ var content = map(elements, get).join('');
626
+ var positions = find(content, pattern, section.sOffset, content.length - section.fOffset);
627
+ return extract(elements, positions);
628
+ });
629
+ };
630
+ var mark = function (matches, replacementNode) {
631
+ eachr(matches, function (match, idx) {
632
+ eachr(match, function (pos) {
633
+ var wrapper = SugarElement.fromDom(replacementNode.cloneNode(false));
634
+ set(wrapper, 'data-mce-index', idx);
635
+ var textNode = pos.element.dom;
636
+ if (textNode.length === pos.finish && pos.start === 0) {
637
+ wrap(pos.element, wrapper);
638
+ } else {
639
+ if (textNode.length !== pos.finish) {
640
+ textNode.splitText(pos.finish);
641
+ }
642
+ var matchNode = textNode.splitText(pos.start);
643
+ wrap(SugarElement.fromDom(matchNode), wrapper);
644
+ }
645
+ });
646
+ });
647
+ };
648
+ var findAndMark = function (dom, pattern, node, replacementNode) {
649
+ var textSections = fromNode(dom, node);
650
+ var matches = find$1(pattern, textSections);
651
+ mark(matches, replacementNode);
652
+ return matches.length;
653
+ };
654
+ var findAndMarkInSelection = function (dom, pattern, selection, replacementNode) {
655
+ var bookmark = selection.getBookmark();
656
+ var nodes = dom.select('td[data-mce-selected],th[data-mce-selected]');
657
+ var textSections = nodes.length > 0 ? fromNodes(dom, nodes) : fromRng(dom, selection.getRng());
658
+ var matches = find$1(pattern, textSections);
659
+ mark(matches, replacementNode);
660
+ selection.moveToBookmark(bookmark);
661
+ return matches.length;
662
+ };
663
+
664
+ var getElmIndex = function (elm) {
665
+ var value = elm.getAttribute('data-mce-index');
666
+ if (typeof value === 'number') {
667
+ return '' + value;
668
+ }
669
+ return value;
670
+ };
671
+ var markAllMatches = function (editor, currentSearchState, pattern, inSelection) {
672
+ var marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
673
+ marker.className = 'mce-match-marker';
674
+ var node = editor.getBody();
675
+ done(editor, currentSearchState, false);
676
+ if (inSelection) {
677
+ return findAndMarkInSelection(editor.dom, pattern, editor.selection, marker);
678
+ } else {
679
+ return findAndMark(editor.dom, pattern, node, marker);
680
+ }
681
+ };
682
+ var unwrap = function (node) {
683
+ var parentNode = node.parentNode;
684
+ if (node.firstChild) {
685
+ parentNode.insertBefore(node.firstChild, node);
686
+ }
687
+ node.parentNode.removeChild(node);
688
+ };
689
+ var findSpansByIndex = function (editor, index) {
690
+ var spans = [];
691
+ var nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
692
+ if (nodes.length) {
693
+ for (var i = 0; i < nodes.length; i++) {
694
+ var nodeIndex = getElmIndex(nodes[i]);
695
+ if (nodeIndex === null || !nodeIndex.length) {
696
+ continue;
697
+ }
698
+ if (nodeIndex === index.toString()) {
699
+ spans.push(nodes[i]);
700
+ }
701
+ }
702
+ }
703
+ return spans;
704
+ };
705
+ var moveSelection = function (editor, currentSearchState, forward) {
706
+ var searchState = currentSearchState.get();
707
+ var testIndex = searchState.index;
708
+ var dom = editor.dom;
709
+ forward = forward !== false;
710
+ if (forward) {
711
+ if (testIndex + 1 === searchState.count) {
712
+ testIndex = 0;
713
+ } else {
714
+ testIndex++;
715
+ }
716
+ } else {
717
+ if (testIndex - 1 === -1) {
718
+ testIndex = searchState.count - 1;
719
+ } else {
720
+ testIndex--;
721
+ }
722
+ }
723
+ dom.removeClass(findSpansByIndex(editor, searchState.index), 'mce-match-marker-selected');
724
+ var spans = findSpansByIndex(editor, testIndex);
725
+ if (spans.length) {
726
+ dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
727
+ editor.selection.scrollIntoView(spans[0]);
728
+ return testIndex;
729
+ }
730
+ return -1;
731
+ };
732
+ var removeNode = function (dom, node) {
733
+ var parent = node.parentNode;
734
+ dom.remove(node);
735
+ if (dom.isEmpty(parent)) {
736
+ dom.remove(parent);
737
+ }
738
+ };
739
+ var escapeSearchText = function (text, wholeWord) {
740
+ var escapedText = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&').replace(/\s/g, '[^\\S\\r\\n\\uFEFF]');
741
+ var wordRegex = '(' + escapedText + ')';
742
+ return wholeWord ? '(?:^|\\s|' + punctuation$1() + ')' + wordRegex + ('(?=$|\\s|' + punctuation$1() + ')') : wordRegex;
743
+ };
744
+ var find$2 = function (editor, currentSearchState, text, matchCase, wholeWord, inSelection) {
745
+ var escapedText = escapeSearchText(text, wholeWord);
746
+ var pattern = {
747
+ regex: new RegExp(escapedText, matchCase ? 'g' : 'gi'),
748
+ matchIndex: 1
749
+ };
750
+ var count = markAllMatches(editor, currentSearchState, pattern, inSelection);
751
+ if (count) {
752
+ var newIndex = moveSelection(editor, currentSearchState, true);
753
+ currentSearchState.set({
754
+ index: newIndex,
755
+ count: count,
756
+ text: text,
757
+ matchCase: matchCase,
758
+ wholeWord: wholeWord,
759
+ inSelection: inSelection
760
+ });
761
+ }
762
+ return count;
763
+ };
764
+ var next = function (editor, currentSearchState) {
765
+ var index = moveSelection(editor, currentSearchState, true);
766
+ currentSearchState.set(__assign(__assign({}, currentSearchState.get()), { index: index }));
767
+ };
768
+ var prev = function (editor, currentSearchState) {
769
+ var index = moveSelection(editor, currentSearchState, false);
770
+ currentSearchState.set(__assign(__assign({}, currentSearchState.get()), { index: index }));
771
+ };
772
+ var isMatchSpan = function (node) {
773
+ var matchIndex = getElmIndex(node);
774
+ return matchIndex !== null && matchIndex.length > 0;
775
+ };
776
+ var replace = function (editor, currentSearchState, text, forward, all) {
777
+ var searchState = currentSearchState.get();
778
+ var currentIndex = searchState.index;
779
+ var currentMatchIndex, nextIndex = currentIndex;
780
+ forward = forward !== false;
781
+ var node = editor.getBody();
782
+ var nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
783
+ for (var i = 0; i < nodes.length; i++) {
784
+ var nodeIndex = getElmIndex(nodes[i]);
785
+ var matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
786
+ if (all || matchIndex === searchState.index) {
787
+ if (text.length) {
788
+ nodes[i].firstChild.nodeValue = text;
789
+ unwrap(nodes[i]);
790
+ } else {
791
+ removeNode(editor.dom, nodes[i]);
792
+ }
793
+ while (nodes[++i]) {
794
+ matchIndex = parseInt(getElmIndex(nodes[i]), 10);
795
+ if (matchIndex === currentMatchIndex) {
796
+ removeNode(editor.dom, nodes[i]);
797
+ } else {
798
+ i--;
799
+ break;
800
+ }
801
+ }
802
+ if (forward) {
803
+ nextIndex--;
804
+ }
805
+ } else if (currentMatchIndex > currentIndex) {
806
+ nodes[i].setAttribute('data-mce-index', String(currentMatchIndex - 1));
807
+ }
808
+ }
809
+ currentSearchState.set(__assign(__assign({}, searchState), {
810
+ count: all ? 0 : searchState.count - 1,
811
+ index: nextIndex
812
+ }));
813
+ if (forward) {
814
+ next(editor, currentSearchState);
815
+ } else {
816
+ prev(editor, currentSearchState);
817
+ }
818
+ return !all && currentSearchState.get().count > 0;
819
+ };
820
+ var done = function (editor, currentSearchState, keepEditorSelection) {
821
+ var i, startContainer, endContainer;
822
+ var searchState = currentSearchState.get();
823
+ var nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
824
+ for (i = 0; i < nodes.length; i++) {
825
+ var nodeIndex = getElmIndex(nodes[i]);
826
+ if (nodeIndex !== null && nodeIndex.length) {
827
+ if (nodeIndex === searchState.index.toString()) {
828
+ if (!startContainer) {
829
+ startContainer = nodes[i].firstChild;
830
+ }
831
+ endContainer = nodes[i].firstChild;
832
+ }
833
+ unwrap(nodes[i]);
834
+ }
835
+ }
836
+ currentSearchState.set(__assign(__assign({}, searchState), {
837
+ index: -1,
838
+ count: 0,
839
+ text: ''
840
+ }));
841
+ if (startContainer && endContainer) {
842
+ var rng = editor.dom.createRng();
843
+ rng.setStart(startContainer, 0);
844
+ rng.setEnd(endContainer, endContainer.data.length);
845
+ if (keepEditorSelection !== false) {
846
+ editor.selection.setRng(rng);
847
+ }
848
+ return rng;
849
+ }
850
+ };
851
+ var hasNext = function (editor, currentSearchState) {
852
+ return currentSearchState.get().count > 1;
853
+ };
854
+ var hasPrev = function (editor, currentSearchState) {
855
+ return currentSearchState.get().count > 1;
856
+ };
857
+
858
+ var get$1 = function (editor, currentState) {
859
+ var done$1 = function (keepEditorSelection) {
860
+ return done(editor, currentState, keepEditorSelection);
861
+ };
862
+ var find = function (text, matchCase, wholeWord, inSelection) {
863
+ if (inSelection === void 0) {
864
+ inSelection = false;
865
+ }
866
+ return find$2(editor, currentState, text, matchCase, wholeWord, inSelection);
867
+ };
868
+ var next$1 = function () {
869
+ return next(editor, currentState);
870
+ };
871
+ var prev$1 = function () {
872
+ return prev(editor, currentState);
873
+ };
874
+ var replace$1 = function (text, forward, all) {
875
+ return replace(editor, currentState, text, forward, all);
876
+ };
877
+ return {
878
+ done: done$1,
879
+ find: find,
880
+ next: next$1,
881
+ prev: prev$1,
882
+ replace: replace$1
883
+ };
884
+ };
885
+
886
+ var value = function () {
887
+ var subject = Cell(Optional.none());
888
+ var clear = function () {
889
+ return subject.set(Optional.none());
890
+ };
891
+ var set = function (s) {
892
+ return subject.set(Optional.some(s));
893
+ };
894
+ var isSet = function () {
895
+ return subject.get().isSome();
896
+ };
897
+ var on = function (f) {
898
+ return subject.get().each(f);
899
+ };
900
+ return {
901
+ clear: clear,
902
+ set: set,
903
+ isSet: isSet,
904
+ on: on
905
+ };
906
+ };
907
+
908
+ var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
909
+
910
+ var open = function (editor, currentSearchState) {
911
+ var dialogApi = value();
912
+ editor.undoManager.add();
913
+ var selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
914
+ var updateButtonStates = function (api) {
915
+ var updateNext = hasNext(editor, currentSearchState) ? api.enable : api.disable;
916
+ updateNext('next');
917
+ var updatePrev = hasPrev(editor, currentSearchState) ? api.enable : api.disable;
918
+ updatePrev('prev');
919
+ };
920
+ var updateSearchState = function (api) {
921
+ var data = api.getData();
922
+ var current = currentSearchState.get();
923
+ currentSearchState.set(__assign(__assign({}, current), {
924
+ matchCase: data.matchcase,
925
+ wholeWord: data.wholewords,
926
+ inSelection: data.inselection
927
+ }));
928
+ };
929
+ var disableAll = function (api, disable) {
930
+ var buttons = [
931
+ 'replace',
932
+ 'replaceall',
933
+ 'prev',
934
+ 'next'
935
+ ];
936
+ var toggle = disable ? api.disable : api.enable;
937
+ each(buttons, toggle);
938
+ };
939
+ var notFoundAlert = function (api) {
940
+ editor.windowManager.alert('Could not find the specified string.', function () {
941
+ api.focus('findtext');
942
+ });
943
+ };
944
+ var focusButtonIfRequired = function (api, name) {
945
+ if (global$3.browser.isSafari() && global$3.deviceType.isTouch() && (name === 'find' || name === 'replace' || name === 'replaceall')) {
946
+ api.focus(name);
947
+ }
948
+ };
949
+ var reset = function (api) {
950
+ done(editor, currentSearchState, false);
951
+ disableAll(api, true);
952
+ updateButtonStates(api);
953
+ };
954
+ var doFind = function (api) {
955
+ var data = api.getData();
956
+ var last = currentSearchState.get();
957
+ if (!data.findtext.length) {
958
+ reset(api);
959
+ return;
960
+ }
961
+ if (last.text === data.findtext && last.matchCase === data.matchcase && last.wholeWord === data.wholewords) {
962
+ next(editor, currentSearchState);
963
+ } else {
964
+ var count = find$2(editor, currentSearchState, data.findtext, data.matchcase, data.wholewords, data.inselection);
965
+ if (count <= 0) {
966
+ notFoundAlert(api);
967
+ }
968
+ disableAll(api, count === 0);
969
+ }
970
+ updateButtonStates(api);
971
+ };
972
+ var initialState = currentSearchState.get();
973
+ var initialData = {
974
+ findtext: selectedText,
975
+ replacetext: '',
976
+ wholewords: initialState.wholeWord,
977
+ matchcase: initialState.matchCase,
978
+ inselection: initialState.inSelection
979
+ };
980
+ var spec = {
981
+ title: 'Find and Replace',
982
+ size: 'normal',
983
+ body: {
984
+ type: 'panel',
985
+ items: [
986
+ {
987
+ type: 'bar',
988
+ items: [
989
+ {
990
+ type: 'input',
991
+ name: 'findtext',
992
+ placeholder: 'Find',
993
+ maximized: true,
994
+ inputMode: 'search'
995
+ },
996
+ {
997
+ type: 'button',
998
+ name: 'prev',
999
+ text: 'Previous',
1000
+ icon: 'action-prev',
1001
+ disabled: true,
1002
+ borderless: true
1003
+ },
1004
+ {
1005
+ type: 'button',
1006
+ name: 'next',
1007
+ text: 'Next',
1008
+ icon: 'action-next',
1009
+ disabled: true,
1010
+ borderless: true
1011
+ }
1012
+ ]
1013
+ },
1014
+ {
1015
+ type: 'input',
1016
+ name: 'replacetext',
1017
+ placeholder: 'Replace with',
1018
+ inputMode: 'search'
1019
+ }
1020
+ ]
1021
+ },
1022
+ buttons: [
1023
+ {
1024
+ type: 'menu',
1025
+ name: 'options',
1026
+ icon: 'preferences',
1027
+ tooltip: 'Preferences',
1028
+ align: 'start',
1029
+ items: [
1030
+ {
1031
+ type: 'togglemenuitem',
1032
+ name: 'matchcase',
1033
+ text: 'Match case'
1034
+ },
1035
+ {
1036
+ type: 'togglemenuitem',
1037
+ name: 'wholewords',
1038
+ text: 'Find whole words only'
1039
+ },
1040
+ {
1041
+ type: 'togglemenuitem',
1042
+ name: 'inselection',
1043
+ text: 'Find in selection'
1044
+ }
1045
+ ]
1046
+ },
1047
+ {
1048
+ type: 'custom',
1049
+ name: 'find',
1050
+ text: 'Find',
1051
+ primary: true
1052
+ },
1053
+ {
1054
+ type: 'custom',
1055
+ name: 'replace',
1056
+ text: 'Replace',
1057
+ disabled: true
1058
+ },
1059
+ {
1060
+ type: 'custom',
1061
+ name: 'replaceall',
1062
+ text: 'Replace all',
1063
+ disabled: true
1064
+ }
1065
+ ],
1066
+ initialData: initialData,
1067
+ onChange: function (api, details) {
1068
+ if (details.name === 'findtext' && currentSearchState.get().count > 0) {
1069
+ reset(api);
1070
+ }
1071
+ },
1072
+ onAction: function (api, details) {
1073
+ var data = api.getData();
1074
+ switch (details.name) {
1075
+ case 'find':
1076
+ doFind(api);
1077
+ break;
1078
+ case 'replace':
1079
+ if (!replace(editor, currentSearchState, data.replacetext)) {
1080
+ reset(api);
1081
+ } else {
1082
+ updateButtonStates(api);
1083
+ }
1084
+ break;
1085
+ case 'replaceall':
1086
+ replace(editor, currentSearchState, data.replacetext, true, true);
1087
+ reset(api);
1088
+ break;
1089
+ case 'prev':
1090
+ prev(editor, currentSearchState);
1091
+ updateButtonStates(api);
1092
+ break;
1093
+ case 'next':
1094
+ next(editor, currentSearchState);
1095
+ updateButtonStates(api);
1096
+ break;
1097
+ case 'matchcase':
1098
+ case 'wholewords':
1099
+ case 'inselection':
1100
+ updateSearchState(api);
1101
+ reset(api);
1102
+ break;
1103
+ }
1104
+ focusButtonIfRequired(api, details.name);
1105
+ },
1106
+ onSubmit: function (api) {
1107
+ doFind(api);
1108
+ focusButtonIfRequired(api, 'find');
1109
+ },
1110
+ onClose: function () {
1111
+ editor.focus();
1112
+ done(editor, currentSearchState);
1113
+ editor.undoManager.add();
1114
+ }
1115
+ };
1116
+ dialogApi.set(editor.windowManager.open(spec, { inline: 'toolbar' }));
1117
+ };
1118
+
1119
+ var register = function (editor, currentSearchState) {
1120
+ editor.addCommand('SearchReplace', function () {
1121
+ open(editor, currentSearchState);
1122
+ });
1123
+ };
1124
+
1125
+ var showDialog = function (editor, currentSearchState) {
1126
+ return function () {
1127
+ open(editor, currentSearchState);
1128
+ };
1129
+ };
1130
+ var register$1 = function (editor, currentSearchState) {
1131
+ editor.ui.registry.addMenuItem('searchreplace', {
1132
+ text: 'Find and replace...',
1133
+ shortcut: 'Meta+F',
1134
+ onAction: showDialog(editor, currentSearchState),
1135
+ icon: 'search'
1136
+ });
1137
+ editor.ui.registry.addButton('searchreplace', {
1138
+ tooltip: 'Find and replace',
1139
+ onAction: showDialog(editor, currentSearchState),
1140
+ icon: 'search'
1141
+ });
1142
+ editor.shortcuts.add('Meta+F', '', showDialog(editor, currentSearchState));
1143
+ };
1144
+
1145
+ function Plugin () {
1146
+ global.add('searchreplace', function (editor) {
1147
+ var currentSearchState = Cell({
1148
+ index: -1,
1149
+ count: 0,
1150
+ text: '',
1151
+ matchCase: false,
1152
+ wholeWord: false,
1153
+ inSelection: false
1154
+ });
1155
+ register(editor, currentSearchState);
1156
+ register$1(editor, currentSearchState);
1157
+ return get$1(editor, currentSearchState);
1158
+ });
1159
+ }
1160
+
1161
+ Plugin();
1162
+
1163
+ }());