argous 1.2.202 → 1.2.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ConfirmModal/ModalProvider.d.ts +1 -1
- package/dist/components/Editor/Events.d.ts +9 -7
- package/dist/components/Editor/Events.js +0 -7
- package/dist/components/Editor/ScriptLoader2.d.ts +10 -0
- package/dist/components/Editor/ScriptLoader2.js +146 -0
- package/dist/components/Editor/TinyMCE.d.ts +1 -8
- package/dist/components/Editor/TinyMCE.js +2 -10
- package/dist/components/Editor/Utils.d.ts +2 -7
- package/dist/components/Editor/Utils.js +29 -9
- package/dist/components/Editor/components/Editor.d.ts +17 -16
- package/dist/components/Editor/components/Editor.js +94 -51
- package/dist/components/Editor/components/EditorPropTypes.d.ts +1 -8
- package/dist/components/Editor/components/EditorPropTypes.js +19 -9
- package/dist/components/Editor/index.d.ts +2 -9
- package/dist/components/Editor/index.js +0 -7
- package/dist/components/Editor/skins/content/dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/dark/content.js +3 -0
- package/dist/components/Editor/skins/content/default/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/default/content.js +3 -0
- package/dist/components/Editor/skins/content/document/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/document/content.js +3 -0
- package/dist/components/Editor/skins/content/tinymce-5/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/tinymce-5/content.js +3 -0
- package/dist/components/Editor/skins/content/tinymce-5-dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/tinymce-5-dark/content.js +3 -0
- package/dist/components/Editor/skins/content/writer/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/writer/content.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/content.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/skin.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +3 -0
- package/dist/components/Editor/tinymce/tinymce.d.ts +1722 -1447
- package/lib/components/Editor/Events.ts +9 -8
- package/lib/components/Editor/ScriptLoader2.ts +161 -0
- package/lib/components/Editor/TinyMCE.ts +2 -12
- package/lib/components/Editor/Utils.ts +25 -8
- package/lib/components/Editor/components/Editor.tsx +102 -79
- package/lib/components/Editor/components/EditorPropTypes.ts +21 -12
- package/lib/components/Editor/index.tsx +2 -10
- package/lib/components/Editor/skins/content/dark/content.js +2 -0
- package/lib/components/Editor/skins/content/dark/content.min.css +1 -8
- package/lib/components/Editor/skins/content/default/content.js +2 -0
- package/lib/components/Editor/skins/content/default/content.min.css +0 -7
- package/lib/components/Editor/skins/content/document/content.js +2 -0
- package/lib/components/Editor/skins/content/document/content.min.css +0 -7
- package/lib/components/Editor/skins/content/tinymce-5/content.js +2 -0
- package/lib/components/Editor/skins/content/tinymce-5/content.min.css +1 -0
- package/lib/components/Editor/skins/content/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/lib/components/Editor/skins/content/writer/content.js +2 -0
- package/lib/components/Editor/skins/content/writer/content.min.css +0 -7
- package/lib/components/Editor/skins/ui/oxide/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide/content.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide/skin.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/tinymce/README.md +24 -14
- package/lib/components/Editor/tinymce/icons/default/icons.js +185 -163
- package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -1
- package/lib/components/Editor/tinymce/langs/README.md +1 -1
- package/lib/components/Editor/tinymce/license.txt +21 -504
- package/lib/components/Editor/tinymce/models/dom/model.js +8040 -0
- package/lib/components/Editor/tinymce/models/dom/model.min.js +4 -0
- package/lib/components/Editor/tinymce/plugins/accordion/plugin.js +1054 -0
- package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +4 -0
- package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +187 -208
- package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +82 -84
- package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +210 -167
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +118 -97
- package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +129 -108
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +285 -333
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/code/plugin.js +19 -26
- package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2225 -2094
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +318 -243
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +1 -9424
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +1 -9423
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +406 -416
- package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +821 -604
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/plugin.js +428 -403
- package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/image/plugin.js +887 -1043
- package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +163 -162
- package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +101 -91
- package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/link/plugin.js +739 -784
- package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/lists/plugin.js +1282 -1396
- package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/media/plugin.js +641 -806
- package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +76 -54
- package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +58 -46
- package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/preview/plugin.js +39 -69
- package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +307 -349
- package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/save/plugin.js +50 -51
- package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +517 -587
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/table/plugin.js +2666 -10142
- package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/template/plugin.js +403 -413
- package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +42 -48
- package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +352 -333
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +184 -195
- package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/skins/content/dark/content.css +2 -8
- package/lib/components/Editor/tinymce/skins/content/dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +2 -8
- package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/content/default/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/default/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/content/document/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/document/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.min.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -1
- package/lib/components/Editor/{skins/content/default → tinymce/skins/content/tinymce-5}/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css.map +1 -0
- package/lib/components/Editor/{skins/content/dark → tinymce/skins/content/tinymce-5-dark}/content.css +1 -7
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/writer/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +74 -21
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +74 -21
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +1131 -402
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +72 -20
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +74 -21
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +1155 -423
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -1
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.css +75 -22
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.inline.css +75 -22
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.css +1261 -438
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.css +73 -21
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.inline.css +75 -22
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.css +1244 -421
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/tinymce/themes/silver/theme.js +23228 -24955
- package/lib/components/Editor/tinymce/themes/silver/theme.min.js +2 -7
- package/lib/components/Editor/tinymce/tinymce.d.ts +1722 -1447
- package/lib/components/Editor/tinymce/tinymce.js +23668 -22018
- package/lib/components/Editor/tinymce/tinymce.min.js +2 -30104
- package/package.json +1 -1
- package/lib/components/Editor/ScriptLoader.ts +0 -96
- package/lib/components/Editor/skins/content/dark/content.min.css.map +0 -1
- package/lib/components/Editor/skins/content/default/content.min.css.map +0 -1
- package/lib/components/Editor/skins/content/document/content.css +0 -72
- package/lib/components/Editor/skins/content/document/content.min.css.map +0 -1
- package/lib/components/Editor/skins/content/writer/content.css +0 -68
- package/lib/components/Editor/skins/content/writer/content.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/content.inline.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/content.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/content.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/content.mobile.css +0 -29
- package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/dark/skin.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/skin.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/skin.mobile.css +0 -673
- package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/content.inline.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/content.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/content.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/content.mobile.css +0 -29
- package/lib/components/Editor/skins/ui/default/content.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/default/skin.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/skin.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/skin.mobile.css +0 -673
- package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +0 -1641
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +0 -8
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +0 -1
- package/lib/components/Editor/tinymce/jquery.tinymce.min.js +0 -92
- package/lib/components/Editor/tinymce/langs/pt_BR.js +0 -419
- package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -99
- package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.js +0 -22
- package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.js +0 -22
- package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -544
- package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/hr/plugin.js +0 -46
- package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1354
- package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -199
- package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -117
- package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/paste/plugin.js +0 -1764
- package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/print/plugin.js +0 -53
- package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -731
- package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -129
- package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/textcolor/plugin.js +0 -22
- package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1394
- package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/toc/plugin.js +0 -236
- package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +0 -29
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +0 -673
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/themes/mobile/theme.js +0 -13587
- package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +0 -9
|
@@ -1,79 +1,223 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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)
|
|
2
|
+
* TinyMCE version 6.8.2 (2023-12-11)
|
|
8
3
|
*/
|
|
4
|
+
|
|
9
5
|
(function () {
|
|
10
6
|
'use strict';
|
|
11
7
|
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
8
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
+
|
|
10
|
+
const eq = t => a => t === a;
|
|
11
|
+
const isNull = eq(null);
|
|
12
|
+
const isUndefined = eq(undefined);
|
|
13
|
+
const isNullable = a => a === null || a === undefined;
|
|
14
|
+
const isNonNullable = a => !isNullable(a);
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
var getEmoticonDatabase = function (editor) {
|
|
16
|
-
return editor.getParam('emoticons_database', 'emojis', 'string');
|
|
16
|
+
const noop = () => {
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const constant = value => {
|
|
19
|
+
return () => {
|
|
20
|
+
return value;
|
|
21
|
+
};
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
const never = constant(false);
|
|
24
|
+
|
|
25
|
+
class Optional {
|
|
26
|
+
constructor(tag, value) {
|
|
27
|
+
this.tag = tag;
|
|
28
|
+
this.value = value;
|
|
29
|
+
}
|
|
30
|
+
static some(value) {
|
|
31
|
+
return new Optional(true, value);
|
|
32
|
+
}
|
|
33
|
+
static none() {
|
|
34
|
+
return Optional.singletonNone;
|
|
35
|
+
}
|
|
36
|
+
fold(onNone, onSome) {
|
|
37
|
+
if (this.tag) {
|
|
38
|
+
return onSome(this.value);
|
|
39
|
+
} else {
|
|
40
|
+
return onNone();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
isSome() {
|
|
44
|
+
return this.tag;
|
|
45
|
+
}
|
|
46
|
+
isNone() {
|
|
47
|
+
return !this.tag;
|
|
48
|
+
}
|
|
49
|
+
map(mapper) {
|
|
50
|
+
if (this.tag) {
|
|
51
|
+
return Optional.some(mapper(this.value));
|
|
52
|
+
} else {
|
|
53
|
+
return Optional.none();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
bind(binder) {
|
|
57
|
+
if (this.tag) {
|
|
58
|
+
return binder(this.value);
|
|
59
|
+
} else {
|
|
60
|
+
return Optional.none();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exists(predicate) {
|
|
64
|
+
return this.tag && predicate(this.value);
|
|
65
|
+
}
|
|
66
|
+
forall(predicate) {
|
|
67
|
+
return !this.tag || predicate(this.value);
|
|
68
|
+
}
|
|
69
|
+
filter(predicate) {
|
|
70
|
+
if (!this.tag || predicate(this.value)) {
|
|
71
|
+
return this;
|
|
72
|
+
} else {
|
|
73
|
+
return Optional.none();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
getOr(replacement) {
|
|
77
|
+
return this.tag ? this.value : replacement;
|
|
78
|
+
}
|
|
79
|
+
or(replacement) {
|
|
80
|
+
return this.tag ? this : replacement;
|
|
81
|
+
}
|
|
82
|
+
getOrThunk(thunk) {
|
|
83
|
+
return this.tag ? this.value : thunk();
|
|
84
|
+
}
|
|
85
|
+
orThunk(thunk) {
|
|
86
|
+
return this.tag ? this : thunk();
|
|
87
|
+
}
|
|
88
|
+
getOrDie(message) {
|
|
89
|
+
if (!this.tag) {
|
|
90
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
91
|
+
} else {
|
|
92
|
+
return this.value;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
static from(value) {
|
|
96
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
97
|
+
}
|
|
98
|
+
getOrNull() {
|
|
99
|
+
return this.tag ? this.value : null;
|
|
100
|
+
}
|
|
101
|
+
getOrUndefined() {
|
|
102
|
+
return this.value;
|
|
103
|
+
}
|
|
104
|
+
each(worker) {
|
|
105
|
+
if (this.tag) {
|
|
106
|
+
worker(this.value);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
toArray() {
|
|
110
|
+
return this.tag ? [this.value] : [];
|
|
111
|
+
}
|
|
112
|
+
toString() {
|
|
113
|
+
return this.tag ? `some(${ this.value })` : 'none()';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
Optional.singletonNone = new Optional(false);
|
|
117
|
+
|
|
118
|
+
const exists = (xs, pred) => {
|
|
119
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
120
|
+
const x = xs[i];
|
|
121
|
+
if (pred(x, i)) {
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return false;
|
|
24
126
|
};
|
|
25
|
-
|
|
26
|
-
|
|
127
|
+
const map$1 = (xs, f) => {
|
|
128
|
+
const len = xs.length;
|
|
129
|
+
const r = new Array(len);
|
|
130
|
+
for (let i = 0; i < len; i++) {
|
|
131
|
+
const x = xs[i];
|
|
132
|
+
r[i] = f(x, i);
|
|
133
|
+
}
|
|
134
|
+
return r;
|
|
27
135
|
};
|
|
28
|
-
|
|
29
|
-
|
|
136
|
+
const each$1 = (xs, f) => {
|
|
137
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
138
|
+
const x = xs[i];
|
|
139
|
+
f(x, i);
|
|
140
|
+
}
|
|
30
141
|
};
|
|
31
142
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
143
|
+
const Cell = initial => {
|
|
144
|
+
let value = initial;
|
|
145
|
+
const get = () => {
|
|
146
|
+
return value;
|
|
147
|
+
};
|
|
148
|
+
const set = v => {
|
|
149
|
+
value = v;
|
|
150
|
+
};
|
|
151
|
+
return {
|
|
152
|
+
get,
|
|
153
|
+
set
|
|
41
154
|
};
|
|
42
|
-
return __assign.apply(this, arguments);
|
|
43
155
|
};
|
|
44
156
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
157
|
+
const last = (fn, rate) => {
|
|
158
|
+
let timer = null;
|
|
159
|
+
const cancel = () => {
|
|
160
|
+
if (!isNull(timer)) {
|
|
161
|
+
clearTimeout(timer);
|
|
162
|
+
timer = null;
|
|
163
|
+
}
|
|
49
164
|
};
|
|
50
|
-
|
|
51
|
-
|
|
165
|
+
const throttle = (...args) => {
|
|
166
|
+
cancel();
|
|
167
|
+
timer = setTimeout(() => {
|
|
168
|
+
timer = null;
|
|
169
|
+
fn.apply(null, args);
|
|
170
|
+
}, rate);
|
|
52
171
|
};
|
|
53
172
|
return {
|
|
54
|
-
|
|
55
|
-
|
|
173
|
+
cancel,
|
|
174
|
+
throttle
|
|
56
175
|
};
|
|
57
176
|
};
|
|
58
177
|
|
|
59
|
-
|
|
60
|
-
|
|
178
|
+
const insertEmoticon = (editor, ch) => {
|
|
179
|
+
editor.insertContent(ch);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const keys = Object.keys;
|
|
183
|
+
const hasOwnProperty = Object.hasOwnProperty;
|
|
184
|
+
const each = (obj, f) => {
|
|
185
|
+
const props = keys(obj);
|
|
186
|
+
for (let k = 0, len = props.length; k < len; k++) {
|
|
187
|
+
const i = props[k];
|
|
188
|
+
const x = obj[i];
|
|
189
|
+
f(x, i);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const map = (obj, f) => {
|
|
193
|
+
return tupleMap(obj, (x, i) => ({
|
|
194
|
+
k: i,
|
|
195
|
+
v: f(x, i)
|
|
196
|
+
}));
|
|
197
|
+
};
|
|
198
|
+
const tupleMap = (obj, f) => {
|
|
199
|
+
const r = {};
|
|
200
|
+
each(obj, (x, i) => {
|
|
201
|
+
const tuple = f(x, i);
|
|
202
|
+
r[tuple.k] = tuple.v;
|
|
203
|
+
});
|
|
204
|
+
return r;
|
|
205
|
+
};
|
|
206
|
+
const has = (obj, key) => hasOwnProperty.call(obj, key);
|
|
207
|
+
|
|
208
|
+
const shallow = (old, nu) => {
|
|
61
209
|
return nu;
|
|
62
210
|
};
|
|
63
|
-
|
|
64
|
-
return
|
|
65
|
-
var objects = [];
|
|
66
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
67
|
-
objects[_i] = arguments[_i];
|
|
68
|
-
}
|
|
211
|
+
const baseMerge = merger => {
|
|
212
|
+
return (...objects) => {
|
|
69
213
|
if (objects.length === 0) {
|
|
70
|
-
throw new Error(
|
|
214
|
+
throw new Error(`Can't merge zero objects`);
|
|
71
215
|
}
|
|
72
|
-
|
|
73
|
-
for (
|
|
74
|
-
|
|
75
|
-
for (
|
|
76
|
-
if (
|
|
216
|
+
const ret = {};
|
|
217
|
+
for (let j = 0; j < objects.length; j++) {
|
|
218
|
+
const curObject = objects[j];
|
|
219
|
+
for (const key in curObject) {
|
|
220
|
+
if (has(curObject, key)) {
|
|
77
221
|
ret[key] = merger(ret[key], curObject[key]);
|
|
78
222
|
}
|
|
79
223
|
}
|
|
@@ -81,172 +225,85 @@
|
|
|
81
225
|
return ret;
|
|
82
226
|
};
|
|
83
227
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
var noop = function () {
|
|
87
|
-
};
|
|
88
|
-
var constant = function (value) {
|
|
89
|
-
return function () {
|
|
90
|
-
return value;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
var never = constant(false);
|
|
94
|
-
var always = constant(true);
|
|
228
|
+
const merge = baseMerge(shallow);
|
|
95
229
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
var call = function (thunk) {
|
|
104
|
-
return thunk();
|
|
105
|
-
};
|
|
106
|
-
var id = function (n) {
|
|
107
|
-
return n;
|
|
108
|
-
};
|
|
109
|
-
var me = {
|
|
110
|
-
fold: function (n, _s) {
|
|
111
|
-
return n();
|
|
112
|
-
},
|
|
113
|
-
is: never,
|
|
114
|
-
isSome: never,
|
|
115
|
-
isNone: always,
|
|
116
|
-
getOr: id,
|
|
117
|
-
getOrThunk: call,
|
|
118
|
-
getOrDie: function (msg) {
|
|
119
|
-
throw new Error(msg || 'error: getOrDie called on none.');
|
|
120
|
-
},
|
|
121
|
-
getOrNull: constant(null),
|
|
122
|
-
getOrUndefined: constant(undefined),
|
|
123
|
-
or: id,
|
|
124
|
-
orThunk: call,
|
|
125
|
-
map: none,
|
|
126
|
-
each: noop,
|
|
127
|
-
bind: none,
|
|
128
|
-
exists: never,
|
|
129
|
-
forall: always,
|
|
130
|
-
filter: none,
|
|
131
|
-
equals: eq,
|
|
132
|
-
equals_: eq,
|
|
133
|
-
toArray: function () {
|
|
134
|
-
return [];
|
|
135
|
-
},
|
|
136
|
-
toString: constant('none()')
|
|
137
|
-
};
|
|
138
|
-
return me;
|
|
139
|
-
}();
|
|
140
|
-
var some = function (a) {
|
|
141
|
-
var constant_a = constant(a);
|
|
142
|
-
var self = function () {
|
|
143
|
-
return me;
|
|
230
|
+
const singleton = doRevoke => {
|
|
231
|
+
const subject = Cell(Optional.none());
|
|
232
|
+
const revoke = () => subject.get().each(doRevoke);
|
|
233
|
+
const clear = () => {
|
|
234
|
+
revoke();
|
|
235
|
+
subject.set(Optional.none());
|
|
144
236
|
};
|
|
145
|
-
|
|
146
|
-
|
|
237
|
+
const isSet = () => subject.get().isSome();
|
|
238
|
+
const get = () => subject.get();
|
|
239
|
+
const set = s => {
|
|
240
|
+
revoke();
|
|
241
|
+
subject.set(Optional.some(s));
|
|
147
242
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return a === v;
|
|
154
|
-
},
|
|
155
|
-
isSome: always,
|
|
156
|
-
isNone: never,
|
|
157
|
-
getOr: constant_a,
|
|
158
|
-
getOrThunk: constant_a,
|
|
159
|
-
getOrDie: constant_a,
|
|
160
|
-
getOrNull: constant_a,
|
|
161
|
-
getOrUndefined: constant_a,
|
|
162
|
-
or: self,
|
|
163
|
-
orThunk: self,
|
|
164
|
-
map: function (f) {
|
|
165
|
-
return some(f(a));
|
|
166
|
-
},
|
|
167
|
-
each: function (f) {
|
|
168
|
-
f(a);
|
|
169
|
-
},
|
|
170
|
-
bind: bind,
|
|
171
|
-
exists: bind,
|
|
172
|
-
forall: bind,
|
|
173
|
-
filter: function (f) {
|
|
174
|
-
return f(a) ? me : NONE;
|
|
175
|
-
},
|
|
176
|
-
toArray: function () {
|
|
177
|
-
return [a];
|
|
178
|
-
},
|
|
179
|
-
toString: function () {
|
|
180
|
-
return 'some(' + a + ')';
|
|
181
|
-
},
|
|
182
|
-
equals: function (o) {
|
|
183
|
-
return o.is(a);
|
|
184
|
-
},
|
|
185
|
-
equals_: function (o, elementEq) {
|
|
186
|
-
return o.fold(never, function (b) {
|
|
187
|
-
return elementEq(a, b);
|
|
188
|
-
});
|
|
189
|
-
}
|
|
243
|
+
return {
|
|
244
|
+
clear,
|
|
245
|
+
isSet,
|
|
246
|
+
get,
|
|
247
|
+
set
|
|
190
248
|
};
|
|
191
|
-
return me;
|
|
192
249
|
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
250
|
+
const value = () => {
|
|
251
|
+
const subject = singleton(noop);
|
|
252
|
+
const on = f => subject.get().each(f);
|
|
253
|
+
return {
|
|
254
|
+
...subject,
|
|
255
|
+
on
|
|
256
|
+
};
|
|
200
257
|
};
|
|
201
258
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
f(x, i);
|
|
259
|
+
const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
|
260
|
+
const contains = (str, substr, start = 0, end) => {
|
|
261
|
+
const idx = str.indexOf(substr, start);
|
|
262
|
+
if (idx !== -1) {
|
|
263
|
+
return isUndefined(end) ? true : idx + substr.length <= end;
|
|
264
|
+
} else {
|
|
265
|
+
return false;
|
|
210
266
|
}
|
|
211
267
|
};
|
|
212
|
-
|
|
213
|
-
return tupleMap(obj, function (x, i) {
|
|
214
|
-
return {
|
|
215
|
-
k: i,
|
|
216
|
-
v: f(x, i)
|
|
217
|
-
};
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
var tupleMap = function (obj, f) {
|
|
221
|
-
var r = {};
|
|
222
|
-
each(obj, function (x, i) {
|
|
223
|
-
var tuple = f(x, i);
|
|
224
|
-
r[tuple.k] = tuple.v;
|
|
225
|
-
});
|
|
226
|
-
return r;
|
|
227
|
-
};
|
|
228
|
-
var has = function (obj, key) {
|
|
229
|
-
return hasOwnProperty$1.call(obj, key);
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
var checkRange = function (str, substr, start) {
|
|
233
|
-
return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
|
|
234
|
-
};
|
|
235
|
-
var contains = function (str, substr) {
|
|
236
|
-
return str.indexOf(substr) !== -1;
|
|
237
|
-
};
|
|
238
|
-
var startsWith = function (str, prefix) {
|
|
268
|
+
const startsWith = (str, prefix) => {
|
|
239
269
|
return checkRange(str, prefix, 0);
|
|
240
270
|
};
|
|
241
271
|
|
|
242
|
-
var global
|
|
272
|
+
var global = tinymce.util.Tools.resolve('tinymce.Resource');
|
|
243
273
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
274
|
+
const DEFAULT_ID = 'tinymce.plugins.emoticons';
|
|
275
|
+
const option = name => editor => editor.options.get(name);
|
|
276
|
+
const register$2 = (editor, pluginUrl) => {
|
|
277
|
+
const registerOption = editor.options.register;
|
|
278
|
+
registerOption('emoticons_database', {
|
|
279
|
+
processor: 'string',
|
|
280
|
+
default: 'emojis'
|
|
281
|
+
});
|
|
282
|
+
registerOption('emoticons_database_url', {
|
|
283
|
+
processor: 'string',
|
|
284
|
+
default: `${ pluginUrl }/js/${ getEmojiDatabase(editor) }${ editor.suffix }.js`
|
|
285
|
+
});
|
|
286
|
+
registerOption('emoticons_database_id', {
|
|
287
|
+
processor: 'string',
|
|
288
|
+
default: DEFAULT_ID
|
|
289
|
+
});
|
|
290
|
+
registerOption('emoticons_append', {
|
|
291
|
+
processor: 'object',
|
|
292
|
+
default: {}
|
|
293
|
+
});
|
|
294
|
+
registerOption('emoticons_images_url', {
|
|
295
|
+
processor: 'string',
|
|
296
|
+
default: 'https://twemoji.maxcdn.com/v/13.0.1/72x72/'
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
const getEmojiDatabase = option('emoticons_database');
|
|
300
|
+
const getEmojiDatabaseUrl = option('emoticons_database_url');
|
|
301
|
+
const getEmojiDatabaseId = option('emoticons_database_id');
|
|
302
|
+
const getAppendedEmoji = option('emoticons_append');
|
|
303
|
+
const getEmojiImageUrl = option('emoticons_images_url');
|
|
247
304
|
|
|
248
|
-
|
|
249
|
-
|
|
305
|
+
const ALL_CATEGORY = 'All';
|
|
306
|
+
const categoryNameMap = {
|
|
250
307
|
symbols: 'Symbols',
|
|
251
308
|
people: 'People',
|
|
252
309
|
animals_and_nature: 'Animals and Nature',
|
|
@@ -257,87 +314,76 @@
|
|
|
257
314
|
flags: 'Flags',
|
|
258
315
|
user: 'User Defined'
|
|
259
316
|
};
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
var all = Cell(Optional.none());
|
|
275
|
-
var emojiImagesUrl = getEmotionsImageUrl(editor);
|
|
276
|
-
var getEmoji = function (lib) {
|
|
317
|
+
const translateCategory = (categories, name) => has(categories, name) ? categories[name] : name;
|
|
318
|
+
const getUserDefinedEmoji = editor => {
|
|
319
|
+
const userDefinedEmoticons = getAppendedEmoji(editor);
|
|
320
|
+
return map(userDefinedEmoticons, value => ({
|
|
321
|
+
keywords: [],
|
|
322
|
+
category: 'user',
|
|
323
|
+
...value
|
|
324
|
+
}));
|
|
325
|
+
};
|
|
326
|
+
const initDatabase = (editor, databaseUrl, databaseId) => {
|
|
327
|
+
const categories = value();
|
|
328
|
+
const all = value();
|
|
329
|
+
const emojiImagesUrl = getEmojiImageUrl(editor);
|
|
330
|
+
const getEmoji = lib => {
|
|
277
331
|
if (startsWith(lib.char, '<img')) {
|
|
278
|
-
return lib.char.replace(/src="([^"]+)"/,
|
|
279
|
-
return 'src="' + emojiImagesUrl + url + '"';
|
|
280
|
-
});
|
|
332
|
+
return lib.char.replace(/src="([^"]+)"/, (match, url) => `src="${ emojiImagesUrl }${ url }"`);
|
|
281
333
|
} else {
|
|
282
334
|
return lib.char;
|
|
283
335
|
}
|
|
284
336
|
};
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
each(emojis,
|
|
289
|
-
|
|
290
|
-
title
|
|
337
|
+
const processEmojis = emojis => {
|
|
338
|
+
const cats = {};
|
|
339
|
+
const everything = [];
|
|
340
|
+
each(emojis, (lib, title) => {
|
|
341
|
+
const entry = {
|
|
342
|
+
title,
|
|
291
343
|
keywords: lib.keywords,
|
|
292
344
|
char: getEmoji(lib),
|
|
293
345
|
category: translateCategory(categoryNameMap, lib.category)
|
|
294
346
|
};
|
|
295
|
-
|
|
347
|
+
const current = cats[entry.category] !== undefined ? cats[entry.category] : [];
|
|
296
348
|
cats[entry.category] = current.concat([entry]);
|
|
297
349
|
everything.push(entry);
|
|
298
350
|
});
|
|
299
|
-
categories.set(
|
|
300
|
-
all.set(
|
|
351
|
+
categories.set(cats);
|
|
352
|
+
all.set(everything);
|
|
301
353
|
};
|
|
302
|
-
editor.on('init',
|
|
303
|
-
global
|
|
304
|
-
|
|
354
|
+
editor.on('init', () => {
|
|
355
|
+
global.load(databaseId, databaseUrl).then(emojis => {
|
|
356
|
+
const userEmojis = getUserDefinedEmoji(editor);
|
|
305
357
|
processEmojis(merge(emojis, userEmojis));
|
|
306
|
-
},
|
|
307
|
-
console.log(
|
|
308
|
-
categories.set(
|
|
309
|
-
all.set(
|
|
358
|
+
}, err => {
|
|
359
|
+
console.log(`Failed to load emojis: ${ err }`);
|
|
360
|
+
categories.set({});
|
|
361
|
+
all.set([]);
|
|
310
362
|
});
|
|
311
363
|
});
|
|
312
|
-
|
|
364
|
+
const listCategory = category => {
|
|
313
365
|
if (category === ALL_CATEGORY) {
|
|
314
366
|
return listAll();
|
|
315
367
|
}
|
|
316
|
-
return categories.get().bind(
|
|
317
|
-
return Optional.from(cats[category]);
|
|
318
|
-
}).getOr([]);
|
|
319
|
-
};
|
|
320
|
-
var listAll = function () {
|
|
321
|
-
return all.get().getOr([]);
|
|
368
|
+
return categories.get().bind(cats => Optional.from(cats[category])).getOr([]);
|
|
322
369
|
};
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
var waitForLoad = function () {
|
|
370
|
+
const listAll = () => all.get().getOr([]);
|
|
371
|
+
const listCategories = () => [ALL_CATEGORY].concat(keys(categories.get().getOr({})));
|
|
372
|
+
const waitForLoad = () => {
|
|
327
373
|
if (hasLoaded()) {
|
|
328
|
-
return
|
|
374
|
+
return Promise.resolve(true);
|
|
329
375
|
} else {
|
|
330
|
-
return new
|
|
331
|
-
|
|
332
|
-
|
|
376
|
+
return new Promise((resolve, reject) => {
|
|
377
|
+
let numRetries = 15;
|
|
378
|
+
const interval = setInterval(() => {
|
|
333
379
|
if (hasLoaded()) {
|
|
334
|
-
|
|
380
|
+
clearInterval(interval);
|
|
335
381
|
resolve(true);
|
|
336
382
|
} else {
|
|
337
383
|
numRetries--;
|
|
338
384
|
if (numRetries < 0) {
|
|
339
385
|
console.log('Could not load emojis from url: ' + databaseUrl);
|
|
340
|
-
|
|
386
|
+
clearInterval(interval);
|
|
341
387
|
reject(false);
|
|
342
388
|
}
|
|
343
389
|
}
|
|
@@ -345,70 +391,22 @@
|
|
|
345
391
|
});
|
|
346
392
|
}
|
|
347
393
|
};
|
|
348
|
-
|
|
349
|
-
return categories.get().isSome() && all.get().isSome();
|
|
350
|
-
};
|
|
394
|
+
const hasLoaded = () => categories.isSet() && all.isSet();
|
|
351
395
|
return {
|
|
352
|
-
listCategories
|
|
353
|
-
hasLoaded
|
|
354
|
-
waitForLoad
|
|
355
|
-
listAll
|
|
356
|
-
listCategory
|
|
396
|
+
listCategories,
|
|
397
|
+
hasLoaded,
|
|
398
|
+
waitForLoad,
|
|
399
|
+
listAll,
|
|
400
|
+
listCategory
|
|
357
401
|
};
|
|
358
402
|
};
|
|
359
403
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
367
|
-
return false;
|
|
368
|
-
};
|
|
369
|
-
var map$1 = function (xs, f) {
|
|
370
|
-
var len = xs.length;
|
|
371
|
-
var r = new Array(len);
|
|
372
|
-
for (var i = 0; i < len; i++) {
|
|
373
|
-
var x = xs[i];
|
|
374
|
-
r[i] = f(x, i);
|
|
375
|
-
}
|
|
376
|
-
return r;
|
|
377
|
-
};
|
|
378
|
-
var each$1 = function (xs, f) {
|
|
379
|
-
for (var i = 0, len = xs.length; i < len; i++) {
|
|
380
|
-
var x = xs[i];
|
|
381
|
-
f(x, i);
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
var setup = function (editor) {
|
|
386
|
-
editor.on('PreInit', function () {
|
|
387
|
-
editor.parser.addAttributeFilter('data-emoticon', function (nodes) {
|
|
388
|
-
each$1(nodes, function (node) {
|
|
389
|
-
node.attr('data-mce-resize', 'false');
|
|
390
|
-
node.attr('data-mce-placeholder', '1');
|
|
391
|
-
});
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
var emojiMatches = function (emoji, lowerCasePattern) {
|
|
397
|
-
return contains(emoji.title.toLowerCase(), lowerCasePattern) || exists(emoji.keywords, function (k) {
|
|
398
|
-
return contains(k.toLowerCase(), lowerCasePattern);
|
|
399
|
-
});
|
|
400
|
-
};
|
|
401
|
-
var emojisFrom = function (list, pattern, maxResults) {
|
|
402
|
-
var matches = [];
|
|
403
|
-
var lowerCasePattern = pattern.toLowerCase();
|
|
404
|
-
var reachedLimit = maxResults.fold(function () {
|
|
405
|
-
return never;
|
|
406
|
-
}, function (max) {
|
|
407
|
-
return function (size) {
|
|
408
|
-
return size >= max;
|
|
409
|
-
};
|
|
410
|
-
});
|
|
411
|
-
for (var i = 0; i < list.length; i++) {
|
|
404
|
+
const emojiMatches = (emoji, lowerCasePattern) => contains(emoji.title.toLowerCase(), lowerCasePattern) || exists(emoji.keywords, k => contains(k.toLowerCase(), lowerCasePattern));
|
|
405
|
+
const emojisFrom = (list, pattern, maxResults) => {
|
|
406
|
+
const matches = [];
|
|
407
|
+
const lowerCasePattern = pattern.toLowerCase();
|
|
408
|
+
const reachedLimit = maxResults.fold(() => never, max => size => size >= max);
|
|
409
|
+
for (let i = 0; i < list.length; i++) {
|
|
412
410
|
if (pattern.length === 0 || emojiMatches(list[i], lowerCasePattern)) {
|
|
413
411
|
matches.push({
|
|
414
412
|
value: list[i].char,
|
|
@@ -423,107 +421,55 @@
|
|
|
423
421
|
return matches;
|
|
424
422
|
};
|
|
425
423
|
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
columns: 'auto',
|
|
430
|
-
minChars: 2,
|
|
431
|
-
fetch: function (pattern, maxResults) {
|
|
432
|
-
return database.waitForLoad().then(function () {
|
|
433
|
-
var candidates = database.listAll();
|
|
434
|
-
return emojisFrom(candidates, pattern, Optional.some(maxResults));
|
|
435
|
-
});
|
|
436
|
-
},
|
|
437
|
-
onAction: function (autocompleteApi, rng, value) {
|
|
438
|
-
editor.selection.setRng(rng);
|
|
439
|
-
editor.insertContent(value);
|
|
440
|
-
autocompleteApi.hide();
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
var last = function (fn, rate) {
|
|
446
|
-
var timer = null;
|
|
447
|
-
var cancel = function () {
|
|
448
|
-
if (timer !== null) {
|
|
449
|
-
clearTimeout(timer);
|
|
450
|
-
timer = null;
|
|
451
|
-
}
|
|
452
|
-
};
|
|
453
|
-
var throttle = function () {
|
|
454
|
-
var args = [];
|
|
455
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
456
|
-
args[_i] = arguments[_i];
|
|
457
|
-
}
|
|
458
|
-
if (timer !== null) {
|
|
459
|
-
clearTimeout(timer);
|
|
460
|
-
}
|
|
461
|
-
timer = setTimeout(function () {
|
|
462
|
-
fn.apply(null, args);
|
|
463
|
-
timer = null;
|
|
464
|
-
}, rate);
|
|
465
|
-
};
|
|
466
|
-
return {
|
|
467
|
-
cancel: cancel,
|
|
468
|
-
throttle: throttle
|
|
469
|
-
};
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
var insertEmoticon = function (editor, ch) {
|
|
473
|
-
editor.insertContent(ch);
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
var patternName = 'pattern';
|
|
477
|
-
var open = function (editor, database) {
|
|
478
|
-
var initialState = {
|
|
424
|
+
const patternName = 'pattern';
|
|
425
|
+
const open = (editor, database) => {
|
|
426
|
+
const initialState = {
|
|
479
427
|
pattern: '',
|
|
480
428
|
results: emojisFrom(database.listAll(), '', Optional.some(300))
|
|
481
429
|
};
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
dialogApi.setData({ results
|
|
430
|
+
const currentTab = Cell(ALL_CATEGORY);
|
|
431
|
+
const scan = dialogApi => {
|
|
432
|
+
const dialogData = dialogApi.getData();
|
|
433
|
+
const category = currentTab.get();
|
|
434
|
+
const candidates = database.listCategory(category);
|
|
435
|
+
const results = emojisFrom(candidates, dialogData[patternName], category === ALL_CATEGORY ? Optional.some(300) : Optional.none());
|
|
436
|
+
dialogApi.setData({ results });
|
|
489
437
|
};
|
|
490
|
-
|
|
438
|
+
const updateFilter = last(dialogApi => {
|
|
491
439
|
scan(dialogApi);
|
|
492
440
|
}, 200);
|
|
493
|
-
|
|
441
|
+
const searchField = {
|
|
494
442
|
label: 'Search',
|
|
495
443
|
type: 'input',
|
|
496
444
|
name: patternName
|
|
497
445
|
};
|
|
498
|
-
|
|
446
|
+
const resultsField = {
|
|
499
447
|
type: 'collection',
|
|
500
448
|
name: 'results'
|
|
501
449
|
};
|
|
502
|
-
|
|
503
|
-
|
|
450
|
+
const getInitialState = () => {
|
|
451
|
+
const body = {
|
|
504
452
|
type: 'tabpanel',
|
|
505
|
-
tabs: map$1(database.listCategories(),
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
};
|
|
514
|
-
})
|
|
453
|
+
tabs: map$1(database.listCategories(), cat => ({
|
|
454
|
+
title: cat,
|
|
455
|
+
name: cat,
|
|
456
|
+
items: [
|
|
457
|
+
searchField,
|
|
458
|
+
resultsField
|
|
459
|
+
]
|
|
460
|
+
}))
|
|
515
461
|
};
|
|
516
462
|
return {
|
|
517
|
-
title: '
|
|
463
|
+
title: 'Emojis',
|
|
518
464
|
size: 'normal',
|
|
519
|
-
body
|
|
465
|
+
body,
|
|
520
466
|
initialData: initialState,
|
|
521
|
-
onTabChange:
|
|
467
|
+
onTabChange: (dialogApi, details) => {
|
|
522
468
|
currentTab.set(details.newTabName);
|
|
523
469
|
updateFilter.throttle(dialogApi);
|
|
524
470
|
},
|
|
525
471
|
onChange: updateFilter.throttle,
|
|
526
|
-
onAction:
|
|
472
|
+
onAction: (dialogApi, actionData) => {
|
|
527
473
|
if (actionData.name === 'results') {
|
|
528
474
|
insertEmoticon(editor, actionData.value);
|
|
529
475
|
dialogApi.close();
|
|
@@ -536,25 +482,25 @@
|
|
|
536
482
|
}]
|
|
537
483
|
};
|
|
538
484
|
};
|
|
539
|
-
|
|
485
|
+
const dialogApi = editor.windowManager.open(getInitialState());
|
|
540
486
|
dialogApi.focus(patternName);
|
|
541
487
|
if (!database.hasLoaded()) {
|
|
542
|
-
dialogApi.block('Loading
|
|
543
|
-
database.waitForLoad().then(
|
|
488
|
+
dialogApi.block('Loading emojis...');
|
|
489
|
+
database.waitForLoad().then(() => {
|
|
544
490
|
dialogApi.redial(getInitialState());
|
|
545
491
|
updateFilter.throttle(dialogApi);
|
|
546
492
|
dialogApi.focus(patternName);
|
|
547
493
|
dialogApi.unblock();
|
|
548
|
-
}).catch(
|
|
494
|
+
}).catch(_err => {
|
|
549
495
|
dialogApi.redial({
|
|
550
|
-
title: '
|
|
496
|
+
title: 'Emojis',
|
|
551
497
|
body: {
|
|
552
498
|
type: 'panel',
|
|
553
499
|
items: [{
|
|
554
500
|
type: 'alertbanner',
|
|
555
501
|
level: 'error',
|
|
556
502
|
icon: 'warning',
|
|
557
|
-
text: '
|
|
503
|
+
text: 'Could not load emojis'
|
|
558
504
|
}]
|
|
559
505
|
},
|
|
560
506
|
buttons: [{
|
|
@@ -573,33 +519,77 @@
|
|
|
573
519
|
}
|
|
574
520
|
};
|
|
575
521
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
522
|
+
const register$1 = (editor, database) => {
|
|
523
|
+
editor.addCommand('mceEmoticons', () => open(editor, database));
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
const setup = editor => {
|
|
527
|
+
editor.on('PreInit', () => {
|
|
528
|
+
editor.parser.addAttributeFilter('data-emoticon', nodes => {
|
|
529
|
+
each$1(nodes, node => {
|
|
530
|
+
node.attr('data-mce-resize', 'false');
|
|
531
|
+
node.attr('data-mce-placeholder', '1');
|
|
532
|
+
});
|
|
533
|
+
});
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
|
|
537
|
+
const init = (editor, database) => {
|
|
538
|
+
editor.ui.registry.addAutocompleter('emoticons', {
|
|
539
|
+
trigger: ':',
|
|
540
|
+
columns: 'auto',
|
|
541
|
+
minChars: 2,
|
|
542
|
+
fetch: (pattern, maxResults) => database.waitForLoad().then(() => {
|
|
543
|
+
const candidates = database.listAll();
|
|
544
|
+
return emojisFrom(candidates, pattern, Optional.some(maxResults));
|
|
545
|
+
}),
|
|
546
|
+
onAction: (autocompleteApi, rng, value) => {
|
|
547
|
+
editor.selection.setRng(rng);
|
|
548
|
+
editor.insertContent(value);
|
|
549
|
+
autocompleteApi.hide();
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
const onSetupEditable = editor => api => {
|
|
555
|
+
const nodeChanged = () => {
|
|
556
|
+
api.setEnabled(editor.selection.isEditable());
|
|
557
|
+
};
|
|
558
|
+
editor.on('NodeChange', nodeChanged);
|
|
559
|
+
nodeChanged();
|
|
560
|
+
return () => {
|
|
561
|
+
editor.off('NodeChange', nodeChanged);
|
|
579
562
|
};
|
|
563
|
+
};
|
|
564
|
+
const register = editor => {
|
|
565
|
+
const onAction = () => editor.execCommand('mceEmoticons');
|
|
580
566
|
editor.ui.registry.addButton('emoticons', {
|
|
581
|
-
tooltip: '
|
|
567
|
+
tooltip: 'Emojis',
|
|
582
568
|
icon: 'emoji',
|
|
583
|
-
onAction
|
|
569
|
+
onAction,
|
|
570
|
+
onSetup: onSetupEditable(editor)
|
|
584
571
|
});
|
|
585
572
|
editor.ui.registry.addMenuItem('emoticons', {
|
|
586
|
-
text: '
|
|
573
|
+
text: 'Emojis...',
|
|
587
574
|
icon: 'emoji',
|
|
588
|
-
onAction
|
|
575
|
+
onAction,
|
|
576
|
+
onSetup: onSetupEditable(editor)
|
|
589
577
|
});
|
|
590
578
|
};
|
|
591
579
|
|
|
592
|
-
|
|
593
|
-
global.add('emoticons',
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
580
|
+
var Plugin = () => {
|
|
581
|
+
global$1.add('emoticons', (editor, pluginUrl) => {
|
|
582
|
+
register$2(editor, pluginUrl);
|
|
583
|
+
const databaseUrl = getEmojiDatabaseUrl(editor);
|
|
584
|
+
const databaseId = getEmojiDatabaseId(editor);
|
|
585
|
+
const database = initDatabase(editor, databaseUrl, databaseId);
|
|
586
|
+
register$1(editor, database);
|
|
587
|
+
register(editor);
|
|
598
588
|
init(editor, database);
|
|
599
589
|
setup(editor);
|
|
600
590
|
});
|
|
601
|
-
}
|
|
591
|
+
};
|
|
602
592
|
|
|
603
593
|
Plugin();
|
|
604
594
|
|
|
605
|
-
}()
|
|
595
|
+
})();
|