argous 1.2.202 → 1.2.203
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/components/Editor.d.ts +4 -4
- package/dist/components/Editor/components/Editor.js +3 -3
- 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/components/Editor.tsx +8 -8
- 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/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,294 +1,271 @@
|
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
const Cell = initial => {
|
|
9
|
+
let value = initial;
|
|
10
|
+
const get = () => {
|
|
15
11
|
return value;
|
|
16
12
|
};
|
|
17
|
-
|
|
13
|
+
const set = v => {
|
|
18
14
|
value = v;
|
|
19
15
|
};
|
|
20
16
|
return {
|
|
21
|
-
get
|
|
22
|
-
set
|
|
17
|
+
get,
|
|
18
|
+
set
|
|
23
19
|
};
|
|
24
20
|
};
|
|
25
21
|
|
|
26
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
22
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
return {
|
|
30
|
-
isFullscreen: function () {
|
|
31
|
-
return fullscreenState.get() !== null;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
};
|
|
24
|
+
const get$5 = fullscreenState => ({ isFullscreen: () => fullscreenState.get() !== null });
|
|
35
25
|
|
|
36
|
-
|
|
37
|
-
var
|
|
26
|
+
const hasProto = (v, constructor, predicate) => {
|
|
27
|
+
var _a;
|
|
28
|
+
if (predicate(v, constructor.prototype)) {
|
|
29
|
+
return true;
|
|
30
|
+
} else {
|
|
31
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const typeOf = x => {
|
|
35
|
+
const t = typeof x;
|
|
38
36
|
if (x === null) {
|
|
39
37
|
return 'null';
|
|
40
|
-
} else if (t === 'object' &&
|
|
38
|
+
} else if (t === 'object' && Array.isArray(x)) {
|
|
41
39
|
return 'array';
|
|
42
|
-
} else if (t === 'object' && (String
|
|
40
|
+
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
43
41
|
return 'string';
|
|
44
42
|
} else {
|
|
45
43
|
return t;
|
|
46
44
|
}
|
|
47
45
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var isBoolean = isSimpleType('boolean');
|
|
61
|
-
var isNullable = function (a) {
|
|
62
|
-
return a === null || a === undefined;
|
|
63
|
-
};
|
|
64
|
-
var isNonNullable = function (a) {
|
|
65
|
-
return !isNullable(a);
|
|
66
|
-
};
|
|
67
|
-
var isFunction = isSimpleType('function');
|
|
68
|
-
var isNumber = isSimpleType('number');
|
|
46
|
+
const isType$1 = type => value => typeOf(value) === type;
|
|
47
|
+
const isSimpleType = type => value => typeof value === type;
|
|
48
|
+
const eq$1 = t => a => t === a;
|
|
49
|
+
const isString = isType$1('string');
|
|
50
|
+
const isArray = isType$1('array');
|
|
51
|
+
const isNull = eq$1(null);
|
|
52
|
+
const isBoolean = isSimpleType('boolean');
|
|
53
|
+
const isUndefined = eq$1(undefined);
|
|
54
|
+
const isNullable = a => a === null || a === undefined;
|
|
55
|
+
const isNonNullable = a => !isNullable(a);
|
|
56
|
+
const isFunction = isSimpleType('function');
|
|
57
|
+
const isNumber = isSimpleType('number');
|
|
69
58
|
|
|
70
|
-
|
|
59
|
+
const noop = () => {
|
|
71
60
|
};
|
|
72
|
-
|
|
73
|
-
return
|
|
74
|
-
var args = [];
|
|
75
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
76
|
-
args[_i] = arguments[_i];
|
|
77
|
-
}
|
|
61
|
+
const compose = (fa, fb) => {
|
|
62
|
+
return (...args) => {
|
|
78
63
|
return fa(fb.apply(null, args));
|
|
79
64
|
};
|
|
80
65
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
var constant = function (value) {
|
|
87
|
-
return function () {
|
|
66
|
+
const compose1 = (fbc, fab) => a => fbc(fab(a));
|
|
67
|
+
const constant = value => {
|
|
68
|
+
return () => {
|
|
88
69
|
return value;
|
|
89
70
|
};
|
|
90
71
|
};
|
|
91
|
-
function curry(fn) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
initialArgs[_i - 1] = arguments[_i];
|
|
95
|
-
}
|
|
96
|
-
return function () {
|
|
97
|
-
var restArgs = [];
|
|
98
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
99
|
-
restArgs[_i] = arguments[_i];
|
|
100
|
-
}
|
|
101
|
-
var all = initialArgs.concat(restArgs);
|
|
72
|
+
function curry(fn, ...initialArgs) {
|
|
73
|
+
return (...restArgs) => {
|
|
74
|
+
const all = initialArgs.concat(restArgs);
|
|
102
75
|
return fn.apply(null, all);
|
|
103
76
|
};
|
|
104
77
|
}
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
const never = constant(false);
|
|
79
|
+
const always = constant(true);
|
|
107
80
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return
|
|
124
|
-
},
|
|
125
|
-
is: never,
|
|
126
|
-
isSome: never,
|
|
127
|
-
isNone: always,
|
|
128
|
-
getOr: id,
|
|
129
|
-
getOrThunk: call,
|
|
130
|
-
getOrDie: function (msg) {
|
|
131
|
-
throw new Error(msg || 'error: getOrDie called on none.');
|
|
132
|
-
},
|
|
133
|
-
getOrNull: constant(null),
|
|
134
|
-
getOrUndefined: constant(undefined),
|
|
135
|
-
or: id,
|
|
136
|
-
orThunk: call,
|
|
137
|
-
map: none,
|
|
138
|
-
each: noop,
|
|
139
|
-
bind: none,
|
|
140
|
-
exists: never,
|
|
141
|
-
forall: always,
|
|
142
|
-
filter: none,
|
|
143
|
-
equals: eq,
|
|
144
|
-
equals_: eq,
|
|
145
|
-
toArray: function () {
|
|
146
|
-
return [];
|
|
147
|
-
},
|
|
148
|
-
toString: constant('none()')
|
|
149
|
-
};
|
|
150
|
-
return me;
|
|
151
|
-
}();
|
|
152
|
-
var some = function (a) {
|
|
153
|
-
var constant_a = constant(a);
|
|
154
|
-
var self = function () {
|
|
155
|
-
return me;
|
|
156
|
-
};
|
|
157
|
-
var bind = function (f) {
|
|
158
|
-
return f(a);
|
|
159
|
-
};
|
|
160
|
-
var me = {
|
|
161
|
-
fold: function (n, s) {
|
|
162
|
-
return s(a);
|
|
163
|
-
},
|
|
164
|
-
is: function (v) {
|
|
165
|
-
return a === v;
|
|
166
|
-
},
|
|
167
|
-
isSome: always,
|
|
168
|
-
isNone: never,
|
|
169
|
-
getOr: constant_a,
|
|
170
|
-
getOrThunk: constant_a,
|
|
171
|
-
getOrDie: constant_a,
|
|
172
|
-
getOrNull: constant_a,
|
|
173
|
-
getOrUndefined: constant_a,
|
|
174
|
-
or: self,
|
|
175
|
-
orThunk: self,
|
|
176
|
-
map: function (f) {
|
|
177
|
-
return some(f(a));
|
|
178
|
-
},
|
|
179
|
-
each: function (f) {
|
|
180
|
-
f(a);
|
|
181
|
-
},
|
|
182
|
-
bind: bind,
|
|
183
|
-
exists: bind,
|
|
184
|
-
forall: bind,
|
|
185
|
-
filter: function (f) {
|
|
186
|
-
return f(a) ? me : NONE;
|
|
187
|
-
},
|
|
188
|
-
toArray: function () {
|
|
189
|
-
return [a];
|
|
190
|
-
},
|
|
191
|
-
toString: function () {
|
|
192
|
-
return 'some(' + a + ')';
|
|
193
|
-
},
|
|
194
|
-
equals: function (o) {
|
|
195
|
-
return o.is(a);
|
|
196
|
-
},
|
|
197
|
-
equals_: function (o, elementEq) {
|
|
198
|
-
return o.fold(never, function (b) {
|
|
199
|
-
return elementEq(a, b);
|
|
200
|
-
});
|
|
81
|
+
class Optional {
|
|
82
|
+
constructor(tag, value) {
|
|
83
|
+
this.tag = tag;
|
|
84
|
+
this.value = value;
|
|
85
|
+
}
|
|
86
|
+
static some(value) {
|
|
87
|
+
return new Optional(true, value);
|
|
88
|
+
}
|
|
89
|
+
static none() {
|
|
90
|
+
return Optional.singletonNone;
|
|
91
|
+
}
|
|
92
|
+
fold(onNone, onSome) {
|
|
93
|
+
if (this.tag) {
|
|
94
|
+
return onSome(this.value);
|
|
95
|
+
} else {
|
|
96
|
+
return onNone();
|
|
201
97
|
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
98
|
+
}
|
|
99
|
+
isSome() {
|
|
100
|
+
return this.tag;
|
|
101
|
+
}
|
|
102
|
+
isNone() {
|
|
103
|
+
return !this.tag;
|
|
104
|
+
}
|
|
105
|
+
map(mapper) {
|
|
106
|
+
if (this.tag) {
|
|
107
|
+
return Optional.some(mapper(this.value));
|
|
108
|
+
} else {
|
|
109
|
+
return Optional.none();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
bind(binder) {
|
|
113
|
+
if (this.tag) {
|
|
114
|
+
return binder(this.value);
|
|
115
|
+
} else {
|
|
116
|
+
return Optional.none();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exists(predicate) {
|
|
120
|
+
return this.tag && predicate(this.value);
|
|
121
|
+
}
|
|
122
|
+
forall(predicate) {
|
|
123
|
+
return !this.tag || predicate(this.value);
|
|
124
|
+
}
|
|
125
|
+
filter(predicate) {
|
|
126
|
+
if (!this.tag || predicate(this.value)) {
|
|
127
|
+
return this;
|
|
128
|
+
} else {
|
|
129
|
+
return Optional.none();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
getOr(replacement) {
|
|
133
|
+
return this.tag ? this.value : replacement;
|
|
134
|
+
}
|
|
135
|
+
or(replacement) {
|
|
136
|
+
return this.tag ? this : replacement;
|
|
137
|
+
}
|
|
138
|
+
getOrThunk(thunk) {
|
|
139
|
+
return this.tag ? this.value : thunk();
|
|
140
|
+
}
|
|
141
|
+
orThunk(thunk) {
|
|
142
|
+
return this.tag ? this : thunk();
|
|
143
|
+
}
|
|
144
|
+
getOrDie(message) {
|
|
145
|
+
if (!this.tag) {
|
|
146
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
147
|
+
} else {
|
|
148
|
+
return this.value;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
static from(value) {
|
|
152
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
153
|
+
}
|
|
154
|
+
getOrNull() {
|
|
155
|
+
return this.tag ? this.value : null;
|
|
156
|
+
}
|
|
157
|
+
getOrUndefined() {
|
|
158
|
+
return this.value;
|
|
159
|
+
}
|
|
160
|
+
each(worker) {
|
|
161
|
+
if (this.tag) {
|
|
162
|
+
worker(this.value);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
toArray() {
|
|
166
|
+
return this.tag ? [this.value] : [];
|
|
167
|
+
}
|
|
168
|
+
toString() {
|
|
169
|
+
return this.tag ? `some(${ this.value })` : 'none()';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
Optional.singletonNone = new Optional(false);
|
|
213
173
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
};
|
|
219
|
-
var clear = function () {
|
|
174
|
+
const singleton = doRevoke => {
|
|
175
|
+
const subject = Cell(Optional.none());
|
|
176
|
+
const revoke = () => subject.get().each(doRevoke);
|
|
177
|
+
const clear = () => {
|
|
220
178
|
revoke();
|
|
221
179
|
subject.set(Optional.none());
|
|
222
180
|
};
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
var set = function (s) {
|
|
181
|
+
const isSet = () => subject.get().isSome();
|
|
182
|
+
const get = () => subject.get();
|
|
183
|
+
const set = s => {
|
|
227
184
|
revoke();
|
|
228
185
|
subject.set(Optional.some(s));
|
|
229
186
|
};
|
|
230
187
|
return {
|
|
231
|
-
clear
|
|
232
|
-
isSet
|
|
233
|
-
|
|
188
|
+
clear,
|
|
189
|
+
isSet,
|
|
190
|
+
get,
|
|
191
|
+
set
|
|
234
192
|
};
|
|
235
193
|
};
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
var clear = function () {
|
|
244
|
-
return subject.set(Optional.none());
|
|
245
|
-
};
|
|
246
|
-
var set = function (s) {
|
|
247
|
-
return subject.set(Optional.some(s));
|
|
194
|
+
const unbindable = () => singleton(s => s.unbind());
|
|
195
|
+
const value = () => {
|
|
196
|
+
const subject = singleton(noop);
|
|
197
|
+
const on = f => subject.get().each(f);
|
|
198
|
+
return {
|
|
199
|
+
...subject,
|
|
200
|
+
on
|
|
248
201
|
};
|
|
249
|
-
|
|
250
|
-
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const first = (fn, rate) => {
|
|
205
|
+
let timer = null;
|
|
206
|
+
const cancel = () => {
|
|
207
|
+
if (!isNull(timer)) {
|
|
208
|
+
clearTimeout(timer);
|
|
209
|
+
timer = null;
|
|
210
|
+
}
|
|
251
211
|
};
|
|
252
|
-
|
|
253
|
-
|
|
212
|
+
const throttle = (...args) => {
|
|
213
|
+
if (isNull(timer)) {
|
|
214
|
+
timer = setTimeout(() => {
|
|
215
|
+
timer = null;
|
|
216
|
+
fn.apply(null, args);
|
|
217
|
+
}, rate);
|
|
218
|
+
}
|
|
254
219
|
};
|
|
255
220
|
return {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
isSet: isSet,
|
|
259
|
-
on: on
|
|
221
|
+
cancel,
|
|
222
|
+
throttle
|
|
260
223
|
};
|
|
261
224
|
};
|
|
262
225
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
for (
|
|
268
|
-
|
|
226
|
+
const nativePush = Array.prototype.push;
|
|
227
|
+
const map = (xs, f) => {
|
|
228
|
+
const len = xs.length;
|
|
229
|
+
const r = new Array(len);
|
|
230
|
+
for (let i = 0; i < len; i++) {
|
|
231
|
+
const x = xs[i];
|
|
269
232
|
r[i] = f(x, i);
|
|
270
233
|
}
|
|
271
234
|
return r;
|
|
272
235
|
};
|
|
273
|
-
|
|
274
|
-
for (
|
|
275
|
-
|
|
236
|
+
const each$1 = (xs, f) => {
|
|
237
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
238
|
+
const x = xs[i];
|
|
276
239
|
f(x, i);
|
|
277
240
|
}
|
|
278
241
|
};
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
for (
|
|
282
|
-
|
|
242
|
+
const filter$1 = (xs, pred) => {
|
|
243
|
+
const r = [];
|
|
244
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
245
|
+
const x = xs[i];
|
|
283
246
|
if (pred(x, i)) {
|
|
284
247
|
r.push(x);
|
|
285
248
|
}
|
|
286
249
|
}
|
|
287
250
|
return r;
|
|
288
251
|
};
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
252
|
+
const findUntil = (xs, pred, until) => {
|
|
253
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
254
|
+
const x = xs[i];
|
|
255
|
+
if (pred(x, i)) {
|
|
256
|
+
return Optional.some(x);
|
|
257
|
+
} else if (until(x, i)) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return Optional.none();
|
|
262
|
+
};
|
|
263
|
+
const find$1 = (xs, pred) => {
|
|
264
|
+
return findUntil(xs, pred, never);
|
|
265
|
+
};
|
|
266
|
+
const flatten = xs => {
|
|
267
|
+
const r = [];
|
|
268
|
+
for (let i = 0, len = xs.length; i < len; ++i) {
|
|
292
269
|
if (!isArray(xs[i])) {
|
|
293
270
|
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
|
294
271
|
}
|
|
@@ -296,93 +273,96 @@
|
|
|
296
273
|
}
|
|
297
274
|
return r;
|
|
298
275
|
};
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
276
|
+
const bind$3 = (xs, f) => flatten(map(xs, f));
|
|
277
|
+
const get$4 = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();
|
|
278
|
+
const head = xs => get$4(xs, 0);
|
|
279
|
+
const findMap = (arr, f) => {
|
|
280
|
+
for (let i = 0; i < arr.length; i++) {
|
|
281
|
+
const r = f(arr[i], i);
|
|
282
|
+
if (r.isSome()) {
|
|
283
|
+
return r;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return Optional.none();
|
|
307
287
|
};
|
|
308
288
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
for (
|
|
313
|
-
|
|
314
|
-
|
|
289
|
+
const keys = Object.keys;
|
|
290
|
+
const each = (obj, f) => {
|
|
291
|
+
const props = keys(obj);
|
|
292
|
+
for (let k = 0, len = props.length; k < len; k++) {
|
|
293
|
+
const i = props[k];
|
|
294
|
+
const x = obj[i];
|
|
315
295
|
f(x, i);
|
|
316
296
|
}
|
|
317
297
|
};
|
|
318
298
|
|
|
319
|
-
|
|
320
|
-
|
|
299
|
+
const contains = (str, substr, start = 0, end) => {
|
|
300
|
+
const idx = str.indexOf(substr, start);
|
|
301
|
+
if (idx !== -1) {
|
|
302
|
+
return isUndefined(end) ? true : idx + substr.length <= end;
|
|
303
|
+
} else {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
321
306
|
};
|
|
322
307
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
308
|
+
const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);
|
|
309
|
+
|
|
310
|
+
const fromHtml = (html, scope) => {
|
|
311
|
+
const doc = scope || document;
|
|
312
|
+
const div = doc.createElement('div');
|
|
326
313
|
div.innerHTML = html;
|
|
327
314
|
if (!div.hasChildNodes() || div.childNodes.length > 1) {
|
|
328
|
-
|
|
329
|
-
|
|
315
|
+
const message = 'HTML does not have a single root node';
|
|
316
|
+
console.error(message, html);
|
|
317
|
+
throw new Error(message);
|
|
330
318
|
}
|
|
331
319
|
return fromDom(div.childNodes[0]);
|
|
332
320
|
};
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
321
|
+
const fromTag = (tag, scope) => {
|
|
322
|
+
const doc = scope || document;
|
|
323
|
+
const node = doc.createElement(tag);
|
|
336
324
|
return fromDom(node);
|
|
337
325
|
};
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
326
|
+
const fromText = (text, scope) => {
|
|
327
|
+
const doc = scope || document;
|
|
328
|
+
const node = doc.createTextNode(text);
|
|
341
329
|
return fromDom(node);
|
|
342
330
|
};
|
|
343
|
-
|
|
331
|
+
const fromDom = node => {
|
|
344
332
|
if (node === null || node === undefined) {
|
|
345
333
|
throw new Error('Node cannot be null or undefined');
|
|
346
334
|
}
|
|
347
335
|
return { dom: node };
|
|
348
336
|
};
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
fromDom: fromDom,
|
|
357
|
-
fromPoint: fromPoint
|
|
337
|
+
const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
|
|
338
|
+
const SugarElement = {
|
|
339
|
+
fromHtml,
|
|
340
|
+
fromTag,
|
|
341
|
+
fromText,
|
|
342
|
+
fromDom,
|
|
343
|
+
fromPoint
|
|
358
344
|
};
|
|
359
345
|
|
|
360
|
-
|
|
346
|
+
typeof window !== 'undefined' ? window : Function('return this;')();
|
|
361
347
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
348
|
+
const DOCUMENT = 9;
|
|
349
|
+
const DOCUMENT_FRAGMENT = 11;
|
|
350
|
+
const ELEMENT = 1;
|
|
351
|
+
const TEXT = 3;
|
|
366
352
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
};
|
|
374
|
-
};
|
|
375
|
-
var isElement = isType$1(ELEMENT);
|
|
376
|
-
var isText = isType$1(TEXT);
|
|
377
|
-
var isDocument = isType$1(DOCUMENT);
|
|
378
|
-
var isDocumentFragment = isType$1(DOCUMENT_FRAGMENT);
|
|
353
|
+
const type = element => element.dom.nodeType;
|
|
354
|
+
const isType = t => element => type(element) === t;
|
|
355
|
+
const isElement = isType(ELEMENT);
|
|
356
|
+
const isText = isType(TEXT);
|
|
357
|
+
const isDocument = isType(DOCUMENT);
|
|
358
|
+
const isDocumentFragment = isType(DOCUMENT_FRAGMENT);
|
|
379
359
|
|
|
380
|
-
|
|
381
|
-
|
|
360
|
+
const is = (element, selector) => {
|
|
361
|
+
const dom = element.dom;
|
|
382
362
|
if (dom.nodeType !== ELEMENT) {
|
|
383
363
|
return false;
|
|
384
364
|
} else {
|
|
385
|
-
|
|
365
|
+
const elem = dom;
|
|
386
366
|
if (elem.matches !== undefined) {
|
|
387
367
|
return elem.matches(selector);
|
|
388
368
|
} else if (elem.msMatchesSelector !== undefined) {
|
|
@@ -396,34 +376,24 @@
|
|
|
396
376
|
}
|
|
397
377
|
}
|
|
398
378
|
};
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
var all = function (selector, scope) {
|
|
403
|
-
var base = scope === undefined ? document : scope.dom;
|
|
379
|
+
const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
|
|
380
|
+
const all$1 = (selector, scope) => {
|
|
381
|
+
const base = scope === undefined ? document : scope.dom;
|
|
404
382
|
return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);
|
|
405
383
|
};
|
|
406
384
|
|
|
407
|
-
|
|
408
|
-
return e1.dom === e2.dom;
|
|
409
|
-
};
|
|
385
|
+
const eq = (e1, e2) => e1.dom === e2.dom;
|
|
410
386
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
|
419
|
-
};
|
|
420
|
-
var parents = function (element, isRoot) {
|
|
421
|
-
var stop = isFunction(isRoot) ? isRoot : never;
|
|
422
|
-
var dom = element.dom;
|
|
423
|
-
var ret = [];
|
|
387
|
+
const owner = element => SugarElement.fromDom(element.dom.ownerDocument);
|
|
388
|
+
const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);
|
|
389
|
+
const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
|
|
390
|
+
const parents = (element, isRoot) => {
|
|
391
|
+
const stop = isFunction(isRoot) ? isRoot : never;
|
|
392
|
+
let dom = element.dom;
|
|
393
|
+
const ret = [];
|
|
424
394
|
while (dom.parentNode !== null && dom.parentNode !== undefined) {
|
|
425
|
-
|
|
426
|
-
|
|
395
|
+
const rawParent = dom.parentNode;
|
|
396
|
+
const p = SugarElement.fromDom(rawParent);
|
|
427
397
|
ret.push(p);
|
|
428
398
|
if (stop(p) === true) {
|
|
429
399
|
break;
|
|
@@ -433,39 +403,27 @@
|
|
|
433
403
|
}
|
|
434
404
|
return ret;
|
|
435
405
|
};
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
return filter(elements, function (x) {
|
|
439
|
-
return !eq(element, x);
|
|
440
|
-
});
|
|
441
|
-
};
|
|
406
|
+
const siblings$2 = element => {
|
|
407
|
+
const filterSelf = elements => filter$1(elements, x => !eq(element, x));
|
|
442
408
|
return parent(element).map(children).map(filterSelf).getOr([]);
|
|
443
409
|
};
|
|
444
|
-
|
|
445
|
-
return map(element.dom.childNodes, SugarElement.fromDom);
|
|
446
|
-
};
|
|
410
|
+
const children = element => map(element.dom.childNodes, SugarElement.fromDom);
|
|
447
411
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
return SugarElement.fromDom(e.dom.getRootNode());
|
|
455
|
-
} : documentOrOwner;
|
|
456
|
-
var getShadowRoot = function (e) {
|
|
457
|
-
var r = getRootNode(e);
|
|
412
|
+
const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);
|
|
413
|
+
const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);
|
|
414
|
+
const isSupported = constant(supported);
|
|
415
|
+
const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;
|
|
416
|
+
const getShadowRoot = e => {
|
|
417
|
+
const r = getRootNode(e);
|
|
458
418
|
return isShadowRoot(r) ? Optional.some(r) : Optional.none();
|
|
459
419
|
};
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
if (isSupported$1() && isNonNullable(event.target)) {
|
|
465
|
-
var el = SugarElement.fromDom(event.target);
|
|
420
|
+
const getShadowHost = e => SugarElement.fromDom(e.dom.host);
|
|
421
|
+
const getOriginalEventTarget = event => {
|
|
422
|
+
if (isSupported() && isNonNullable(event.target)) {
|
|
423
|
+
const el = SugarElement.fromDom(event.target);
|
|
466
424
|
if (isElement(el) && isOpenShadowHost(el)) {
|
|
467
425
|
if (event.composed && event.composedPath) {
|
|
468
|
-
|
|
426
|
+
const composedPath = event.composedPath();
|
|
469
427
|
if (composedPath) {
|
|
470
428
|
return head(composedPath);
|
|
471
429
|
}
|
|
@@ -474,29 +432,25 @@
|
|
|
474
432
|
}
|
|
475
433
|
return Optional.from(event.target);
|
|
476
434
|
};
|
|
477
|
-
|
|
478
|
-
return isNonNullable(element.dom.shadowRoot);
|
|
479
|
-
};
|
|
435
|
+
const isOpenShadowHost = element => isNonNullable(element.dom.shadowRoot);
|
|
480
436
|
|
|
481
|
-
|
|
482
|
-
|
|
437
|
+
const inBody = element => {
|
|
438
|
+
const dom = isText(element) ? element.dom.parentNode : element.dom;
|
|
483
439
|
if (dom === undefined || dom === null || dom.ownerDocument === null) {
|
|
484
440
|
return false;
|
|
485
441
|
}
|
|
486
|
-
|
|
487
|
-
return getShadowRoot(SugarElement.fromDom(dom)).fold(
|
|
488
|
-
return doc.body.contains(dom);
|
|
489
|
-
}, compose1(inBody, getShadowHost));
|
|
442
|
+
const doc = dom.ownerDocument;
|
|
443
|
+
return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));
|
|
490
444
|
};
|
|
491
|
-
|
|
492
|
-
|
|
445
|
+
const getBody = doc => {
|
|
446
|
+
const b = doc.dom.body;
|
|
493
447
|
if (b === null || b === undefined) {
|
|
494
448
|
throw new Error('Body is not available yet');
|
|
495
449
|
}
|
|
496
450
|
return SugarElement.fromDom(b);
|
|
497
451
|
};
|
|
498
452
|
|
|
499
|
-
|
|
453
|
+
const rawSet = (dom, key, value) => {
|
|
500
454
|
if (isString(value) || isBoolean(value) || isNumber(value)) {
|
|
501
455
|
dom.setAttribute(key, value + '');
|
|
502
456
|
} else {
|
|
@@ -504,171 +458,476 @@
|
|
|
504
458
|
throw new Error('Attribute value was not simple');
|
|
505
459
|
}
|
|
506
460
|
};
|
|
507
|
-
|
|
461
|
+
const set = (element, key, value) => {
|
|
508
462
|
rawSet(element.dom, key, value);
|
|
509
463
|
};
|
|
510
|
-
|
|
511
|
-
|
|
464
|
+
const get$3 = (element, key) => {
|
|
465
|
+
const v = element.dom.getAttribute(key);
|
|
512
466
|
return v === null ? undefined : v;
|
|
513
467
|
};
|
|
514
|
-
|
|
468
|
+
const remove = (element, key) => {
|
|
515
469
|
element.dom.removeAttribute(key);
|
|
516
470
|
};
|
|
517
471
|
|
|
518
|
-
|
|
472
|
+
const internalSet = (dom, property, value) => {
|
|
519
473
|
if (!isString(value)) {
|
|
520
474
|
console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);
|
|
521
475
|
throw new Error('CSS value must be a string: ' + value);
|
|
522
476
|
}
|
|
523
|
-
if (isSupported(dom)) {
|
|
477
|
+
if (isSupported$1(dom)) {
|
|
524
478
|
dom.style.setProperty(property, value);
|
|
525
479
|
}
|
|
526
480
|
};
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
each
|
|
481
|
+
const setAll = (element, css) => {
|
|
482
|
+
const dom = element.dom;
|
|
483
|
+
each(css, (v, k) => {
|
|
530
484
|
internalSet(dom, k, v);
|
|
531
485
|
});
|
|
532
486
|
};
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
487
|
+
const get$2 = (element, property) => {
|
|
488
|
+
const dom = element.dom;
|
|
489
|
+
const styles = window.getComputedStyle(dom);
|
|
490
|
+
const r = styles.getPropertyValue(property);
|
|
537
491
|
return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;
|
|
538
492
|
};
|
|
539
|
-
|
|
540
|
-
return isSupported(dom) ? dom.style.getPropertyValue(property) : '';
|
|
541
|
-
};
|
|
493
|
+
const getUnsafeProperty = (dom, property) => isSupported$1(dom) ? dom.style.getPropertyValue(property) : '';
|
|
542
494
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
return rawEvent.stopPropagation();
|
|
558
|
-
};
|
|
559
|
-
var prevent = function () {
|
|
560
|
-
return rawEvent.preventDefault();
|
|
561
|
-
};
|
|
562
|
-
var kill = compose(prevent, stop);
|
|
495
|
+
const mkEvent = (target, x, y, stop, prevent, kill, raw) => ({
|
|
496
|
+
target,
|
|
497
|
+
x,
|
|
498
|
+
y,
|
|
499
|
+
stop,
|
|
500
|
+
prevent,
|
|
501
|
+
kill,
|
|
502
|
+
raw
|
|
503
|
+
});
|
|
504
|
+
const fromRawEvent = rawEvent => {
|
|
505
|
+
const target = SugarElement.fromDom(getOriginalEventTarget(rawEvent).getOr(rawEvent.target));
|
|
506
|
+
const stop = () => rawEvent.stopPropagation();
|
|
507
|
+
const prevent = () => rawEvent.preventDefault();
|
|
508
|
+
const kill = compose(prevent, stop);
|
|
563
509
|
return mkEvent(target, rawEvent.clientX, rawEvent.clientY, stop, prevent, kill, rawEvent);
|
|
564
510
|
};
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
}
|
|
570
|
-
};
|
|
511
|
+
const handle = (filter, handler) => rawEvent => {
|
|
512
|
+
if (filter(rawEvent)) {
|
|
513
|
+
handler(fromRawEvent(rawEvent));
|
|
514
|
+
}
|
|
571
515
|
};
|
|
572
|
-
|
|
573
|
-
|
|
516
|
+
const binder = (element, event, filter, handler, useCapture) => {
|
|
517
|
+
const wrapped = handle(filter, handler);
|
|
574
518
|
element.dom.addEventListener(event, wrapped, useCapture);
|
|
575
519
|
return { unbind: curry(unbind, element, event, wrapped, useCapture) };
|
|
576
520
|
};
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
};
|
|
580
|
-
var unbind = function (element, event, handler, useCapture) {
|
|
521
|
+
const bind$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false);
|
|
522
|
+
const unbind = (element, event, handler, useCapture) => {
|
|
581
523
|
element.dom.removeEventListener(event, handler, useCapture);
|
|
582
524
|
};
|
|
583
525
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
return bind$1(element, event, filter$1, handler);
|
|
587
|
-
};
|
|
526
|
+
const filter = always;
|
|
527
|
+
const bind$1 = (element, event, handler) => bind$2(element, event, filter, handler);
|
|
588
528
|
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
529
|
+
const cached = f => {
|
|
530
|
+
let called = false;
|
|
531
|
+
let r;
|
|
532
|
+
return (...args) => {
|
|
533
|
+
if (!called) {
|
|
534
|
+
called = true;
|
|
535
|
+
r = f.apply(null, args);
|
|
536
|
+
}
|
|
537
|
+
return r;
|
|
592
538
|
};
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
const DeviceType = (os, browser, userAgent, mediaMatch) => {
|
|
542
|
+
const isiPad = os.isiOS() && /ipad/i.test(userAgent) === true;
|
|
543
|
+
const isiPhone = os.isiOS() && !isiPad;
|
|
544
|
+
const isMobile = os.isiOS() || os.isAndroid();
|
|
545
|
+
const isTouch = isMobile || mediaMatch('(pointer:coarse)');
|
|
546
|
+
const isTablet = isiPad || !isiPhone && isMobile && mediaMatch('(min-device-width:768px)');
|
|
547
|
+
const isPhone = isiPhone || isMobile && !isTablet;
|
|
548
|
+
const iOSwebview = browser.isSafari() && os.isiOS() && /safari/i.test(userAgent) === false;
|
|
549
|
+
const isDesktop = !isPhone && !isTablet && !iOSwebview;
|
|
593
550
|
return {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
551
|
+
isiPad: constant(isiPad),
|
|
552
|
+
isiPhone: constant(isiPhone),
|
|
553
|
+
isTablet: constant(isTablet),
|
|
554
|
+
isPhone: constant(isPhone),
|
|
555
|
+
isTouch: constant(isTouch),
|
|
556
|
+
isAndroid: os.isAndroid,
|
|
557
|
+
isiOS: os.isiOS,
|
|
558
|
+
isWebView: constant(iOSwebview),
|
|
559
|
+
isDesktop: constant(isDesktop)
|
|
597
560
|
};
|
|
598
561
|
};
|
|
599
|
-
var SugarPosition = r;
|
|
600
562
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
563
|
+
const firstMatch = (regexes, s) => {
|
|
564
|
+
for (let i = 0; i < regexes.length; i++) {
|
|
565
|
+
const x = regexes[i];
|
|
566
|
+
if (x.test(s)) {
|
|
567
|
+
return x;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return undefined;
|
|
606
571
|
};
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
572
|
+
const find = (regexes, agent) => {
|
|
573
|
+
const r = firstMatch(regexes, agent);
|
|
574
|
+
if (!r) {
|
|
575
|
+
return {
|
|
576
|
+
major: 0,
|
|
577
|
+
minor: 0
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
const group = i => {
|
|
581
|
+
return Number(agent.replace(r, '$' + i));
|
|
582
|
+
};
|
|
583
|
+
return nu$2(group(1), group(2));
|
|
611
584
|
};
|
|
612
|
-
|
|
585
|
+
const detect$3 = (versionRegexes, agent) => {
|
|
586
|
+
const cleanedAgent = String(agent).toLowerCase();
|
|
587
|
+
if (versionRegexes.length === 0) {
|
|
588
|
+
return unknown$2();
|
|
589
|
+
}
|
|
590
|
+
return find(versionRegexes, cleanedAgent);
|
|
591
|
+
};
|
|
592
|
+
const unknown$2 = () => {
|
|
593
|
+
return nu$2(0, 0);
|
|
594
|
+
};
|
|
595
|
+
const nu$2 = (major, minor) => {
|
|
613
596
|
return {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
width: width,
|
|
617
|
-
height: height,
|
|
618
|
-
right: x + width,
|
|
619
|
-
bottom: y + height
|
|
597
|
+
major,
|
|
598
|
+
minor
|
|
620
599
|
};
|
|
621
600
|
};
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
601
|
+
const Version = {
|
|
602
|
+
nu: nu$2,
|
|
603
|
+
detect: detect$3,
|
|
604
|
+
unknown: unknown$2
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
const detectBrowser$1 = (browsers, userAgentData) => {
|
|
608
|
+
return findMap(userAgentData.brands, uaBrand => {
|
|
609
|
+
const lcBrand = uaBrand.brand.toLowerCase();
|
|
610
|
+
return find$1(browsers, browser => {
|
|
611
|
+
var _a;
|
|
612
|
+
return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase());
|
|
613
|
+
}).map(info => ({
|
|
614
|
+
current: info.name,
|
|
615
|
+
version: Version.nu(parseInt(uaBrand.version, 10), 0)
|
|
616
|
+
}));
|
|
633
617
|
});
|
|
634
618
|
};
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
619
|
+
|
|
620
|
+
const detect$2 = (candidates, userAgent) => {
|
|
621
|
+
const agent = String(userAgent).toLowerCase();
|
|
622
|
+
return find$1(candidates, candidate => {
|
|
623
|
+
return candidate.search(agent);
|
|
624
|
+
});
|
|
625
|
+
};
|
|
626
|
+
const detectBrowser = (browsers, userAgent) => {
|
|
627
|
+
return detect$2(browsers, userAgent).map(browser => {
|
|
628
|
+
const version = Version.detect(browser.versionRegexes, userAgent);
|
|
629
|
+
return {
|
|
630
|
+
current: browser.name,
|
|
631
|
+
version
|
|
639
632
|
};
|
|
640
|
-
|
|
633
|
+
});
|
|
634
|
+
};
|
|
635
|
+
const detectOs = (oses, userAgent) => {
|
|
636
|
+
return detect$2(oses, userAgent).map(os => {
|
|
637
|
+
const version = Version.detect(os.versionRegexes, userAgent);
|
|
641
638
|
return {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
639
|
+
current: os.name,
|
|
640
|
+
version
|
|
645
641
|
};
|
|
646
|
-
}).getOrThunk(function () {
|
|
647
|
-
return { unbind: noop };
|
|
648
642
|
});
|
|
649
643
|
};
|
|
650
644
|
|
|
651
|
-
|
|
645
|
+
const normalVersionRegex = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/;
|
|
646
|
+
const checkContains = target => {
|
|
647
|
+
return uastring => {
|
|
648
|
+
return contains(uastring, target);
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
const browsers = [
|
|
652
|
+
{
|
|
653
|
+
name: 'Edge',
|
|
654
|
+
versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],
|
|
655
|
+
search: uastring => {
|
|
656
|
+
return contains(uastring, 'edge/') && contains(uastring, 'chrome') && contains(uastring, 'safari') && contains(uastring, 'applewebkit');
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
name: 'Chromium',
|
|
661
|
+
brand: 'Chromium',
|
|
662
|
+
versionRegexes: [
|
|
663
|
+
/.*?chrome\/([0-9]+)\.([0-9]+).*/,
|
|
664
|
+
normalVersionRegex
|
|
665
|
+
],
|
|
666
|
+
search: uastring => {
|
|
667
|
+
return contains(uastring, 'chrome') && !contains(uastring, 'chromeframe');
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
name: 'IE',
|
|
672
|
+
versionRegexes: [
|
|
673
|
+
/.*?msie\ ?([0-9]+)\.([0-9]+).*/,
|
|
674
|
+
/.*?rv:([0-9]+)\.([0-9]+).*/
|
|
675
|
+
],
|
|
676
|
+
search: uastring => {
|
|
677
|
+
return contains(uastring, 'msie') || contains(uastring, 'trident');
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
name: 'Opera',
|
|
682
|
+
versionRegexes: [
|
|
683
|
+
normalVersionRegex,
|
|
684
|
+
/.*?opera\/([0-9]+)\.([0-9]+).*/
|
|
685
|
+
],
|
|
686
|
+
search: checkContains('opera')
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
name: 'Firefox',
|
|
690
|
+
versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],
|
|
691
|
+
search: checkContains('firefox')
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
name: 'Safari',
|
|
695
|
+
versionRegexes: [
|
|
696
|
+
normalVersionRegex,
|
|
697
|
+
/.*?cpu os ([0-9]+)_([0-9]+).*/
|
|
698
|
+
],
|
|
699
|
+
search: uastring => {
|
|
700
|
+
return (contains(uastring, 'safari') || contains(uastring, 'mobile/')) && contains(uastring, 'applewebkit');
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
];
|
|
704
|
+
const oses = [
|
|
705
|
+
{
|
|
706
|
+
name: 'Windows',
|
|
707
|
+
search: checkContains('win'),
|
|
708
|
+
versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
name: 'iOS',
|
|
712
|
+
search: uastring => {
|
|
713
|
+
return contains(uastring, 'iphone') || contains(uastring, 'ipad');
|
|
714
|
+
},
|
|
715
|
+
versionRegexes: [
|
|
716
|
+
/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,
|
|
717
|
+
/.*cpu os ([0-9]+)_([0-9]+).*/,
|
|
718
|
+
/.*cpu iphone os ([0-9]+)_([0-9]+).*/
|
|
719
|
+
]
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
name: 'Android',
|
|
723
|
+
search: checkContains('android'),
|
|
724
|
+
versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/]
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
name: 'macOS',
|
|
728
|
+
search: checkContains('mac os x'),
|
|
729
|
+
versionRegexes: [/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
name: 'Linux',
|
|
733
|
+
search: checkContains('linux'),
|
|
734
|
+
versionRegexes: []
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
name: 'Solaris',
|
|
738
|
+
search: checkContains('sunos'),
|
|
739
|
+
versionRegexes: []
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: 'FreeBSD',
|
|
743
|
+
search: checkContains('freebsd'),
|
|
744
|
+
versionRegexes: []
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: 'ChromeOS',
|
|
748
|
+
search: checkContains('cros'),
|
|
749
|
+
versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/]
|
|
750
|
+
}
|
|
751
|
+
];
|
|
752
|
+
const PlatformInfo = {
|
|
753
|
+
browsers: constant(browsers),
|
|
754
|
+
oses: constant(oses)
|
|
755
|
+
};
|
|
756
|
+
|
|
757
|
+
const edge = 'Edge';
|
|
758
|
+
const chromium = 'Chromium';
|
|
759
|
+
const ie = 'IE';
|
|
760
|
+
const opera = 'Opera';
|
|
761
|
+
const firefox = 'Firefox';
|
|
762
|
+
const safari = 'Safari';
|
|
763
|
+
const unknown$1 = () => {
|
|
764
|
+
return nu$1({
|
|
765
|
+
current: undefined,
|
|
766
|
+
version: Version.unknown()
|
|
767
|
+
});
|
|
768
|
+
};
|
|
769
|
+
const nu$1 = info => {
|
|
770
|
+
const current = info.current;
|
|
771
|
+
const version = info.version;
|
|
772
|
+
const isBrowser = name => () => current === name;
|
|
773
|
+
return {
|
|
774
|
+
current,
|
|
775
|
+
version,
|
|
776
|
+
isEdge: isBrowser(edge),
|
|
777
|
+
isChromium: isBrowser(chromium),
|
|
778
|
+
isIE: isBrowser(ie),
|
|
779
|
+
isOpera: isBrowser(opera),
|
|
780
|
+
isFirefox: isBrowser(firefox),
|
|
781
|
+
isSafari: isBrowser(safari)
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
const Browser = {
|
|
785
|
+
unknown: unknown$1,
|
|
786
|
+
nu: nu$1,
|
|
787
|
+
edge: constant(edge),
|
|
788
|
+
chromium: constant(chromium),
|
|
789
|
+
ie: constant(ie),
|
|
790
|
+
opera: constant(opera),
|
|
791
|
+
firefox: constant(firefox),
|
|
792
|
+
safari: constant(safari)
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
const windows = 'Windows';
|
|
796
|
+
const ios = 'iOS';
|
|
797
|
+
const android = 'Android';
|
|
798
|
+
const linux = 'Linux';
|
|
799
|
+
const macos = 'macOS';
|
|
800
|
+
const solaris = 'Solaris';
|
|
801
|
+
const freebsd = 'FreeBSD';
|
|
802
|
+
const chromeos = 'ChromeOS';
|
|
803
|
+
const unknown = () => {
|
|
804
|
+
return nu({
|
|
805
|
+
current: undefined,
|
|
806
|
+
version: Version.unknown()
|
|
807
|
+
});
|
|
808
|
+
};
|
|
809
|
+
const nu = info => {
|
|
810
|
+
const current = info.current;
|
|
811
|
+
const version = info.version;
|
|
812
|
+
const isOS = name => () => current === name;
|
|
813
|
+
return {
|
|
814
|
+
current,
|
|
815
|
+
version,
|
|
816
|
+
isWindows: isOS(windows),
|
|
817
|
+
isiOS: isOS(ios),
|
|
818
|
+
isAndroid: isOS(android),
|
|
819
|
+
isMacOS: isOS(macos),
|
|
820
|
+
isLinux: isOS(linux),
|
|
821
|
+
isSolaris: isOS(solaris),
|
|
822
|
+
isFreeBSD: isOS(freebsd),
|
|
823
|
+
isChromeOS: isOS(chromeos)
|
|
824
|
+
};
|
|
825
|
+
};
|
|
826
|
+
const OperatingSystem = {
|
|
827
|
+
unknown,
|
|
828
|
+
nu,
|
|
829
|
+
windows: constant(windows),
|
|
830
|
+
ios: constant(ios),
|
|
831
|
+
android: constant(android),
|
|
832
|
+
linux: constant(linux),
|
|
833
|
+
macos: constant(macos),
|
|
834
|
+
solaris: constant(solaris),
|
|
835
|
+
freebsd: constant(freebsd),
|
|
836
|
+
chromeos: constant(chromeos)
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
const detect$1 = (userAgent, userAgentDataOpt, mediaMatch) => {
|
|
840
|
+
const browsers = PlatformInfo.browsers();
|
|
841
|
+
const oses = PlatformInfo.oses();
|
|
842
|
+
const browser = userAgentDataOpt.bind(userAgentData => detectBrowser$1(browsers, userAgentData)).orThunk(() => detectBrowser(browsers, userAgent)).fold(Browser.unknown, Browser.nu);
|
|
843
|
+
const os = detectOs(oses, userAgent).fold(OperatingSystem.unknown, OperatingSystem.nu);
|
|
844
|
+
const deviceType = DeviceType(os, browser, userAgent, mediaMatch);
|
|
845
|
+
return {
|
|
846
|
+
browser,
|
|
847
|
+
os,
|
|
848
|
+
deviceType
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
const PlatformDetection = { detect: detect$1 };
|
|
852
|
+
|
|
853
|
+
const mediaMatch = query => window.matchMedia(query).matches;
|
|
854
|
+
let platform = cached(() => PlatformDetection.detect(navigator.userAgent, Optional.from(navigator.userAgentData), mediaMatch));
|
|
855
|
+
const detect = () => platform();
|
|
652
856
|
|
|
653
|
-
|
|
857
|
+
const r = (left, top) => {
|
|
858
|
+
const translate = (x, y) => r(left + x, top + y);
|
|
859
|
+
return {
|
|
860
|
+
left,
|
|
861
|
+
top,
|
|
862
|
+
translate
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
const SugarPosition = r;
|
|
654
866
|
|
|
655
|
-
|
|
867
|
+
const get$1 = _DOC => {
|
|
868
|
+
const doc = _DOC !== undefined ? _DOC.dom : document;
|
|
869
|
+
const x = doc.body.scrollLeft || doc.documentElement.scrollLeft;
|
|
870
|
+
const y = doc.body.scrollTop || doc.documentElement.scrollTop;
|
|
871
|
+
return SugarPosition(x, y);
|
|
872
|
+
};
|
|
656
873
|
|
|
657
|
-
|
|
658
|
-
|
|
874
|
+
const get = _win => {
|
|
875
|
+
const win = _win === undefined ? window : _win;
|
|
876
|
+
if (detect().browser.isFirefox()) {
|
|
877
|
+
return Optional.none();
|
|
878
|
+
} else {
|
|
879
|
+
return Optional.from(win.visualViewport);
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
const bounds = (x, y, width, height) => ({
|
|
883
|
+
x,
|
|
884
|
+
y,
|
|
885
|
+
width,
|
|
886
|
+
height,
|
|
887
|
+
right: x + width,
|
|
888
|
+
bottom: y + height
|
|
889
|
+
});
|
|
890
|
+
const getBounds = _win => {
|
|
891
|
+
const win = _win === undefined ? window : _win;
|
|
892
|
+
const doc = win.document;
|
|
893
|
+
const scroll = get$1(SugarElement.fromDom(doc));
|
|
894
|
+
return get(win).fold(() => {
|
|
895
|
+
const html = win.document.documentElement;
|
|
896
|
+
const width = html.clientWidth;
|
|
897
|
+
const height = html.clientHeight;
|
|
898
|
+
return bounds(scroll.left, scroll.top, width, height);
|
|
899
|
+
}, visualViewport => bounds(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height));
|
|
659
900
|
};
|
|
901
|
+
const bind = (name, callback, _win) => get(_win).map(visualViewport => {
|
|
902
|
+
const handler = e => callback(fromRawEvent(e));
|
|
903
|
+
visualViewport.addEventListener(name, handler);
|
|
904
|
+
return { unbind: () => visualViewport.removeEventListener(name, handler) };
|
|
905
|
+
}).getOrThunk(() => ({ unbind: noop }));
|
|
660
906
|
|
|
661
|
-
var
|
|
662
|
-
|
|
907
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
908
|
+
|
|
909
|
+
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
|
910
|
+
|
|
911
|
+
const fireFullscreenStateChanged = (editor, state) => {
|
|
912
|
+
editor.dispatch('FullscreenStateChanged', { state });
|
|
913
|
+
editor.dispatch('ResizeEditor');
|
|
663
914
|
};
|
|
664
915
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
916
|
+
const option = name => editor => editor.options.get(name);
|
|
917
|
+
const register$2 = editor => {
|
|
918
|
+
const registerOption = editor.options.register;
|
|
919
|
+
registerOption('fullscreen_native', {
|
|
920
|
+
processor: 'boolean',
|
|
921
|
+
default: false
|
|
669
922
|
});
|
|
670
923
|
};
|
|
671
|
-
|
|
924
|
+
const getFullscreenNative = option('fullscreen_native');
|
|
925
|
+
|
|
926
|
+
const getFullscreenRoot = editor => {
|
|
927
|
+
const elem = SugarElement.fromDom(editor.getElement());
|
|
928
|
+
return getShadowRoot(elem).map(getShadowHost).getOrThunk(() => getBody(owner(elem)));
|
|
929
|
+
};
|
|
930
|
+
const getFullscreenElement = root => {
|
|
672
931
|
if (root.fullscreenElement !== undefined) {
|
|
673
932
|
return root.fullscreenElement;
|
|
674
933
|
} else if (root.msFullscreenElement !== undefined) {
|
|
@@ -679,7 +938,7 @@
|
|
|
679
938
|
return null;
|
|
680
939
|
}
|
|
681
940
|
};
|
|
682
|
-
|
|
941
|
+
const getFullscreenchangeEventName = () => {
|
|
683
942
|
if (document.fullscreenElement !== undefined) {
|
|
684
943
|
return 'fullscreenchange';
|
|
685
944
|
} else if (document.msFullscreenElement !== undefined) {
|
|
@@ -690,8 +949,8 @@
|
|
|
690
949
|
return 'fullscreenchange';
|
|
691
950
|
}
|
|
692
951
|
};
|
|
693
|
-
|
|
694
|
-
|
|
952
|
+
const requestFullscreen = sugarElem => {
|
|
953
|
+
const elem = sugarElem.dom;
|
|
695
954
|
if (elem.requestFullscreen) {
|
|
696
955
|
elem.requestFullscreen();
|
|
697
956
|
} else if (elem.msRequestFullscreen) {
|
|
@@ -700,8 +959,8 @@
|
|
|
700
959
|
elem.webkitRequestFullScreen();
|
|
701
960
|
}
|
|
702
961
|
};
|
|
703
|
-
|
|
704
|
-
|
|
962
|
+
const exitFullscreen = sugarDoc => {
|
|
963
|
+
const doc = sugarDoc.dom;
|
|
705
964
|
if (doc.exitFullscreen) {
|
|
706
965
|
doc.exitFullscreen();
|
|
707
966
|
} else if (doc.msExitFullscreen) {
|
|
@@ -710,70 +969,52 @@
|
|
|
710
969
|
doc.webkitCancelFullScreen();
|
|
711
970
|
}
|
|
712
971
|
};
|
|
713
|
-
|
|
714
|
-
return elem.dom === getFullscreenElement(owner(elem).dom);
|
|
715
|
-
};
|
|
972
|
+
const isFullscreenElement = elem => elem.dom === getFullscreenElement(owner(elem).dom);
|
|
716
973
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
};
|
|
720
|
-
var siblings$1 = function (scope, predicate) {
|
|
721
|
-
return filter(siblings(scope), predicate);
|
|
722
|
-
};
|
|
974
|
+
const ancestors$1 = (scope, predicate, isRoot) => filter$1(parents(scope, isRoot), predicate);
|
|
975
|
+
const siblings$1 = (scope, predicate) => filter$1(siblings$2(scope), predicate);
|
|
723
976
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
var ancestors$1 = function (scope, selector, isRoot) {
|
|
728
|
-
return ancestors(scope, function (e) {
|
|
729
|
-
return is(e, selector);
|
|
730
|
-
}, isRoot);
|
|
731
|
-
};
|
|
732
|
-
var siblings$2 = function (scope, selector) {
|
|
733
|
-
return siblings$1(scope, function (e) {
|
|
734
|
-
return is(e, selector);
|
|
735
|
-
});
|
|
736
|
-
};
|
|
977
|
+
const all = selector => all$1(selector);
|
|
978
|
+
const ancestors = (scope, selector, isRoot) => ancestors$1(scope, e => is(e, selector), isRoot);
|
|
979
|
+
const siblings = (scope, selector) => siblings$1(scope, e => is(e, selector));
|
|
737
980
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
981
|
+
const attr = 'data-ephox-mobile-fullscreen-style';
|
|
982
|
+
const siblingStyles = 'display:none!important;';
|
|
983
|
+
const ancestorPosition = 'position:absolute!important;';
|
|
984
|
+
const ancestorStyles = 'top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;';
|
|
985
|
+
const bgFallback = 'background-color:rgb(255,255,255)!important;';
|
|
986
|
+
const isAndroid = global.os.isAndroid();
|
|
987
|
+
const matchColor = editorBody => {
|
|
988
|
+
const color = get$2(editorBody, 'background-color');
|
|
746
989
|
return color !== undefined && color !== '' ? 'background-color:' + color + '!important' : bgFallback;
|
|
747
990
|
};
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
return siblings
|
|
991
|
+
const clobberStyles = (dom, container, editorBody) => {
|
|
992
|
+
const gatherSiblings = element => {
|
|
993
|
+
return siblings(element, '*:not(.tox-silver-sink)');
|
|
751
994
|
};
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
};
|
|
995
|
+
const clobber = clobberStyle => element => {
|
|
996
|
+
const styles = get$3(element, 'style');
|
|
997
|
+
const backup = styles === undefined ? 'no-styles' : styles.trim();
|
|
998
|
+
if (backup === clobberStyle) {
|
|
999
|
+
return;
|
|
1000
|
+
} else {
|
|
1001
|
+
set(element, attr, backup);
|
|
1002
|
+
setAll(element, dom.parseStyle(clobberStyle));
|
|
1003
|
+
}
|
|
763
1004
|
};
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
each(siblings, clobber(siblingStyles));
|
|
768
|
-
each(ancestors, clobber(ancestorPosition + ancestorStyles + bgColor));
|
|
769
|
-
|
|
1005
|
+
const ancestors$1 = ancestors(container, '*');
|
|
1006
|
+
const siblings$1 = bind$3(ancestors$1, gatherSiblings);
|
|
1007
|
+
const bgColor = matchColor(editorBody);
|
|
1008
|
+
each$1(siblings$1, clobber(siblingStyles));
|
|
1009
|
+
each$1(ancestors$1, clobber(ancestorPosition + ancestorStyles + bgColor));
|
|
1010
|
+
const containerStyles = isAndroid === true ? '' : ancestorPosition;
|
|
770
1011
|
clobber(containerStyles + ancestorStyles + bgColor)(container);
|
|
771
1012
|
};
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
each(clobberedEls,
|
|
775
|
-
|
|
776
|
-
if (restore !== 'no-styles') {
|
|
1013
|
+
const restoreStyles = dom => {
|
|
1014
|
+
const clobberedEls = all('[' + attr + ']');
|
|
1015
|
+
each$1(clobberedEls, element => {
|
|
1016
|
+
const restore = get$3(element, attr);
|
|
1017
|
+
if (restore && restore !== 'no-styles') {
|
|
777
1018
|
setAll(element, dom.parseStyle(restore));
|
|
778
1019
|
} else {
|
|
779
1020
|
remove(element, 'style');
|
|
@@ -782,106 +1023,90 @@
|
|
|
782
1023
|
});
|
|
783
1024
|
};
|
|
784
1025
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
var viewportUpdate = get$5().fold(function () {
|
|
797
|
-
return {
|
|
798
|
-
bind: noop,
|
|
799
|
-
unbind: noop
|
|
800
|
-
};
|
|
801
|
-
}, function (visualViewport) {
|
|
802
|
-
var editorContainer = value();
|
|
803
|
-
var resizeBinder = unbindable();
|
|
804
|
-
var scrollBinder = unbindable();
|
|
805
|
-
var refreshScroll = function () {
|
|
1026
|
+
const DOM = global$1.DOM;
|
|
1027
|
+
const getScrollPos = () => getBounds(window);
|
|
1028
|
+
const setScrollPos = pos => window.scrollTo(pos.x, pos.y);
|
|
1029
|
+
const viewportUpdate = get().fold(() => ({
|
|
1030
|
+
bind: noop,
|
|
1031
|
+
unbind: noop
|
|
1032
|
+
}), visualViewport => {
|
|
1033
|
+
const editorContainer = value();
|
|
1034
|
+
const resizeBinder = unbindable();
|
|
1035
|
+
const scrollBinder = unbindable();
|
|
1036
|
+
const refreshScroll = () => {
|
|
806
1037
|
document.body.scrollTop = 0;
|
|
807
1038
|
document.documentElement.scrollTop = 0;
|
|
808
1039
|
};
|
|
809
|
-
|
|
810
|
-
window.requestAnimationFrame(
|
|
811
|
-
editorContainer.on(
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
});
|
|
818
|
-
});
|
|
1040
|
+
const refreshVisualViewport = () => {
|
|
1041
|
+
window.requestAnimationFrame(() => {
|
|
1042
|
+
editorContainer.on(container => setAll(container, {
|
|
1043
|
+
top: visualViewport.offsetTop + 'px',
|
|
1044
|
+
left: visualViewport.offsetLeft + 'px',
|
|
1045
|
+
height: visualViewport.height + 'px',
|
|
1046
|
+
width: visualViewport.width + 'px'
|
|
1047
|
+
}));
|
|
819
1048
|
});
|
|
820
1049
|
};
|
|
821
|
-
|
|
1050
|
+
const update = first(() => {
|
|
822
1051
|
refreshScroll();
|
|
823
1052
|
refreshVisualViewport();
|
|
824
1053
|
}, 50);
|
|
825
|
-
|
|
1054
|
+
const bind$1 = element => {
|
|
826
1055
|
editorContainer.set(element);
|
|
827
|
-
update();
|
|
828
|
-
resizeBinder.set(bind
|
|
829
|
-
scrollBinder.set(bind
|
|
1056
|
+
update.throttle();
|
|
1057
|
+
resizeBinder.set(bind('resize', update.throttle));
|
|
1058
|
+
scrollBinder.set(bind('scroll', update.throttle));
|
|
830
1059
|
};
|
|
831
|
-
|
|
832
|
-
editorContainer.on(
|
|
1060
|
+
const unbind = () => {
|
|
1061
|
+
editorContainer.on(() => {
|
|
833
1062
|
resizeBinder.clear();
|
|
834
1063
|
scrollBinder.clear();
|
|
835
1064
|
});
|
|
836
1065
|
editorContainer.clear();
|
|
837
1066
|
};
|
|
838
1067
|
return {
|
|
839
|
-
bind: bind,
|
|
840
|
-
unbind
|
|
1068
|
+
bind: bind$1,
|
|
1069
|
+
unbind
|
|
841
1070
|
};
|
|
842
1071
|
});
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
1072
|
+
const toggleFullscreen = (editor, fullscreenState) => {
|
|
1073
|
+
const body = document.body;
|
|
1074
|
+
const documentElement = document.documentElement;
|
|
1075
|
+
const editorContainer = editor.getContainer();
|
|
1076
|
+
const editorContainerS = SugarElement.fromDom(editorContainer);
|
|
1077
|
+
const fullscreenRoot = getFullscreenRoot(editor);
|
|
1078
|
+
const fullscreenInfo = fullscreenState.get();
|
|
1079
|
+
const editorBody = SugarElement.fromDom(editor.getBody());
|
|
1080
|
+
const isTouch = global.deviceType.isTouch();
|
|
1081
|
+
const editorContainerStyle = editorContainer.style;
|
|
1082
|
+
const iframe = editor.iframeElement;
|
|
1083
|
+
const iframeStyle = iframe === null || iframe === void 0 ? void 0 : iframe.style;
|
|
1084
|
+
const handleClasses = handler => {
|
|
856
1085
|
handler(body, 'tox-fullscreen');
|
|
857
1086
|
handler(documentElement, 'tox-fullscreen');
|
|
858
1087
|
handler(editorContainer, 'tox-fullscreen');
|
|
859
|
-
getShadowRoot(editorContainerS).map(
|
|
860
|
-
return getShadowHost(root).dom;
|
|
861
|
-
}).each(function (host) {
|
|
1088
|
+
getShadowRoot(editorContainerS).map(root => getShadowHost(root).dom).each(host => {
|
|
862
1089
|
handler(host, 'tox-fullscreen');
|
|
863
1090
|
handler(host, 'tox-shadowhost');
|
|
864
1091
|
});
|
|
865
1092
|
};
|
|
866
|
-
|
|
1093
|
+
const cleanup = () => {
|
|
867
1094
|
if (isTouch) {
|
|
868
1095
|
restoreStyles(editor.dom);
|
|
869
1096
|
}
|
|
870
1097
|
handleClasses(DOM.removeClass);
|
|
871
1098
|
viewportUpdate.unbind();
|
|
872
|
-
Optional.from(fullscreenState.get()).each(
|
|
873
|
-
return info.fullscreenChangeHandler.unbind();
|
|
874
|
-
});
|
|
1099
|
+
Optional.from(fullscreenState.get()).each(info => info.fullscreenChangeHandler.unbind());
|
|
875
1100
|
};
|
|
876
1101
|
if (!fullscreenInfo) {
|
|
877
|
-
|
|
1102
|
+
const fullscreenChangeHandler = bind$1(owner(fullscreenRoot), getFullscreenchangeEventName(), _evt => {
|
|
878
1103
|
if (getFullscreenNative(editor)) {
|
|
879
1104
|
if (!isFullscreenElement(fullscreenRoot) && fullscreenState.get() !== null) {
|
|
880
1105
|
toggleFullscreen(editor, fullscreenState);
|
|
881
1106
|
}
|
|
882
1107
|
}
|
|
883
1108
|
});
|
|
884
|
-
|
|
1109
|
+
const newFullScreenInfo = {
|
|
885
1110
|
scrollPos: getScrollPos(),
|
|
886
1111
|
containerWidth: editorContainerStyle.width,
|
|
887
1112
|
containerHeight: editorContainerStyle.height,
|
|
@@ -889,7 +1114,7 @@
|
|
|
889
1114
|
containerLeft: editorContainerStyle.left,
|
|
890
1115
|
iframeWidth: iframeStyle.width,
|
|
891
1116
|
iframeHeight: iframeStyle.height,
|
|
892
|
-
fullscreenChangeHandler
|
|
1117
|
+
fullscreenChangeHandler
|
|
893
1118
|
};
|
|
894
1119
|
if (isTouch) {
|
|
895
1120
|
clobberStyles(editor.dom, editorContainerS, editorBody);
|
|
@@ -915,65 +1140,57 @@
|
|
|
915
1140
|
editorContainerStyle.height = fullscreenInfo.containerHeight;
|
|
916
1141
|
editorContainerStyle.top = fullscreenInfo.containerTop;
|
|
917
1142
|
editorContainerStyle.left = fullscreenInfo.containerLeft;
|
|
1143
|
+
cleanup();
|
|
918
1144
|
setScrollPos(fullscreenInfo.scrollPos);
|
|
919
1145
|
fullscreenState.set(null);
|
|
920
1146
|
fireFullscreenStateChanged(editor, false);
|
|
921
|
-
cleanup();
|
|
922
1147
|
editor.off('remove', cleanup);
|
|
923
1148
|
}
|
|
924
1149
|
};
|
|
925
1150
|
|
|
926
|
-
|
|
927
|
-
editor.addCommand('mceFullScreen',
|
|
1151
|
+
const register$1 = (editor, fullscreenState) => {
|
|
1152
|
+
editor.addCommand('mceFullScreen', () => {
|
|
928
1153
|
toggleFullscreen(editor, fullscreenState);
|
|
929
1154
|
});
|
|
930
1155
|
};
|
|
931
1156
|
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
return editor.off('FullscreenStateChanged', editorEventCallback);
|
|
941
|
-
};
|
|
942
|
-
};
|
|
943
|
-
};
|
|
944
|
-
var register$1 = function (editor, fullscreenState) {
|
|
1157
|
+
const makeSetupHandler = (editor, fullscreenState) => api => {
|
|
1158
|
+
api.setActive(fullscreenState.get() !== null);
|
|
1159
|
+
const editorEventCallback = e => api.setActive(e.state);
|
|
1160
|
+
editor.on('FullscreenStateChanged', editorEventCallback);
|
|
1161
|
+
return () => editor.off('FullscreenStateChanged', editorEventCallback);
|
|
1162
|
+
};
|
|
1163
|
+
const register = (editor, fullscreenState) => {
|
|
1164
|
+
const onAction = () => editor.execCommand('mceFullScreen');
|
|
945
1165
|
editor.ui.registry.addToggleMenuItem('fullscreen', {
|
|
946
1166
|
text: 'Fullscreen',
|
|
947
1167
|
icon: 'fullscreen',
|
|
948
1168
|
shortcut: 'Meta+Shift+F',
|
|
949
|
-
onAction
|
|
950
|
-
return editor.execCommand('mceFullScreen');
|
|
951
|
-
},
|
|
1169
|
+
onAction,
|
|
952
1170
|
onSetup: makeSetupHandler(editor, fullscreenState)
|
|
953
1171
|
});
|
|
954
1172
|
editor.ui.registry.addToggleButton('fullscreen', {
|
|
955
1173
|
tooltip: 'Fullscreen',
|
|
956
1174
|
icon: 'fullscreen',
|
|
957
|
-
onAction
|
|
958
|
-
return editor.execCommand('mceFullScreen');
|
|
959
|
-
},
|
|
1175
|
+
onAction,
|
|
960
1176
|
onSetup: makeSetupHandler(editor, fullscreenState)
|
|
961
1177
|
});
|
|
962
1178
|
};
|
|
963
1179
|
|
|
964
|
-
|
|
965
|
-
global.add('fullscreen',
|
|
966
|
-
|
|
1180
|
+
var Plugin = () => {
|
|
1181
|
+
global$2.add('fullscreen', editor => {
|
|
1182
|
+
const fullscreenState = Cell(null);
|
|
967
1183
|
if (editor.inline) {
|
|
968
|
-
return get(fullscreenState);
|
|
1184
|
+
return get$5(fullscreenState);
|
|
969
1185
|
}
|
|
970
|
-
register(editor
|
|
1186
|
+
register$2(editor);
|
|
971
1187
|
register$1(editor, fullscreenState);
|
|
1188
|
+
register(editor, fullscreenState);
|
|
972
1189
|
editor.addShortcut('Meta+Shift+F', '', 'mceFullScreen');
|
|
973
|
-
return get(fullscreenState);
|
|
1190
|
+
return get$5(fullscreenState);
|
|
974
1191
|
});
|
|
975
|
-
}
|
|
1192
|
+
};
|
|
976
1193
|
|
|
977
1194
|
Plugin();
|
|
978
1195
|
|
|
979
|
-
}()
|
|
1196
|
+
})();
|