create-nextjs-cms 0.5.19 → 0.5.20
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/index.js +7 -0
- package/package.json +4 -4
- package/templates/default/.uploads/.photos/categories/000e56fada378de1a84a4 +0 -0
- package/templates/default/.uploads/.photos/categories/121e7d13ee3b5fa03795b +0 -0
- package/templates/default/.uploads/.photos/categories/17a55c5a53eb62293c69e +0 -0
- package/templates/default/.uploads/.photos/categories/4c86ad8c1f51f1e3a953b +0 -0
- package/templates/default/.uploads/.photos/categories/4d360813741a45744327c +0 -0
- package/templates/default/.uploads/.photos/categories/5238fefaa3cbebf388178 +0 -0
- package/templates/default/.uploads/.photos/categories/541d7cf8c69895bcb15cd +0 -0
- package/templates/default/.uploads/.photos/categories/57a2f689a910a378247ea +0 -0
- package/templates/default/.uploads/.photos/categories/6de4bdb341a3e1f70ddc3 +0 -0
- package/templates/default/.uploads/.photos/categories/6f52739eaa686441a28f4 +0 -0
- package/templates/default/.uploads/.photos/categories/8a21b9fa8ecd88f460a15 +0 -0
- package/templates/default/.uploads/.photos/categories/91948abcb073c9445fdec +0 -0
- package/templates/default/.uploads/.photos/categories/9ae700d1abfd6b85780e8 +0 -0
- package/templates/default/.uploads/.photos/categories/9edee86e932985fc589b5 +0 -0
- package/templates/default/.uploads/.photos/categories/a520e77b082f35b575dba +0 -0
- package/templates/default/.uploads/.photos/categories/b19c449029330f0a74b20 +0 -0
- package/templates/default/.uploads/.photos/categories/b9802010f68afd4edb0e8 +0 -0
- package/templates/default/.uploads/.photos/categories/c1d7c3b986739bf496730 +0 -0
- package/templates/default/.uploads/.photos/categories/c25dc38567384513ffe93 +0 -0
- package/templates/default/.uploads/.photos/categories/cbe3874a3d13afba388df +0 -0
- package/templates/default/.uploads/.photos/categories/d450fdeb04f0d070442d6 +0 -0
- package/templates/default/.uploads/.photos/categories/f80bf3a4515680ead5a5c +0 -0
- package/templates/default/.uploads/.photos/categories/f8639c2d5b0d24cb76fb1 +0 -0
- package/templates/default/.uploads/.photos/categories/f8d997149d10aab046e40 +0 -0
- package/templates/default/.uploads/.photos/categories/fa2c55690ff96e33a16fe +0 -0
- package/templates/default/.uploads/.photos/featured_slider/d00be4edb4c38ca34b5a5 +0 -0
- package/templates/default/.uploads/.thumbs/categories/000e56fada378de1a84a4 +0 -0
- package/templates/default/.uploads/.thumbs/categories/121e7d13ee3b5fa03795b +0 -0
- package/templates/default/.uploads/.thumbs/categories/17a55c5a53eb62293c69e +0 -0
- package/templates/default/.uploads/.thumbs/categories/4c86ad8c1f51f1e3a953b +0 -0
- package/templates/default/.uploads/.thumbs/categories/4d360813741a45744327c +0 -0
- package/templates/default/.uploads/.thumbs/categories/5238fefaa3cbebf388178 +0 -0
- package/templates/default/.uploads/.thumbs/categories/541d7cf8c69895bcb15cd +0 -0
- package/templates/default/.uploads/.thumbs/categories/57a2f689a910a378247ea +0 -0
- package/templates/default/.uploads/.thumbs/categories/6de4bdb341a3e1f70ddc3 +0 -0
- package/templates/default/.uploads/.thumbs/categories/6f52739eaa686441a28f4 +0 -0
- package/templates/default/.uploads/.thumbs/categories/8a21b9fa8ecd88f460a15 +0 -0
- package/templates/default/.uploads/.thumbs/categories/91948abcb073c9445fdec +0 -0
- package/templates/default/.uploads/.thumbs/categories/9ae700d1abfd6b85780e8 +0 -0
- package/templates/default/.uploads/.thumbs/categories/9edee86e932985fc589b5 +0 -0
- package/templates/default/.uploads/.thumbs/categories/a520e77b082f35b575dba +0 -0
- package/templates/default/.uploads/.thumbs/categories/b19c449029330f0a74b20 +0 -0
- package/templates/default/.uploads/.thumbs/categories/b9802010f68afd4edb0e8 +0 -0
- package/templates/default/.uploads/.thumbs/categories/c1d7c3b986739bf496730 +0 -0
- package/templates/default/.uploads/.thumbs/categories/c25dc38567384513ffe93 +0 -0
- package/templates/default/.uploads/.thumbs/categories/cbe3874a3d13afba388df +0 -0
- package/templates/default/.uploads/.thumbs/categories/d450fdeb04f0d070442d6 +0 -0
- package/templates/default/.uploads/.thumbs/categories/f80bf3a4515680ead5a5c +0 -0
- package/templates/default/.uploads/.thumbs/categories/f8639c2d5b0d24cb76fb1 +0 -0
- package/templates/default/.uploads/.thumbs/categories/f8d997149d10aab046e40 +0 -0
- package/templates/default/.uploads/.thumbs/categories/fa2c55690ff96e33a16fe +0 -0
- package/templates/default/_gitignore +57 -0
- package/templates/default/components/form/helpers/_section-hot-reload.ts +11 -0
- package/templates/default/next-env.d.ts +6 -0
- package/templates/default/package.json +2 -2
- package/templates/default/public/tinymce/CHANGELOG.md +3785 -0
- package/templates/default/public/tinymce/README.md +77 -0
- package/templates/default/public/tinymce/bower.json +27 -0
- package/templates/default/public/tinymce/composer.json +52 -0
- package/templates/default/public/tinymce/icons/default/icons.js +231 -0
- package/templates/default/public/tinymce/icons/default/icons.min.js +1 -0
- package/templates/default/public/tinymce/icons/default/index.js +7 -0
- package/templates/default/public/tinymce/license.md +6 -0
- package/templates/default/public/tinymce/models/dom/index.js +7 -0
- package/templates/default/public/tinymce/models/dom/model.js +8994 -0
- package/templates/default/public/tinymce/models/dom/model.min.js +1 -0
- package/templates/default/public/tinymce/notices.txt +21 -0
- package/templates/default/public/tinymce/package.json +32 -0
- package/templates/default/public/tinymce/plugins/accordion/index.js +7 -0
- package/templates/default/public/tinymce/plugins/accordion/plugin.js +1349 -0
- package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/advlist/index.js +7 -0
- package/templates/default/public/tinymce/plugins/advlist/plugin.js +471 -0
- package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/anchor/index.js +7 -0
- package/templates/default/public/tinymce/plugins/anchor/plugin.js +237 -0
- package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autolink/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autolink/plugin.js +318 -0
- package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autoresize/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autoresize/plugin.js +223 -0
- package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autosave/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autosave/plugin.js +252 -0
- package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/charmap/index.js +7 -0
- package/templates/default/public/tinymce/plugins/charmap/plugin.js +997 -0
- package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/code/index.js +7 -0
- package/templates/default/public/tinymce/plugins/code/plugin.js +97 -0
- package/templates/default/public/tinymce/plugins/code/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/codesample/index.js +7 -0
- package/templates/default/public/tinymce/plugins/codesample/plugin.js +3654 -0
- package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +9 -0
- package/templates/default/public/tinymce/plugins/directionality/index.js +7 -0
- package/templates/default/public/tinymce/plugins/directionality/plugin.js +636 -0
- package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/index.js +7 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/plugin.js +809 -0
- package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/fullscreen/index.js +7 -0
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +1609 -0
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/help/index.js +7 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
- package/templates/default/public/tinymce/plugins/help/plugin.js +828 -0
- package/templates/default/public/tinymce/plugins/help/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/image/index.js +7 -0
- package/templates/default/public/tinymce/plugins/image/plugin.js +1689 -0
- package/templates/default/public/tinymce/plugins/image/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/importcss/index.js +7 -0
- package/templates/default/public/tinymce/plugins/importcss/plugin.js +403 -0
- package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/index.js +7 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +186 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/link/index.js +7 -0
- package/templates/default/public/tinymce/plugins/link/plugin.js +1577 -0
- package/templates/default/public/tinymce/plugins/link/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/lists/index.js +7 -0
- package/templates/default/public/tinymce/plugins/lists/plugin.js +2544 -0
- package/templates/default/public/tinymce/plugins/lists/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/media/index.js +7 -0
- package/templates/default/public/tinymce/plugins/media/plugin.js +1450 -0
- package/templates/default/public/tinymce/plugins/media/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/index.js +7 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +128 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/pagebreak/index.js +7 -0
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +123 -0
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/preview/index.js +7 -0
- package/templates/default/public/tinymce/plugins/preview/plugin.js +765 -0
- package/templates/default/public/tinymce/plugins/preview/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/quickbars/index.js +7 -0
- package/templates/default/public/tinymce/plugins/quickbars/plugin.js +654 -0
- package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/save/index.js +7 -0
- package/templates/default/public/tinymce/plugins/save/plugin.js +136 -0
- package/templates/default/public/tinymce/plugins/save/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/searchreplace/index.js +7 -0
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +1370 -0
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/table/index.js +7 -0
- package/templates/default/public/tinymce/plugins/table/plugin.js +4019 -0
- package/templates/default/public/tinymce/plugins/table/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/visualblocks/index.js +7 -0
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +106 -0
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/visualchars/index.js +7 -0
- package/templates/default/public/tinymce/plugins/visualchars/plugin.js +809 -0
- package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/wordcount/index.js +7 -0
- package/templates/default/public/tinymce/plugins/wordcount/plugin.js +480 -0
- package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +1 -0
- package/templates/default/public/tinymce/skins/content/dark/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/default/content.css +70 -0
- package/templates/default/public/tinymce/skins/content/default/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/default/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/document/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/document/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/document/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +70 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/writer/content.css +71 -0
- package/templates/default/public/tinymce/skins/content/writer/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/writer/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.css +893 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.css +5141 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +881 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +5144 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +893 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +5260 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +881 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +5260 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/themes/silver/index.js +7 -0
- package/templates/default/public/tinymce/themes/silver/theme.js +34798 -0
- package/templates/default/public/tinymce/themes/silver/theme.min.js +1 -0
- package/templates/default/public/tinymce/tinymce.d.ts +3350 -0
- package/templates/default/public/tinymce/tinymce.js +38694 -0
- package/templates/default/public/tinymce/tinymce.min.js +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var o,n,r,s})(e),n=t("boolean"),r=e=>null==e,s=e=>!r(e),a=t("function"),i=t("number"),l=e=>()=>e,d=(e,t)=>e===t,c=l(!1);class m{constructor(e,t){this.tag=e,this.value=t}static some(e){return new m(!0,e)}static none(){return m.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?m.some(e(this.value)):m.none()}bind(e){return this.tag?e(this.value):m.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:m.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return s(e)?m.some(e):m.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}m.singletonNone=new m(!1);const u=Array.prototype.indexOf,g=(e,t)=>{return o=e,n=t,u.call(o,n)>-1;var o,n},p=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},h=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},f=Object.keys;let y=0;const v=(w=/^\s+|\s+$/g,e=>e.replace(w,""));var w;const b=(e,t)=>({element:e,offset:t}),N=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},T={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return N(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return N(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return N(o)},fromDom:N,fromPoint:(e,t,o)=>m.from(e.dom.elementFromPoint(t,o)).map(N)},A=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},C=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,S=A,x=e=>e.dom.nodeName.toLowerCase(),D=e=>e.dom.nodeType,E=e=>t=>D(t)===e,O=E(1),M=E(3),P=E(9),R=E(11),k=e=>m.from(e.dom.parentNode).map(T.fromDom),B=e=>m.from(e.dom.nextSibling).map(T.fromDom),L=e=>p(e.dom.childNodes,T.fromDom),$=e=>T.fromDom(e.dom.host),V=(e,t)=>{k(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},I=(e,t)=>{B(e).fold((()=>{k(e).each((e=>{j(e,t)}))}),(e=>{V(e,t)}))},j=(e,t)=>{e.dom.appendChild(t.dom)},q=(e,t)=>{h(t,((o,n)=>{const r=0===n?e:t[n-1];I(r,o)}))},H=(e,t,r)=>{if(!(o(r)||n(r)||i(r)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,r+"")},z=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},F=(e,t)=>m.from(z(e,t)),K=(e,t)=>{e.dom.removeAttribute(t)},U=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Y=e=>void 0!==e.style&&a(e.style.getPropertyValue),_=e=>{const t=M(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=(e=>T.fromDom(e.dom.getRootNode()))(e);return R(o=t)&&s(o.dom.host)?m.some(t):m.none();var o})(T.fromDom(t)).fold((()=>o.body.contains(t)),(n=_,r=$,e=>n(r(e))));var n,r},G=(e,t)=>Y(e)?e.style.getPropertyValue(t):"",J=(e=>{const t=t=>e(t)?m.from(t.dom.nodeValue):m.none();return{get:o=>{if(!e(o))throw new Error("Can only get text value of a text node");return t(o).getOr("")},getOption:t,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(M),Q=(e,t,o)=>{let n=e.dom;const r=a(o)?o:c;for(;n.parentNode;){n=n.parentNode;const e=T.fromDom(n);if(t(e))return m.some(e);if(r(e))break}return m.none()},W=(e,t,o)=>Q(e,(e=>A(e,t)),o),X=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return C(o)?m.none():m.from(o.querySelector(e)).map(T.fromDom)})(t,e),Z=(e,t)=>{let o=[];return h(L(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(Z(e,t))})),o};var ee=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];const te=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>te(e,t,o).orThunk((()=>m.some(t))))):m.none(),oe=(e,t)=>e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length,ne=(e,t)=>{const o=te(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return b(o,oe(e,o));const n=e.property().children(o);return n.length>0?ne(e,n[n.length-1]):b(o,oe(e,o))},re=ne,se={up:l({selector:W,closest:(e,t,o)=>((e,t,o,n,r)=>((e,t)=>A(e,t))(o,n)?m.some(o):a(r)&&r(o)?m.none():t(o,n,r))(0,W,e,t,o),predicate:Q,all:(e,t)=>{const o=a(t)?t:c;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=T.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r}}),down:l({selector:(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return C(o)?[]:p(o.querySelectorAll(e),T.fromDom)})(t,e),predicate:Z}),styles:l({get:(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||_(e)?n:G(o,t)},getRaw:(e,t)=>{const o=e.dom,n=G(o,t);return m.from(n).filter((e=>e.length>0))},set:(e,t,n)=>{((e,t,n)=>{if(!o(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);Y(e)&&e.style.setProperty(t,n)})(e.dom,t,n)},remove:(e,t)=>{((e,t)=>{Y(e)&&e.style.removeProperty(t)})(e.dom,t),((e,t,o=d)=>e.exists((e=>o(e,t))))(F(e,"style").map(v),"")&&K(e,"style")}}),attrs:l({get:z,set:(e,t,o)=>{H(e.dom,t,o)},remove:K,copyTo:(e,t)=>{const o=(n=e.dom.attributes,r=(e,t)=>(e[t.name]=t.value,e),s={},h(n,((e,t)=>{s=r(s,e)})),s);var n,r,s;((e,t)=>{const o=e.dom;((e,t)=>{const o=f(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(t,((e,t)=>{H(o,t,e)}))})(t,o)}}),insert:l({before:V,after:I,afterAll:q,append:j,appendAll:(e,t)=>{h(t,(t=>{j(e,t)}))},prepend:(e,t)=>{(e=>(e=>{const t=e.dom.childNodes;return m.from(t[0]).map(T.fromDom)})(e))(e).fold((()=>{j(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},wrap:(e,t)=>{V(e,t),j(t,e)}}),remove:l({unwrap:e=>{const t=L(e);t.length>0&&q(e,t),U(e)},remove:U}),create:l({nu:T.fromTag,clone:e=>T.fromDom(e.dom.cloneNode(!1)),text:T.fromText}),query:l({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:e=>m.from(e.dom.previousSibling).map(T.fromDom),nextSibling:B}),property:l({children:L,name:x,parent:k,document:e=>{return(t=e,P(t)?t:T.fromDom(t.dom.ownerDocument)).dom;var t},isText:M,isComment:e=>8===D(e)||"#comment"===x(e),isElement:O,isSpecial:e=>{const t=x(e);return g(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>O(e)?F(e,"lang"):m.none(),getText:e=>J.get(e),setText:(e,t)=>J.set(e,t),isBoundary:e=>!!O(e)&&("body"===x(e)||g(ee,x(e))),isEmptyTag:e=>!!O(e)&&g(["br","img","hr","input"],x(e)),isNonEditable:e=>O(e)&&"false"===z(e,"contenteditable")}),eq:(e,t)=>e.dom===t.dom,is:S},ae="details",ie="mce-accordion",le="mce-accordion-summary",de="mce-accordion-body",ce="div";var me=tinymce.util.Tools.resolve("tinymce.util.Tools");const ue=e=>"SUMMARY"===(null==e?void 0:e.nodeName),ge=e=>"DETAILS"===(null==e?void 0:e.nodeName),pe=e=>e.hasAttribute("open"),he=e=>{const t=e.selection.getNode();return ue(t)||Boolean(e.dom.getParent(t,ue))},fe=e=>!he(e)&&e.dom.isEditable(e.selection.getNode())&&!e.mode.isReadOnly(),ye=e=>m.from(e.dom.getParent(e.selection.getNode(),ge)),ve=e=>(e.innerHTML='<br data-mce-bogus="1" />',e),we=e=>ve(e.dom.create("p")),be=e=>t=>{((e,t)=>{if(ue(null==t?void 0:t.lastChild)){const o=we(e);t.appendChild(o),e.selection.setCursorLocation(o,0)}})(e,t),((e,t)=>{if(!ue(null==t?void 0:t.firstChild)){const o=(e=>ve(e.dom.create("summary")))(e);t.prepend(o),e.selection.setCursorLocation(o,0)}})(e,t)},Ne=e=>{if(!fe(e))return;const t=T.fromDom(e.getBody()),o=(e=>{const t=(new Date).getTime(),o=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return y++,e+"_"+o+y+String(t)})("acc"),n=e.dom.encode(e.selection.getRng().toString()||e.translate("Accordion summary...")),r=e.dom.encode(e.translate("Accordion body...")),s=`<summary class="${le}">${n}</summary>`,a=`<${ce} class="${de}"><p>${r}</p></${ce}>`;e.undoManager.transact((()=>{e.insertContent([`<details data-mce-id="${o}" class="${ie}" open="open">`,s,a,"</details>"].join("")),X(t,`[data-mce-id="${o}"]`).each((t=>{K(t,"data-mce-id"),X(t,"summary").each((t=>{const o=e.dom.createRng(),n=re(se,t);o.setStart(n.element.dom,n.offset),o.setEnd(n.element.dom,n.offset),e.selection.setRng(o)}))}))}))},Te=(e,t)=>{const o=null!=t?t:!pe(e);return o?e.setAttribute("open","open"):e.removeAttribute("open"),o},Ae=e=>{e.addCommand("InsertAccordion",(()=>Ne(e))),e.addCommand("ToggleAccordion",((t,o)=>((e,t)=>{ye(e).each((o=>{((e,t,o)=>{e.dispatch("ToggledAccordion",{element:t,state:o})})(e,o,Te(o,t))}))})(e,o))),e.addCommand("ToggleAllAccordions",((t,o)=>((e,t)=>{const o=Array.from(e.getBody().querySelectorAll("details"));0!==o.length&&(h(o,(e=>Te(e,null!=t?t:!pe(e)))),((e,t,o)=>{e.dispatch("ToggledAllAccordions",{elements:t,state:o})})(e,o,t))})(e,o))),e.addCommand("RemoveAccordion",(()=>(e=>{e.mode.isReadOnly()||ye(e).each((t=>{const{nextSibling:o}=t;o?(e.selection.select(o,!0),e.selection.collapse(!0)):((e,t)=>{const o=we(e);t.insertAdjacentElement("afterend",o),e.selection.setCursorLocation(o,0)})(e,t),t.remove()}))})(e)))};var Ce=tinymce.util.Tools.resolve("tinymce.html.Node");const Se=e=>{var t,o;return null!==(o=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==o?o:[]},xe=(e,t)=>{const o=new Set([...Se(e),...t]),n=Array.from(o);n.length>0&&e.attr("class",n.join(" "))},De=(e,t)=>{const o=(e=>{const o=[];for(let r=0,s=e.length;r<s;r++){const s=e[r];n=s,!t.has(n)&&o.push(s)}var n;return o})(Se(e));e.attr("class",o.length>0?o.join(" "):null)},Ee=e=>e.name===ae&&g(Se(e),ie),Oe=e=>{const t=e.children();let o,n;const s=[];for(let e=0;e<t.length;e++){const i=t[e];"summary"===i.name&&r(o)?o=i:(a=i).name===ce&&g(Se(a),de)&&r(n)?n=i:s.push(i)}var a;return{summaryNode:o,wrapperNode:n,otherNodes:s}},Me=e=>{const t=new Ce("br",1);t.attr("data-mce-bogus","1"),e.empty(),e.append(t)};var Pe=tinymce.util.Tools.resolve("tinymce.util.VK");const Re=e=>{(e=>{e.on("keydown",(t=>{(!t.shiftKey&&t.keyCode===Pe.ENTER&&he(e)||(e=>{const t=e.selection.getRng();return ge(t.startContainer)&&t.collapsed&&0===t.startOffset})(e))&&(t.preventDefault(),e.execCommand("ToggleAccordion"))}))})(e),e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!(e=>ye(e).isSome())(e)||(e=>{me.each(me.grep(e.dom.select("details",e.getBody())),be(e))})(e)}))};var ke=tinymce.util.Tools.resolve("tinymce.Env");const Be=e=>t=>{const o=()=>t.setEnabled(fe(e));return e.on("NodeChange",o),()=>e.off("NodeChange",o)};e.add("accordion",(e=>{(e=>{const t=()=>e.execCommand("InsertAccordion");e.ui.registry.addButton("accordion",{icon:"accordion",tooltip:"Insert accordion",onSetup:Be(e),onAction:t}),e.ui.registry.addMenuItem("accordion",{icon:"accordion",text:"Accordion",onSetup:Be(e),onAction:t}),e.ui.registry.addToggleButton("accordiontoggle",{icon:"accordion-toggle",tooltip:"Toggle accordion",onAction:()=>e.execCommand("ToggleAccordion")}),e.ui.registry.addToggleButton("accordionremove",{icon:"remove",tooltip:"Delete accordion",onAction:()=>e.execCommand("RemoveAccordion")}),e.ui.registry.addContextToolbar("accordion",{predicate:t=>e.dom.is(t,"details")&&e.getBody().contains(t)&&e.dom.isEditable(t.parentNode),items:"accordiontoggle accordionremove",scope:"node",position:"node"})})(e),Ae(e),Re(e),(e=>{e.on("PreInit",(()=>{const{serializer:t,parser:o}=e;o.addNodeFilter(ae,(e=>{for(let t=0;t<e.length;t++){const o=e[t];if(Ee(o)){const e=o,{summaryNode:t,wrapperNode:n,otherNodes:a}=Oe(e),i=s(t),l=i?t:new Ce("summary",1);r(l.firstChild)&&Me(l),xe(l,[le]),i||(s(e.firstChild)?e.insert(l,e.firstChild,!0):e.append(l));const d=s(n),c=d?n:new Ce(ce,1);if(c.attr("data-mce-bogus","1"),xe(c,[de]),a.length>0)for(let e=0;e<a.length;e++){const t=a[e];c.append(t)}if(r(c.firstChild)){const e=new Ce("p",1);Me(e),c.append(e)}d||e.append(c)}}})),t.addNodeFilter(ae,(e=>{const t=new Set([le]);for(let o=0;o<e.length;o++){const n=e[o];if(Ee(n)){const e=n,{summaryNode:o,wrapperNode:r}=Oe(e);s(o)&&De(o,t),s(r)&&r.unwrap()}}}))}))})(e),(e=>{ke.browser.isSafari()&&e.on("click",(t=>{if(ue(t.target)){const o=t.target,n=e.selection.getRng();n.collapsed&&n.startContainer===o.parentNode&&0===n.startOffset&&e.selection.setCursorLocation(o,0)}}))})(e)}))}();
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TinyMCE version 7.9.1 (2025-05-29)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
+
|
|
10
|
+
const applyListFormat = (editor, listName, styleValue) => {
|
|
11
|
+
const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
|
|
12
|
+
editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const register$2 = (editor) => {
|
|
16
|
+
editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {
|
|
17
|
+
applyListFormat(editor, 'UL', value['list-style-type']);
|
|
18
|
+
});
|
|
19
|
+
editor.addCommand('ApplyOrderedListStyle', (ui, value) => {
|
|
20
|
+
applyListFormat(editor, 'OL', value['list-style-type']);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const option = (name) => (editor) => editor.options.get(name);
|
|
25
|
+
const register$1 = (editor) => {
|
|
26
|
+
const registerOption = editor.options.register;
|
|
27
|
+
registerOption('advlist_number_styles', {
|
|
28
|
+
processor: 'string[]',
|
|
29
|
+
default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')
|
|
30
|
+
});
|
|
31
|
+
registerOption('advlist_bullet_styles', {
|
|
32
|
+
processor: 'string[]',
|
|
33
|
+
default: 'default,disc,circle,square'.split(',')
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const getNumberStyles = option('advlist_number_styles');
|
|
37
|
+
const getBulletStyles = option('advlist_bullet_styles');
|
|
38
|
+
|
|
39
|
+
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
40
|
+
const isNullable = (a) => a === null || a === undefined;
|
|
41
|
+
const isNonNullable = (a) => !isNullable(a);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* The `Optional` type represents a value (of any type) that potentially does
|
|
45
|
+
* not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
|
|
46
|
+
* value does exist) or a `None` (in which case the value does not exist). This
|
|
47
|
+
* module defines a whole lot of FP-inspired utility functions for dealing with
|
|
48
|
+
* `Optional` objects.
|
|
49
|
+
*
|
|
50
|
+
* Comparison with null or undefined:
|
|
51
|
+
* - We don't get fancy null coalescing operators with `Optional`
|
|
52
|
+
* - We do get fancy helper functions with `Optional`
|
|
53
|
+
* - `Optional` support nesting, and allow for the type to still be nullable (or
|
|
54
|
+
* another `Optional`)
|
|
55
|
+
* - There is no option to turn off strict-optional-checks like there is for
|
|
56
|
+
* strict-null-checks
|
|
57
|
+
*/
|
|
58
|
+
class Optional {
|
|
59
|
+
// The internal representation has a `tag` and a `value`, but both are
|
|
60
|
+
// private: able to be console.logged, but not able to be accessed by code
|
|
61
|
+
constructor(tag, value) {
|
|
62
|
+
this.tag = tag;
|
|
63
|
+
this.value = value;
|
|
64
|
+
}
|
|
65
|
+
// --- Identities ---
|
|
66
|
+
/**
|
|
67
|
+
* Creates a new `Optional<T>` that **does** contain a value.
|
|
68
|
+
*/
|
|
69
|
+
static some(value) {
|
|
70
|
+
return new Optional(true, value);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Create a new `Optional<T>` that **does not** contain a value. `T` can be
|
|
74
|
+
* any type because we don't actually have a `T`.
|
|
75
|
+
*/
|
|
76
|
+
static none() {
|
|
77
|
+
return Optional.singletonNone;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Perform a transform on an `Optional` type. Regardless of whether this
|
|
81
|
+
* `Optional` contains a value or not, `fold` will return a value of type `U`.
|
|
82
|
+
* If this `Optional` does not contain a value, the `U` will be created by
|
|
83
|
+
* calling `onNone`. If this `Optional` does contain a value, the `U` will be
|
|
84
|
+
* created by calling `onSome`.
|
|
85
|
+
*
|
|
86
|
+
* For the FP enthusiasts in the room, this function:
|
|
87
|
+
* 1. Could be used to implement all of the functions below
|
|
88
|
+
* 2. Forms a catamorphism
|
|
89
|
+
*/
|
|
90
|
+
fold(onNone, onSome) {
|
|
91
|
+
if (this.tag) {
|
|
92
|
+
return onSome(this.value);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return onNone();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Determine if this `Optional` object contains a value.
|
|
100
|
+
*/
|
|
101
|
+
isSome() {
|
|
102
|
+
return this.tag;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Determine if this `Optional` object **does not** contain a value.
|
|
106
|
+
*/
|
|
107
|
+
isNone() {
|
|
108
|
+
return !this.tag;
|
|
109
|
+
}
|
|
110
|
+
// --- Functor (name stolen from Haskell / maths) ---
|
|
111
|
+
/**
|
|
112
|
+
* Perform a transform on an `Optional` object, **if** there is a value. If
|
|
113
|
+
* you provide a function to turn a T into a U, this is the function you use
|
|
114
|
+
* to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
|
|
115
|
+
* a value then the output will also contain a value (that value being the
|
|
116
|
+
* output of `mapper(this.value)`), and if this **does not** contain a value
|
|
117
|
+
* then neither will the output.
|
|
118
|
+
*/
|
|
119
|
+
map(mapper) {
|
|
120
|
+
if (this.tag) {
|
|
121
|
+
return Optional.some(mapper(this.value));
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return Optional.none();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// --- Monad (name stolen from Haskell / maths) ---
|
|
128
|
+
/**
|
|
129
|
+
* Perform a transform on an `Optional` object, **if** there is a value.
|
|
130
|
+
* Unlike `map`, here the transform itself also returns an `Optional`.
|
|
131
|
+
*/
|
|
132
|
+
bind(binder) {
|
|
133
|
+
if (this.tag) {
|
|
134
|
+
return binder(this.value);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
return Optional.none();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// --- Traversable (name stolen from Haskell / maths) ---
|
|
141
|
+
/**
|
|
142
|
+
* For a given predicate, this function finds out if there **exists** a value
|
|
143
|
+
* inside this `Optional` object that meets the predicate. In practice, this
|
|
144
|
+
* means that for `Optional`s that do not contain a value it returns false (as
|
|
145
|
+
* no predicate-meeting value exists).
|
|
146
|
+
*/
|
|
147
|
+
exists(predicate) {
|
|
148
|
+
return this.tag && predicate(this.value);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* For a given predicate, this function finds out if **all** the values inside
|
|
152
|
+
* this `Optional` object meet the predicate. In practice, this means that
|
|
153
|
+
* for `Optional`s that do not contain a value it returns true (as all 0
|
|
154
|
+
* objects do meet the predicate).
|
|
155
|
+
*/
|
|
156
|
+
forall(predicate) {
|
|
157
|
+
return !this.tag || predicate(this.value);
|
|
158
|
+
}
|
|
159
|
+
filter(predicate) {
|
|
160
|
+
if (!this.tag || predicate(this.value)) {
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return Optional.none();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// --- Getters ---
|
|
168
|
+
/**
|
|
169
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
170
|
+
* `replacement` value if the provided `Optional` object does not contain a
|
|
171
|
+
* value.
|
|
172
|
+
*/
|
|
173
|
+
getOr(replacement) {
|
|
174
|
+
return this.tag ? this.value : replacement;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
178
|
+
* `replacement` value if the provided `Optional` object does not contain a
|
|
179
|
+
* value. Unlike `getOr`, in this method the `replacement` object is also
|
|
180
|
+
* `Optional` - meaning that this method will always return an `Optional`.
|
|
181
|
+
*/
|
|
182
|
+
or(replacement) {
|
|
183
|
+
return this.tag ? this : replacement;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
187
|
+
* `replacement` value if the provided `Optional` object does not contain a
|
|
188
|
+
* value. Unlike `getOr`, in this method the `replacement` value is
|
|
189
|
+
* "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
|
|
190
|
+
* pass a function which (if called) will **return** the `value` you want to
|
|
191
|
+
* use.
|
|
192
|
+
*/
|
|
193
|
+
getOrThunk(thunk) {
|
|
194
|
+
return this.tag ? this.value : thunk();
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
198
|
+
* `replacement` value if the provided Optional object does not contain a
|
|
199
|
+
* value.
|
|
200
|
+
*
|
|
201
|
+
* Unlike `or`, in this method the `replacement` value is "thunked" - that is
|
|
202
|
+
* to say that you don't pass a value to `orThunk`, you pass a function which
|
|
203
|
+
* (if called) will **return** the `value` you want to use.
|
|
204
|
+
*
|
|
205
|
+
* Unlike `getOrThunk`, in this method the `replacement` value is also
|
|
206
|
+
* `Optional`, meaning that this method will always return an `Optional`.
|
|
207
|
+
*/
|
|
208
|
+
orThunk(thunk) {
|
|
209
|
+
return this.tag ? this : thunk();
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Get the value out of the inside of the `Optional` object, throwing an
|
|
213
|
+
* exception if the provided `Optional` object does not contain a value.
|
|
214
|
+
*
|
|
215
|
+
* WARNING:
|
|
216
|
+
* You should only be using this function if you know that the `Optional`
|
|
217
|
+
* object **is not** empty (otherwise you're throwing exceptions in production
|
|
218
|
+
* code, which is bad).
|
|
219
|
+
*
|
|
220
|
+
* In tests this is more acceptable.
|
|
221
|
+
*
|
|
222
|
+
* Prefer other methods to this, such as `.each`.
|
|
223
|
+
*/
|
|
224
|
+
getOrDie(message) {
|
|
225
|
+
if (!this.tag) {
|
|
226
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
return this.value;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// --- Interop with null and undefined ---
|
|
233
|
+
/**
|
|
234
|
+
* Creates an `Optional` value from a nullable (or undefined-able) input.
|
|
235
|
+
* Null, or undefined, is converted to `None`, and anything else is converted
|
|
236
|
+
* to `Some`.
|
|
237
|
+
*/
|
|
238
|
+
static from(value) {
|
|
239
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Converts an `Optional` to a nullable type, by getting the value if it
|
|
243
|
+
* exists, or returning `null` if it does not.
|
|
244
|
+
*/
|
|
245
|
+
getOrNull() {
|
|
246
|
+
return this.tag ? this.value : null;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Converts an `Optional` to an undefined-able type, by getting the value if
|
|
250
|
+
* it exists, or returning `undefined` if it does not.
|
|
251
|
+
*/
|
|
252
|
+
getOrUndefined() {
|
|
253
|
+
return this.value;
|
|
254
|
+
}
|
|
255
|
+
// --- Utilities ---
|
|
256
|
+
/**
|
|
257
|
+
* If the `Optional` contains a value, perform an action on that value.
|
|
258
|
+
* Unlike the rest of the methods on this type, `.each` has side-effects. If
|
|
259
|
+
* you want to transform an `Optional<T>` **into** something, then this is not
|
|
260
|
+
* the method for you. If you want to use an `Optional<T>` to **do**
|
|
261
|
+
* something, then this is the method for you - provided you're okay with not
|
|
262
|
+
* doing anything in the case where the `Optional` doesn't have a value inside
|
|
263
|
+
* it. If you're not sure whether your use-case fits into transforming
|
|
264
|
+
* **into** something or **doing** something, check whether it has a return
|
|
265
|
+
* value. If it does, you should be performing a transform.
|
|
266
|
+
*/
|
|
267
|
+
each(worker) {
|
|
268
|
+
if (this.tag) {
|
|
269
|
+
worker(this.value);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Turn the `Optional` object into an array that contains all of the values
|
|
274
|
+
* stored inside the `Optional`. In practice, this means the output will have
|
|
275
|
+
* either 0 or 1 elements.
|
|
276
|
+
*/
|
|
277
|
+
toArray() {
|
|
278
|
+
return this.tag ? [this.value] : [];
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Turn the `Optional` object into a string for debugging or printing. Not
|
|
282
|
+
* recommended for production code, but good for debugging. Also note that
|
|
283
|
+
* these days an `Optional` object can be logged to the console directly, and
|
|
284
|
+
* its inner value (if it exists) will be visible.
|
|
285
|
+
*/
|
|
286
|
+
toString() {
|
|
287
|
+
return this.tag ? `some(${this.value})` : 'none()';
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
291
|
+
// reuse the same object
|
|
292
|
+
Optional.singletonNone = new Optional(false);
|
|
293
|
+
|
|
294
|
+
const nativeIndexOf = Array.prototype.indexOf;
|
|
295
|
+
/* eslint-enable */
|
|
296
|
+
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
297
|
+
const contains = (xs, x) => rawIndexOf(xs, x) > -1;
|
|
298
|
+
const findUntil = (xs, pred, until) => {
|
|
299
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
300
|
+
const x = xs[i];
|
|
301
|
+
if (pred(x, i)) {
|
|
302
|
+
return Optional.some(x);
|
|
303
|
+
}
|
|
304
|
+
else if (until(x, i)) {
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return Optional.none();
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
// There are many variations of Object iteration that are faster than the 'for-in' style:
|
|
312
|
+
// http://jsperf.com/object-keys-iteration/107
|
|
313
|
+
//
|
|
314
|
+
// Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
|
|
315
|
+
const keys = Object.keys;
|
|
316
|
+
const each = (obj, f) => {
|
|
317
|
+
const props = keys(obj);
|
|
318
|
+
for (let k = 0, len = props.length; k < len; k++) {
|
|
319
|
+
const i = props[k];
|
|
320
|
+
const x = obj[i];
|
|
321
|
+
f(x, i);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
const map = (obj, f) => {
|
|
325
|
+
return tupleMap(obj, (x, i) => ({
|
|
326
|
+
k: i,
|
|
327
|
+
v: f(x, i)
|
|
328
|
+
}));
|
|
329
|
+
};
|
|
330
|
+
const tupleMap = (obj, f) => {
|
|
331
|
+
const r = {};
|
|
332
|
+
each(obj, (x, i) => {
|
|
333
|
+
const tuple = f(x, i);
|
|
334
|
+
r[tuple.k] = tuple.v;
|
|
335
|
+
});
|
|
336
|
+
return r;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
340
|
+
|
|
341
|
+
const isCustomList = (list) => /\btox\-/.test(list.className);
|
|
342
|
+
const isChildOfBody = (editor, elm) => {
|
|
343
|
+
return editor.dom.isChildOf(elm, editor.getBody());
|
|
344
|
+
};
|
|
345
|
+
const matchNodeNames = (regex) => (node) => isNonNullable(node) && regex.test(node.nodeName);
|
|
346
|
+
const isListNode = matchNodeNames(/^(OL|UL|DL)$/);
|
|
347
|
+
const isTableCellNode = matchNodeNames(/^(TH|TD)$/);
|
|
348
|
+
const inList = (editor, parents, nodeName) => findUntil(parents, (parent) => isListNode(parent) && !isCustomList(parent), isTableCellNode)
|
|
349
|
+
.exists((list) => list.nodeName === nodeName && isChildOfBody(editor, list));
|
|
350
|
+
const getSelectedStyleType = (editor) => {
|
|
351
|
+
const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
|
|
352
|
+
const style = editor.dom.getStyle(listElm, 'listStyleType');
|
|
353
|
+
return Optional.from(style);
|
|
354
|
+
};
|
|
355
|
+
// Lists/core/Util.ts - Duplicated in Lists plugin
|
|
356
|
+
const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);
|
|
357
|
+
const isWithinNonEditableList = (editor, element) => {
|
|
358
|
+
const parentList = editor.dom.getParent(element, 'ol,ul,dl');
|
|
359
|
+
return isWithinNonEditable(editor, parentList) || !editor.selection.isEditable();
|
|
360
|
+
};
|
|
361
|
+
const setNodeChangeHandler = (editor, nodeChangeHandler) => {
|
|
362
|
+
const initialNode = editor.selection.getNode();
|
|
363
|
+
// Set the initial state
|
|
364
|
+
nodeChangeHandler({
|
|
365
|
+
parents: editor.dom.getParents(initialNode),
|
|
366
|
+
element: initialNode
|
|
367
|
+
});
|
|
368
|
+
editor.on('NodeChange', nodeChangeHandler);
|
|
369
|
+
return () => editor.off('NodeChange', nodeChangeHandler);
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
// <ListStyles>
|
|
373
|
+
const styleValueToText = (styleValue) => {
|
|
374
|
+
return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, (chr) => {
|
|
375
|
+
return chr.toUpperCase();
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
const normalizeStyleValue = (styleValue) => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;
|
|
379
|
+
const makeSetupHandler = (editor, nodeName) => (api) => {
|
|
380
|
+
const updateButtonState = (editor, parents) => {
|
|
381
|
+
const element = editor.selection.getStart(true);
|
|
382
|
+
api.setActive(inList(editor, parents, nodeName));
|
|
383
|
+
api.setEnabled(!isWithinNonEditableList(editor, element));
|
|
384
|
+
};
|
|
385
|
+
const nodeChangeHandler = (e) => updateButtonState(editor, e.parents);
|
|
386
|
+
return setNodeChangeHandler(editor, nodeChangeHandler);
|
|
387
|
+
};
|
|
388
|
+
const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {
|
|
389
|
+
const listStyleTypeAliases = {
|
|
390
|
+
'lower-latin': 'lower-alpha',
|
|
391
|
+
'upper-latin': 'upper-alpha',
|
|
392
|
+
'lower-alpha': 'lower-latin',
|
|
393
|
+
'upper-alpha': 'upper-latin'
|
|
394
|
+
};
|
|
395
|
+
const stylesContainsAliasMap = map(listStyleTypeAliases, (alias) => contains(styles, alias));
|
|
396
|
+
editor.ui.registry.addSplitButton(id, {
|
|
397
|
+
tooltip,
|
|
398
|
+
icon: nodeName === "OL" /* ListType.OrderedList */ ? 'ordered-list' : 'unordered-list',
|
|
399
|
+
presets: 'listpreview',
|
|
400
|
+
columns: nodeName === "OL" /* ListType.OrderedList */ ? 3 : 4,
|
|
401
|
+
fetch: (callback) => {
|
|
402
|
+
const items = global.map(styles, (styleValue) => {
|
|
403
|
+
const iconStyle = nodeName === "OL" /* ListType.OrderedList */ ? 'num' : 'bull';
|
|
404
|
+
const iconName = styleValue === 'decimal' ? 'default' : styleValue;
|
|
405
|
+
const itemValue = normalizeStyleValue(styleValue);
|
|
406
|
+
const displayText = styleValueToText(styleValue);
|
|
407
|
+
return {
|
|
408
|
+
type: 'choiceitem',
|
|
409
|
+
value: itemValue,
|
|
410
|
+
icon: 'list-' + iconStyle + '-' + iconName,
|
|
411
|
+
text: displayText
|
|
412
|
+
};
|
|
413
|
+
});
|
|
414
|
+
callback(items);
|
|
415
|
+
},
|
|
416
|
+
onAction: () => editor.execCommand(cmd),
|
|
417
|
+
onItemAction: (_splitButtonApi, value) => {
|
|
418
|
+
applyListFormat(editor, nodeName, value);
|
|
419
|
+
},
|
|
420
|
+
select: (value) => {
|
|
421
|
+
const listStyleType = getSelectedStyleType(editor);
|
|
422
|
+
return listStyleType.exists((listStyle) => value === listStyle || (listStyleTypeAliases[listStyle] === value && !stylesContainsAliasMap[value]));
|
|
423
|
+
},
|
|
424
|
+
onSetup: makeSetupHandler(editor, nodeName)
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {
|
|
428
|
+
editor.ui.registry.addToggleButton(id, {
|
|
429
|
+
active: false,
|
|
430
|
+
tooltip,
|
|
431
|
+
icon: nodeName === "OL" /* ListType.OrderedList */ ? 'ordered-list' : 'unordered-list',
|
|
432
|
+
onSetup: makeSetupHandler(editor, nodeName),
|
|
433
|
+
// Need to make sure the button removes rather than applies if a list of the same type is selected
|
|
434
|
+
onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {
|
|
438
|
+
if (styles.length > 1) {
|
|
439
|
+
addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
const register = (editor) => {
|
|
446
|
+
addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', "OL" /* ListType.OrderedList */, getNumberStyles(editor));
|
|
447
|
+
addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', "UL" /* ListType.UnorderedList */, getBulletStyles(editor));
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
var Plugin = () => {
|
|
451
|
+
global$1.add('advlist', (editor) => {
|
|
452
|
+
if (editor.hasPlugin('lists')) {
|
|
453
|
+
register$1(editor);
|
|
454
|
+
register(editor);
|
|
455
|
+
register$2(editor);
|
|
456
|
+
}
|
|
457
|
+
else {
|
|
458
|
+
// eslint-disable-next-line no-console
|
|
459
|
+
console.error('Please use the Lists plugin together with the List Styles plugin.');
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
Plugin();
|
|
465
|
+
/** *****
|
|
466
|
+
* DO NOT EXPORT ANYTHING
|
|
467
|
+
*
|
|
468
|
+
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
469
|
+
*******/
|
|
470
|
+
|
|
471
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),l=t=>null==t,i=t=>!l(t);class o{constructor(t,e){this.tag=t,this.value=e}static some(t){return new o(!0,t)}static none(){return o.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?o.some(t(this.value)):o.none()}bind(t){return this.tag?t(this.value):o.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:o.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return i(t)?o.some(t):o.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}o.singletonNone=new o(!1);const a=Array.prototype.indexOf,u=Object.keys;var d=tinymce.util.Tools.resolve("tinymce.util.Tools");const c=t=>e=>i(e)&&t.test(e.nodeName),h=c(/^(OL|UL|DL)$/),g=c(/^(TH|TD)$/),p=t=>l(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];if(h(r=n)&&!/\btox\-/.test(r.className))return o.some(n);if(s(n,e))break}var r;return o.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)||!t.selection.isEditable()})(t,n))})(t,r.parents))),v=(t,s,r,n,l,i)=>{const c={"lower-latin":"lower-alpha","upper-latin":"upper-alpha","lower-alpha":"lower-latin","upper-alpha":"upper-latin"},h=(g=t=>{return e=i,s=t,a.call(e,s)>-1;var e,s},((t,e)=>{const s={};return((t,e)=>{const s=u(t);for(let r=0,n=s.length;r<n;r++){const n=s[r];e(t[n],n)}})(t,((t,r)=>{const n=e(t,r);s[n.k]=n.v})),s})(c,((t,e)=>({k:e,v:g(t)}))));var g;t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===l?"ordered-list":"unordered-list",presets:"listpreview",columns:"OL"===l?3:4,fetch:t=>{t(d.map(i,(t=>{const e="OL"===l?"num":"bull",s="decimal"===t?"default":t,r=p(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,l,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return o.from(s)})(t);return s.exists((t=>e===t||c[t]===e&&!h[e]))},onSetup:m(t,l)})},y=(t,s,r,n,l,i)=>{i.length>1?v(t,s,r,n,l,i):((t,s,r,n,l,i)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===l?"ordered-list":"unordered-list",onSetup:m(t,l),onAction:()=>t.queryCommandState(n)||""===i?t.execCommand(n):e(t,l,i)})})(t,s,r,n,l,p(i[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,disc,circle,square".split(",")})})(t),(t=>{y(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),y(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the List Styles plugin.")}))}();
|