create-nextjs-cms 0.5.55 → 0.5.58
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/package.json +4 -4
- package/templates/default/CHANGELOG.md +140 -140
- package/templates/default/_gitignore +1 -0
- package/templates/default/app/(auth)/auth/login/LoginPage.tsx +14 -11
- package/templates/default/app/(rootLayout)/admins/page.tsx +7 -2
- package/templates/default/app/(rootLayout)/advanced/page.tsx +8 -2
- package/templates/default/app/(rootLayout)/browse/[section]/[page]/page.tsx +17 -3
- package/templates/default/app/(rootLayout)/categorized/[section]/page.tsx +9 -1
- package/templates/default/app/(rootLayout)/dashboard-new/page.tsx +7 -0
- package/templates/default/app/(rootLayout)/edit/[section]/[itemId]/page.tsx +11 -1
- package/templates/default/app/(rootLayout)/layout.tsx +8 -1
- package/templates/default/app/(rootLayout)/new/[section]/page.tsx +9 -1
- package/templates/default/app/(rootLayout)/section/[section]/page.tsx +10 -1
- package/templates/default/app/(rootLayout)/settings/page.tsx +7 -1
- package/templates/default/app/api/trpc/[trpc]/route.ts +1 -1
- package/templates/default/app/api/video/route.ts +1 -1
- package/templates/default/app/layout.tsx +5 -3
- package/templates/default/app/providers.tsx +10 -9
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/LICENSE +191 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/README.md +118 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/build.js +38 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/install/check.js +14 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/channel.js +177 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/colour.js +195 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/composite.js +212 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/constructor.js +499 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.d.ts +1971 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/index.js +16 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/input.js +809 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/is.js +143 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/libvips.js +207 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/operation.js +1016 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/output.js +1666 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/resize.js +595 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/sharp.js +121 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/lib/utility.js +291 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/package.json +202 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/binding.gyp +298 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.cc +1130 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/common.h +402 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.cc +346 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/metadata.h +90 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.cc +499 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/operations.h +137 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.cc +1814 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/pipeline.h +408 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/sharp.cc +43 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.cc +186 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/stats.h +62 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.cc +288 -0
- package/templates/default/apps/cms/node_modules/next/node_modules/_tmp_40516_de1b9f7e36eccb968b79dbd2b8c388ea/src/utilities.h +22 -0
- package/templates/default/components/BrowsePage.tsx +4 -4
- package/templates/default/components/DashboardNewPage.tsx +252 -0
- package/templates/default/components/Layout.tsx +2 -2
- package/templates/default/components/LogPage.tsx +2 -3
- package/templates/default/components/NavbarAlt.tsx +5 -5
- package/templates/default/components/SettingsPage.tsx +1 -1
- package/templates/default/components/Sidebar.tsx +7 -7
- package/templates/default/components/form/Form.tsx +5 -5
- package/templates/default/components/form/helpers/util.ts +5 -5
- package/templates/default/dynamic-schemas/schema.ts +381 -381
- package/templates/default/next-env.d.ts +1 -1
- package/templates/default/next.config.ts +24 -0
- package/templates/default/package.json +23 -17
- package/templates/default/{middleware.ts → proxy.ts} +3 -4
- package/templates/default/test/prize.section.ts +58 -0
- package/templates/default/tsconfig.json +6 -3
- package/templates/default/app/api/placeholder/route.ts +0 -7
- package/templates/default/components/form/helpers/_section-hot-reload.js +0 -11
- package/templates/default/public/tinymce/CHANGELOG.md +0 -3940
- package/templates/default/public/tinymce/README.md +0 -77
- package/templates/default/public/tinymce/bower.json +0 -27
- package/templates/default/public/tinymce/composer.json +0 -52
- package/templates/default/public/tinymce/icons/default/icons.js +0 -239
- package/templates/default/public/tinymce/icons/default/icons.min.js +0 -1
- package/templates/default/public/tinymce/icons/default/index.js +0 -7
- package/templates/default/public/tinymce/license.md +0 -9
- package/templates/default/public/tinymce/models/dom/index.js +0 -7
- package/templates/default/public/tinymce/models/dom/model.js +0 -8980
- package/templates/default/public/tinymce/models/dom/model.min.js +0 -1
- package/templates/default/public/tinymce/notices.txt +0 -21
- package/templates/default/public/tinymce/package.json +0 -32
- package/templates/default/public/tinymce/plugins/accordion/index.js +0 -7
- package/templates/default/public/tinymce/plugins/accordion/plugin.js +0 -1373
- package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/advlist/index.js +0 -7
- package/templates/default/public/tinymce/plugins/advlist/plugin.js +0 -473
- package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/anchor/index.js +0 -7
- package/templates/default/public/tinymce/plugins/anchor/plugin.js +0 -237
- package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/autolink/index.js +0 -7
- package/templates/default/public/tinymce/plugins/autolink/plugin.js +0 -315
- package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/autoresize/index.js +0 -7
- package/templates/default/public/tinymce/plugins/autoresize/plugin.js +0 -221
- package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/autosave/index.js +0 -7
- package/templates/default/public/tinymce/plugins/autosave/plugin.js +0 -249
- package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/charmap/index.js +0 -7
- package/templates/default/public/tinymce/plugins/charmap/plugin.js +0 -997
- package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/code/index.js +0 -7
- package/templates/default/public/tinymce/plugins/code/plugin.js +0 -98
- package/templates/default/public/tinymce/plugins/code/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/codesample/index.js +0 -7
- package/templates/default/public/tinymce/plugins/codesample/plugin.js +0 -3655
- package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +0 -9
- package/templates/default/public/tinymce/plugins/directionality/index.js +0 -7
- package/templates/default/public/tinymce/plugins/directionality/plugin.js +0 -634
- package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/index.js +0 -7
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +0 -1
- package/templates/default/public/tinymce/plugins/emoticons/plugin.js +0 -809
- package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/fullscreen/index.js +0 -7
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +0 -1607
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/help/index.js +0 -7
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg-BG.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr-FR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he-IL.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu-HU.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko-KR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb-NO.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-BR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt-PT.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl-SI.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv-SE.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th-TH.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-CN.js +0 -87
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh-TW.js +0 -93
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +0 -87
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +0 -93
- package/templates/default/public/tinymce/plugins/help/plugin.js +0 -826
- package/templates/default/public/tinymce/plugins/help/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/image/index.js +0 -7
- package/templates/default/public/tinymce/plugins/image/plugin.js +0 -1691
- package/templates/default/public/tinymce/plugins/image/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/importcss/index.js +0 -7
- package/templates/default/public/tinymce/plugins/importcss/plugin.js +0 -401
- package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/insertdatetime/index.js +0 -7
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +0 -187
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/link/index.js +0 -7
- package/templates/default/public/tinymce/plugins/link/plugin.js +0 -1709
- package/templates/default/public/tinymce/plugins/link/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/lists/index.js +0 -7
- package/templates/default/public/tinymce/plugins/lists/plugin.js +0 -602
- package/templates/default/public/tinymce/plugins/lists/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/media/index.js +0 -7
- package/templates/default/public/tinymce/plugins/media/plugin.js +0 -1442
- package/templates/default/public/tinymce/plugins/media/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/nonbreaking/index.js +0 -7
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +0 -128
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/pagebreak/index.js +0 -7
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +0 -123
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/preview/index.js +0 -7
- package/templates/default/public/tinymce/plugins/preview/plugin.js +0 -843
- package/templates/default/public/tinymce/plugins/preview/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/quickbars/index.js +0 -7
- package/templates/default/public/tinymce/plugins/quickbars/plugin.js +0 -654
- package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/save/index.js +0 -7
- package/templates/default/public/tinymce/plugins/save/plugin.js +0 -136
- package/templates/default/public/tinymce/plugins/save/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/searchreplace/index.js +0 -7
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +0 -1367
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/table/index.js +0 -7
- package/templates/default/public/tinymce/plugins/table/plugin.js +0 -4008
- package/templates/default/public/tinymce/plugins/table/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/visualblocks/index.js +0 -7
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +0 -106
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/visualchars/index.js +0 -7
- package/templates/default/public/tinymce/plugins/visualchars/plugin.js +0 -808
- package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +0 -1
- package/templates/default/public/tinymce/plugins/wordcount/index.js +0 -7
- package/templates/default/public/tinymce/plugins/wordcount/plugin.js +0 -480
- package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +0 -1
- package/templates/default/public/tinymce/skins/content/dark/content.css +0 -75
- package/templates/default/public/tinymce/skins/content/dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/dark/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/dark/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/default/content.css +0 -70
- package/templates/default/public/tinymce/skins/content/default/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/default/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/default/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/default/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/document/content.css +0 -75
- package/templates/default/public/tinymce/skins/content/document/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/document/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/document/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/document/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +0 -70
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +0 -75
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.ts +0 -3
- package/templates/default/public/tinymce/skins/content/writer/content.css +0 -71
- package/templates/default/public/tinymce/skins/content/writer/content.js +0 -10
- package/templates/default/public/tinymce/skins/content/writer/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/content/writer/content.min.ts +0 -3
- package/templates/default/public/tinymce/skins/content/writer/content.ts +0 -3
- package/templates/default/public/tinymce/skins/ui/oxide/content.css +0 -1037
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide/skin.css +0 -5615
- package/templates/default/public/tinymce/skins/ui/oxide/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide/skin.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +0 -1025
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +0 -5618
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.ts +0 -507
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +0 -1037
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +0 -5734
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.ts +0 -508
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.ts +0 -508
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +0 -1025
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +0 -1031
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -10
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.ts +0 -116
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +0 -5734
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.ts +0 -508
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +0 -30
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.ts +0 -9
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.ts +0 -508
- package/templates/default/public/tinymce/themes/silver/index.js +0 -7
- package/templates/default/public/tinymce/themes/silver/theme.js +0 -34748
- package/templates/default/public/tinymce/themes/silver/theme.min.js +0 -1
- package/templates/default/public/tinymce/tinymce.d.ts +0 -3413
- package/templates/default/public/tinymce/tinymce.js +0 -41518
- package/templates/default/public/tinymce/tinymce.min.js +0 -10
|
@@ -1,826 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TinyMCE version 8.3.1 (2025-12-17)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
(function () {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
9
|
-
const hasProto = (v, constructor, predicate) => {
|
|
10
|
-
if (predicate(v, constructor.prototype)) {
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
// String-based fallback time
|
|
15
|
-
return v.constructor?.name === constructor.name;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const typeOf = (x) => {
|
|
19
|
-
const t = typeof x;
|
|
20
|
-
if (x === null) {
|
|
21
|
-
return 'null';
|
|
22
|
-
}
|
|
23
|
-
else if (t === 'object' && Array.isArray(x)) {
|
|
24
|
-
return 'array';
|
|
25
|
-
}
|
|
26
|
-
else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
27
|
-
return 'string';
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return t;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const isType = (type) => (value) => typeOf(value) === type;
|
|
34
|
-
const isSimpleType = (type) => (value) => typeof value === type;
|
|
35
|
-
const eq = (t) => (a) => t === a;
|
|
36
|
-
const isString = isType('string');
|
|
37
|
-
const isUndefined = eq(undefined);
|
|
38
|
-
const isNullable = (a) => a === null || a === undefined;
|
|
39
|
-
const isNonNullable = (a) => !isNullable(a);
|
|
40
|
-
const isFunction = isSimpleType('function');
|
|
41
|
-
|
|
42
|
-
const constant = (value) => {
|
|
43
|
-
return () => {
|
|
44
|
-
return value;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
const never = constant(false);
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The `Optional` type represents a value (of any type) that potentially does
|
|
51
|
-
* not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
|
|
52
|
-
* value does exist) or a `None` (in which case the value does not exist). This
|
|
53
|
-
* module defines a whole lot of FP-inspired utility functions for dealing with
|
|
54
|
-
* `Optional` objects.
|
|
55
|
-
*
|
|
56
|
-
* Comparison with null or undefined:
|
|
57
|
-
* - We don't get fancy null coalescing operators with `Optional`
|
|
58
|
-
* - We do get fancy helper functions with `Optional`
|
|
59
|
-
* - `Optional` support nesting, and allow for the type to still be nullable (or
|
|
60
|
-
* another `Optional`)
|
|
61
|
-
* - There is no option to turn off strict-optional-checks like there is for
|
|
62
|
-
* strict-null-checks
|
|
63
|
-
*/
|
|
64
|
-
class Optional {
|
|
65
|
-
tag;
|
|
66
|
-
value;
|
|
67
|
-
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
68
|
-
// reuse the same object
|
|
69
|
-
static singletonNone = new Optional(false);
|
|
70
|
-
// The internal representation has a `tag` and a `value`, but both are
|
|
71
|
-
// private: able to be console.logged, but not able to be accessed by code
|
|
72
|
-
constructor(tag, value) {
|
|
73
|
-
this.tag = tag;
|
|
74
|
-
this.value = value;
|
|
75
|
-
}
|
|
76
|
-
// --- Identities ---
|
|
77
|
-
/**
|
|
78
|
-
* Creates a new `Optional<T>` that **does** contain a value.
|
|
79
|
-
*/
|
|
80
|
-
static some(value) {
|
|
81
|
-
return new Optional(true, value);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Create a new `Optional<T>` that **does not** contain a value. `T` can be
|
|
85
|
-
* any type because we don't actually have a `T`.
|
|
86
|
-
*/
|
|
87
|
-
static none() {
|
|
88
|
-
return Optional.singletonNone;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Perform a transform on an `Optional` type. Regardless of whether this
|
|
92
|
-
* `Optional` contains a value or not, `fold` will return a value of type `U`.
|
|
93
|
-
* If this `Optional` does not contain a value, the `U` will be created by
|
|
94
|
-
* calling `onNone`. If this `Optional` does contain a value, the `U` will be
|
|
95
|
-
* created by calling `onSome`.
|
|
96
|
-
*
|
|
97
|
-
* For the FP enthusiasts in the room, this function:
|
|
98
|
-
* 1. Could be used to implement all of the functions below
|
|
99
|
-
* 2. Forms a catamorphism
|
|
100
|
-
*/
|
|
101
|
-
fold(onNone, onSome) {
|
|
102
|
-
if (this.tag) {
|
|
103
|
-
return onSome(this.value);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
return onNone();
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Determine if this `Optional` object contains a value.
|
|
111
|
-
*/
|
|
112
|
-
isSome() {
|
|
113
|
-
return this.tag;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Determine if this `Optional` object **does not** contain a value.
|
|
117
|
-
*/
|
|
118
|
-
isNone() {
|
|
119
|
-
return !this.tag;
|
|
120
|
-
}
|
|
121
|
-
// --- Functor (name stolen from Haskell / maths) ---
|
|
122
|
-
/**
|
|
123
|
-
* Perform a transform on an `Optional` object, **if** there is a value. If
|
|
124
|
-
* you provide a function to turn a T into a U, this is the function you use
|
|
125
|
-
* to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
|
|
126
|
-
* a value then the output will also contain a value (that value being the
|
|
127
|
-
* output of `mapper(this.value)`), and if this **does not** contain a value
|
|
128
|
-
* then neither will the output.
|
|
129
|
-
*/
|
|
130
|
-
map(mapper) {
|
|
131
|
-
if (this.tag) {
|
|
132
|
-
return Optional.some(mapper(this.value));
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
return Optional.none();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
// --- Monad (name stolen from Haskell / maths) ---
|
|
139
|
-
/**
|
|
140
|
-
* Perform a transform on an `Optional` object, **if** there is a value.
|
|
141
|
-
* Unlike `map`, here the transform itself also returns an `Optional`.
|
|
142
|
-
*/
|
|
143
|
-
bind(binder) {
|
|
144
|
-
if (this.tag) {
|
|
145
|
-
return binder(this.value);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
return Optional.none();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
// --- Traversable (name stolen from Haskell / maths) ---
|
|
152
|
-
/**
|
|
153
|
-
* For a given predicate, this function finds out if there **exists** a value
|
|
154
|
-
* inside this `Optional` object that meets the predicate. In practice, this
|
|
155
|
-
* means that for `Optional`s that do not contain a value it returns false (as
|
|
156
|
-
* no predicate-meeting value exists).
|
|
157
|
-
*/
|
|
158
|
-
exists(predicate) {
|
|
159
|
-
return this.tag && predicate(this.value);
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* For a given predicate, this function finds out if **all** the values inside
|
|
163
|
-
* this `Optional` object meet the predicate. In practice, this means that
|
|
164
|
-
* for `Optional`s that do not contain a value it returns true (as all 0
|
|
165
|
-
* objects do meet the predicate).
|
|
166
|
-
*/
|
|
167
|
-
forall(predicate) {
|
|
168
|
-
return !this.tag || predicate(this.value);
|
|
169
|
-
}
|
|
170
|
-
filter(predicate) {
|
|
171
|
-
if (!this.tag || predicate(this.value)) {
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
return Optional.none();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
// --- Getters ---
|
|
179
|
-
/**
|
|
180
|
-
* Get the value out of the inside of the `Optional` object, using a default
|
|
181
|
-
* `replacement` value if the provided `Optional` object does not contain a
|
|
182
|
-
* value.
|
|
183
|
-
*/
|
|
184
|
-
getOr(replacement) {
|
|
185
|
-
return this.tag ? this.value : replacement;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Get the value out of the inside of the `Optional` object, using a default
|
|
189
|
-
* `replacement` value if the provided `Optional` object does not contain a
|
|
190
|
-
* value. Unlike `getOr`, in this method the `replacement` object is also
|
|
191
|
-
* `Optional` - meaning that this method will always return an `Optional`.
|
|
192
|
-
*/
|
|
193
|
-
or(replacement) {
|
|
194
|
-
return this.tag ? this : replacement;
|
|
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. Unlike `getOr`, in this method the `replacement` value is
|
|
200
|
-
* "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
|
|
201
|
-
* pass a function which (if called) will **return** the `value` you want to
|
|
202
|
-
* use.
|
|
203
|
-
*/
|
|
204
|
-
getOrThunk(thunk) {
|
|
205
|
-
return this.tag ? this.value : thunk();
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Get the value out of the inside of the `Optional` object, using a default
|
|
209
|
-
* `replacement` value if the provided Optional object does not contain a
|
|
210
|
-
* value.
|
|
211
|
-
*
|
|
212
|
-
* Unlike `or`, in this method the `replacement` value is "thunked" - that is
|
|
213
|
-
* to say that you don't pass a value to `orThunk`, you pass a function which
|
|
214
|
-
* (if called) will **return** the `value` you want to use.
|
|
215
|
-
*
|
|
216
|
-
* Unlike `getOrThunk`, in this method the `replacement` value is also
|
|
217
|
-
* `Optional`, meaning that this method will always return an `Optional`.
|
|
218
|
-
*/
|
|
219
|
-
orThunk(thunk) {
|
|
220
|
-
return this.tag ? this : thunk();
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Get the value out of the inside of the `Optional` object, throwing an
|
|
224
|
-
* exception if the provided `Optional` object does not contain a value.
|
|
225
|
-
*
|
|
226
|
-
* WARNING:
|
|
227
|
-
* You should only be using this function if you know that the `Optional`
|
|
228
|
-
* object **is not** empty (otherwise you're throwing exceptions in production
|
|
229
|
-
* code, which is bad).
|
|
230
|
-
*
|
|
231
|
-
* In tests this is more acceptable.
|
|
232
|
-
*
|
|
233
|
-
* Prefer other methods to this, such as `.each`.
|
|
234
|
-
*/
|
|
235
|
-
getOrDie(message) {
|
|
236
|
-
if (!this.tag) {
|
|
237
|
-
throw new Error(message ?? 'Called getOrDie on None');
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
return this.value;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
// --- Interop with null and undefined ---
|
|
244
|
-
/**
|
|
245
|
-
* Creates an `Optional` value from a nullable (or undefined-able) input.
|
|
246
|
-
* Null, or undefined, is converted to `None`, and anything else is converted
|
|
247
|
-
* to `Some`.
|
|
248
|
-
*/
|
|
249
|
-
static from(value) {
|
|
250
|
-
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Converts an `Optional` to a nullable type, by getting the value if it
|
|
254
|
-
* exists, or returning `null` if it does not.
|
|
255
|
-
*/
|
|
256
|
-
getOrNull() {
|
|
257
|
-
return this.tag ? this.value : null;
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Converts an `Optional` to an undefined-able type, by getting the value if
|
|
261
|
-
* it exists, or returning `undefined` if it does not.
|
|
262
|
-
*/
|
|
263
|
-
getOrUndefined() {
|
|
264
|
-
return this.value;
|
|
265
|
-
}
|
|
266
|
-
// --- Utilities ---
|
|
267
|
-
/**
|
|
268
|
-
* If the `Optional` contains a value, perform an action on that value.
|
|
269
|
-
* Unlike the rest of the methods on this type, `.each` has side-effects. If
|
|
270
|
-
* you want to transform an `Optional<T>` **into** something, then this is not
|
|
271
|
-
* the method for you. If you want to use an `Optional<T>` to **do**
|
|
272
|
-
* something, then this is the method for you - provided you're okay with not
|
|
273
|
-
* doing anything in the case where the `Optional` doesn't have a value inside
|
|
274
|
-
* it. If you're not sure whether your use-case fits into transforming
|
|
275
|
-
* **into** something or **doing** something, check whether it has a return
|
|
276
|
-
* value. If it does, you should be performing a transform.
|
|
277
|
-
*/
|
|
278
|
-
each(worker) {
|
|
279
|
-
if (this.tag) {
|
|
280
|
-
worker(this.value);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Turn the `Optional` object into an array that contains all of the values
|
|
285
|
-
* stored inside the `Optional`. In practice, this means the output will have
|
|
286
|
-
* either 0 or 1 elements.
|
|
287
|
-
*/
|
|
288
|
-
toArray() {
|
|
289
|
-
return this.tag ? [this.value] : [];
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Turn the `Optional` object into a string for debugging or printing. Not
|
|
293
|
-
* recommended for production code, but good for debugging. Also note that
|
|
294
|
-
* these days an `Optional` object can be logged to the console directly, and
|
|
295
|
-
* its inner value (if it exists) will be visible.
|
|
296
|
-
*/
|
|
297
|
-
toString() {
|
|
298
|
-
return this.tag ? `some(${this.value})` : 'none()';
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
const nativeSlice = Array.prototype.slice;
|
|
303
|
-
const nativeIndexOf = Array.prototype.indexOf;
|
|
304
|
-
const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
|
|
305
|
-
const contains = (xs, x) => rawIndexOf(xs, x) > -1;
|
|
306
|
-
const map = (xs, f) => {
|
|
307
|
-
// pre-allocating array size when it's guaranteed to be known
|
|
308
|
-
// http://jsperf.com/push-allocated-vs-dynamic/22
|
|
309
|
-
const len = xs.length;
|
|
310
|
-
const r = new Array(len);
|
|
311
|
-
for (let i = 0; i < len; i++) {
|
|
312
|
-
const x = xs[i];
|
|
313
|
-
r[i] = f(x, i);
|
|
314
|
-
}
|
|
315
|
-
return r;
|
|
316
|
-
};
|
|
317
|
-
const filter = (xs, pred) => {
|
|
318
|
-
const r = [];
|
|
319
|
-
for (let i = 0, len = xs.length; i < len; i++) {
|
|
320
|
-
const x = xs[i];
|
|
321
|
-
if (pred(x, i)) {
|
|
322
|
-
r.push(x);
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return r;
|
|
326
|
-
};
|
|
327
|
-
const findUntil = (xs, pred, until) => {
|
|
328
|
-
for (let i = 0, len = xs.length; i < len; i++) {
|
|
329
|
-
const x = xs[i];
|
|
330
|
-
if (pred(x, i)) {
|
|
331
|
-
return Optional.some(x);
|
|
332
|
-
}
|
|
333
|
-
else if (until(x, i)) {
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return Optional.none();
|
|
338
|
-
};
|
|
339
|
-
const find = (xs, pred) => {
|
|
340
|
-
return findUntil(xs, pred, never);
|
|
341
|
-
};
|
|
342
|
-
const sort = (xs, comparator) => {
|
|
343
|
-
const copy = nativeSlice.call(xs, 0);
|
|
344
|
-
copy.sort(comparator);
|
|
345
|
-
return copy;
|
|
346
|
-
};
|
|
347
|
-
isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
|
|
348
|
-
|
|
349
|
-
// There are many variations of Object iteration that are faster than the 'for-in' style:
|
|
350
|
-
// http://jsperf.com/object-keys-iteration/107
|
|
351
|
-
//
|
|
352
|
-
// Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
|
|
353
|
-
const keys = Object.keys;
|
|
354
|
-
const hasOwnProperty = Object.hasOwnProperty;
|
|
355
|
-
const get$1 = (obj, key) => {
|
|
356
|
-
return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
|
|
357
|
-
};
|
|
358
|
-
const has = (obj, key) => hasOwnProperty.call(obj, key);
|
|
359
|
-
|
|
360
|
-
const Cell = (initial) => {
|
|
361
|
-
let value = initial;
|
|
362
|
-
const get = () => {
|
|
363
|
-
return value;
|
|
364
|
-
};
|
|
365
|
-
const set = (v) => {
|
|
366
|
-
value = v;
|
|
367
|
-
};
|
|
368
|
-
return {
|
|
369
|
-
get,
|
|
370
|
-
set
|
|
371
|
-
};
|
|
372
|
-
};
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Adds two numbers, and wrap to a range.
|
|
376
|
-
* If the result overflows to the right, snap to the left.
|
|
377
|
-
* If the result overflows to the left, snap to the right.
|
|
378
|
-
*/
|
|
379
|
-
// the division is meant to get a number between 0 and 1 for more information check this discussion: https://stackoverflow.com/questions/58285941/how-to-replace-math-random-with-crypto-getrandomvalues-and-keep-same-result
|
|
380
|
-
const random = () => window.crypto.getRandomValues(new Uint32Array(1))[0] / 4294967295;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Generate a unique identifier.
|
|
384
|
-
*
|
|
385
|
-
* The unique portion of the identifier only contains an underscore
|
|
386
|
-
* and digits, so that it may safely be used within HTML attributes.
|
|
387
|
-
*
|
|
388
|
-
* The chance of generating a non-unique identifier has been minimized
|
|
389
|
-
* by combining the current time, a random number and a one-up counter.
|
|
390
|
-
*
|
|
391
|
-
* generate :: String -> String
|
|
392
|
-
*/
|
|
393
|
-
let unique = 0;
|
|
394
|
-
const generate = (prefix) => {
|
|
395
|
-
const date = new Date();
|
|
396
|
-
const time = date.getTime();
|
|
397
|
-
const random$1 = Math.floor(random() * 1000000000);
|
|
398
|
-
unique++;
|
|
399
|
-
return prefix + '_' + random$1 + unique + String(time);
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
const cat = (arr) => {
|
|
403
|
-
const r = [];
|
|
404
|
-
const push = (x) => {
|
|
405
|
-
r.push(x);
|
|
406
|
-
};
|
|
407
|
-
for (let i = 0; i < arr.length; i++) {
|
|
408
|
-
arr[i].each(push);
|
|
409
|
-
}
|
|
410
|
-
return r;
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
414
|
-
|
|
415
|
-
const get = (customTabs) => {
|
|
416
|
-
const addTab = (spec) => {
|
|
417
|
-
const name = spec.name ?? generate('tab-name');
|
|
418
|
-
const currentCustomTabs = customTabs.get();
|
|
419
|
-
currentCustomTabs[name] = spec;
|
|
420
|
-
customTabs.set(currentCustomTabs);
|
|
421
|
-
};
|
|
422
|
-
return {
|
|
423
|
-
addTab
|
|
424
|
-
};
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
const register$2 = (editor, dialogOpener) => {
|
|
428
|
-
editor.addCommand('mceHelp', dialogOpener);
|
|
429
|
-
};
|
|
430
|
-
|
|
431
|
-
const option = (name) => (editor) => editor.options.get(name);
|
|
432
|
-
const register$1 = (editor) => {
|
|
433
|
-
const registerOption = editor.options.register;
|
|
434
|
-
registerOption('help_tabs', {
|
|
435
|
-
processor: 'array'
|
|
436
|
-
});
|
|
437
|
-
};
|
|
438
|
-
const getHelpTabs = option('help_tabs');
|
|
439
|
-
const getForcedPlugins = option('forced_plugins');
|
|
440
|
-
|
|
441
|
-
const register = (editor, dialogOpener) => {
|
|
442
|
-
editor.ui.registry.addButton('help', {
|
|
443
|
-
icon: 'help',
|
|
444
|
-
tooltip: 'Help',
|
|
445
|
-
onAction: dialogOpener,
|
|
446
|
-
context: 'any'
|
|
447
|
-
});
|
|
448
|
-
editor.ui.registry.addMenuItem('help', {
|
|
449
|
-
text: 'Help',
|
|
450
|
-
icon: 'help',
|
|
451
|
-
shortcut: 'Alt+0',
|
|
452
|
-
onAction: dialogOpener,
|
|
453
|
-
context: 'any'
|
|
454
|
-
});
|
|
455
|
-
};
|
|
456
|
-
|
|
457
|
-
var global$3 = tinymce.util.Tools.resolve('tinymce.Resource');
|
|
458
|
-
|
|
459
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');
|
|
460
|
-
|
|
461
|
-
const pLoadHtmlByLangCode = (baseUrl, langCode) => global$3.load(`tinymce.html-i18n.help-keynav.${langCode}`, `${baseUrl}/js/i18n/keynav/${langCode}.js`);
|
|
462
|
-
const pLoadI18nHtml = (baseUrl) =>
|
|
463
|
-
// TINY-9928: Load language file for the current language, or English if the file is not available
|
|
464
|
-
pLoadHtmlByLangCode(baseUrl, global$2.getCode()).catch(() => pLoadHtmlByLangCode(baseUrl, 'en'));
|
|
465
|
-
const initI18nLoad = (editor, baseUrl) => {
|
|
466
|
-
editor.on('init', () => {
|
|
467
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
468
|
-
pLoadI18nHtml(baseUrl);
|
|
469
|
-
});
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
const pTab = async (pluginUrl) => {
|
|
473
|
-
const body = {
|
|
474
|
-
type: 'htmlpanel',
|
|
475
|
-
presets: 'document',
|
|
476
|
-
html: await pLoadI18nHtml(pluginUrl)
|
|
477
|
-
};
|
|
478
|
-
return {
|
|
479
|
-
name: 'keyboardnav',
|
|
480
|
-
title: 'Keyboard Navigation',
|
|
481
|
-
items: [body]
|
|
482
|
-
};
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
486
|
-
|
|
487
|
-
// Converts shortcut format to Mac/PC variants
|
|
488
|
-
const convertText = (source) => {
|
|
489
|
-
const isMac = global$1.os.isMacOS() || global$1.os.isiOS();
|
|
490
|
-
const mac = {
|
|
491
|
-
alt: '⌥',
|
|
492
|
-
ctrl: '⌃',
|
|
493
|
-
shift: '⇧',
|
|
494
|
-
meta: '⌘',
|
|
495
|
-
access: '⌃⌥'
|
|
496
|
-
};
|
|
497
|
-
const other = {
|
|
498
|
-
meta: 'Ctrl ',
|
|
499
|
-
access: 'Shift + Alt '
|
|
500
|
-
};
|
|
501
|
-
const replace = isMac ? mac : other;
|
|
502
|
-
const shortcut = source.split('+');
|
|
503
|
-
const updated = map(shortcut, (segment) => {
|
|
504
|
-
// search lowercase, but if not found use the original
|
|
505
|
-
const search = segment.toLowerCase().trim();
|
|
506
|
-
return has(replace, search) ? replace[search] : segment;
|
|
507
|
-
});
|
|
508
|
-
return isMac ? (updated.join('')).replace(/\s/, '') : updated.join('+');
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
const shortcuts = [
|
|
512
|
-
{ shortcuts: ['Meta + B'], action: 'Bold' },
|
|
513
|
-
{ shortcuts: ['Meta + I'], action: 'Italic' },
|
|
514
|
-
{ shortcuts: ['Meta + U'], action: 'Underline' },
|
|
515
|
-
{ shortcuts: ['Meta + A'], action: 'Select all' },
|
|
516
|
-
{ shortcuts: ['Meta + Y', 'Meta + Shift + Z'], action: 'Redo' },
|
|
517
|
-
{ shortcuts: ['Meta + Z'], action: 'Undo' },
|
|
518
|
-
{ shortcuts: ['Access + 1'], action: 'Heading 1' },
|
|
519
|
-
{ shortcuts: ['Access + 2'], action: 'Heading 2' },
|
|
520
|
-
{ shortcuts: ['Access + 3'], action: 'Heading 3' },
|
|
521
|
-
{ shortcuts: ['Access + 4'], action: 'Heading 4' },
|
|
522
|
-
{ shortcuts: ['Access + 5'], action: 'Heading 5' },
|
|
523
|
-
{ shortcuts: ['Access + 6'], action: 'Heading 6' },
|
|
524
|
-
{ shortcuts: ['Access + 7'], action: 'Paragraph' },
|
|
525
|
-
{ shortcuts: ['Access + 8'], action: 'Div' },
|
|
526
|
-
{ shortcuts: ['Access + 9'], action: 'Address' },
|
|
527
|
-
{ shortcuts: ['Alt + 0'], action: 'Open help dialog' },
|
|
528
|
-
{ shortcuts: ['Alt + F9'], action: 'Focus to menubar' },
|
|
529
|
-
{ shortcuts: ['Alt + F10'], action: 'Focus to toolbar' },
|
|
530
|
-
{ shortcuts: ['Alt + F11'], action: 'Focus to element path' },
|
|
531
|
-
{ shortcuts: ['Alt + F12'], action: 'Focus to notification' },
|
|
532
|
-
{ shortcuts: ['Ctrl + F9'], action: 'Focus to contextual toolbar' },
|
|
533
|
-
{ shortcuts: ['Shift + Enter'], action: 'Open popup menu for split buttons' },
|
|
534
|
-
{ shortcuts: ['Meta + K'], action: 'Insert link (if link plugin activated)' },
|
|
535
|
-
{ shortcuts: ['Meta + S'], action: 'Save (if save plugin activated)' },
|
|
536
|
-
{ shortcuts: ['Meta + F'], action: 'Find (if searchreplace plugin activated)' },
|
|
537
|
-
{ shortcuts: ['Meta + Shift + F'], action: 'Switch to or from fullscreen mode' }
|
|
538
|
-
];
|
|
539
|
-
|
|
540
|
-
const tab$2 = () => {
|
|
541
|
-
const shortcutList = map(shortcuts, (shortcut) => {
|
|
542
|
-
const shortcutText = map(shortcut.shortcuts, convertText).join(' or ');
|
|
543
|
-
return [shortcut.action, shortcutText];
|
|
544
|
-
});
|
|
545
|
-
const tablePanel = {
|
|
546
|
-
type: 'table',
|
|
547
|
-
// TODO: Fix table styles #TINY-2909
|
|
548
|
-
header: ['Action', 'Shortcut'],
|
|
549
|
-
cells: shortcutList
|
|
550
|
-
};
|
|
551
|
-
return {
|
|
552
|
-
name: 'shortcuts',
|
|
553
|
-
title: 'Handy Shortcuts',
|
|
554
|
-
items: [
|
|
555
|
-
tablePanel
|
|
556
|
-
]
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
// These lists are automatically sorted when generating the dialog.
|
|
561
|
-
const urls = map([
|
|
562
|
-
{ key: 'accordion', name: 'Accordion' },
|
|
563
|
-
{ key: 'anchor', name: 'Anchor' },
|
|
564
|
-
{ key: 'autolink', name: 'Autolink' },
|
|
565
|
-
{ key: 'autoresize', name: 'Autoresize' },
|
|
566
|
-
{ key: 'autosave', name: 'Autosave' },
|
|
567
|
-
{ key: 'charmap', name: 'Character Map' },
|
|
568
|
-
{ key: 'code', name: 'Code' },
|
|
569
|
-
{ key: 'codesample', name: 'Code Sample' },
|
|
570
|
-
{ key: 'colorpicker', name: 'Color Picker' },
|
|
571
|
-
{ key: 'directionality', name: 'Directionality' },
|
|
572
|
-
{ key: 'emoticons', name: 'Emoticons' },
|
|
573
|
-
{ key: 'fullscreen', name: 'Full Screen' },
|
|
574
|
-
{ key: 'help', name: 'Help' },
|
|
575
|
-
{ key: 'image', name: 'Image' },
|
|
576
|
-
{ key: 'importcss', name: 'Import CSS' },
|
|
577
|
-
{ key: 'insertdatetime', name: 'Insert Date/Time' },
|
|
578
|
-
{ key: 'link', name: 'Link' },
|
|
579
|
-
{ key: 'lists', name: 'Lists' },
|
|
580
|
-
{ key: 'advlist', name: 'List Styles' },
|
|
581
|
-
{ key: 'media', name: 'Media' },
|
|
582
|
-
{ key: 'nonbreaking', name: 'Nonbreaking' },
|
|
583
|
-
{ key: 'pagebreak', name: 'Page Break' },
|
|
584
|
-
{ key: 'preview', name: 'Preview' },
|
|
585
|
-
{ key: 'quickbars', name: 'Quick Toolbars' },
|
|
586
|
-
{ key: 'save', name: 'Save' },
|
|
587
|
-
{ key: 'searchreplace', name: 'Search and Replace' },
|
|
588
|
-
{ key: 'table', name: 'Table' },
|
|
589
|
-
{ key: 'textcolor', name: 'Text Color' },
|
|
590
|
-
{ key: 'visualblocks', name: 'Visual Blocks' },
|
|
591
|
-
{ key: 'visualchars', name: 'Visual Characters' },
|
|
592
|
-
{ key: 'wordcount', name: 'Word Count' },
|
|
593
|
-
// TODO: Add other premium plugins when they are included in the website
|
|
594
|
-
{ key: 'a11ychecker', name: 'Accessibility Checker', type: "premium" /* PluginType.Premium */ },
|
|
595
|
-
{ key: 'typography', name: 'Advanced Typography', type: "premium" /* PluginType.Premium */, slug: 'advanced-typography' },
|
|
596
|
-
{ key: 'ai', name: 'AI Assistant', type: "premium" /* PluginType.Premium */ },
|
|
597
|
-
{ key: 'casechange', name: 'Case Change', type: "premium" /* PluginType.Premium */ },
|
|
598
|
-
{ key: 'checklist', name: 'Checklist', type: "premium" /* PluginType.Premium */ },
|
|
599
|
-
{ key: 'advcode', name: 'Enhanced Code Editor', type: "premium" /* PluginType.Premium */ },
|
|
600
|
-
{ key: 'mediaembed', name: 'Enhanced Media Embed', type: "premium" /* PluginType.Premium */, slug: 'introduction-to-mediaembed' },
|
|
601
|
-
{ key: 'advtable', name: 'Enhanced Tables', type: "premium" /* PluginType.Premium */ },
|
|
602
|
-
{ key: 'exportpdf', name: 'Export to PDF', type: "premium" /* PluginType.Premium */ },
|
|
603
|
-
{ key: 'exportword', name: 'Export to Word', type: "premium" /* PluginType.Premium */ },
|
|
604
|
-
{ key: 'footnotes', name: 'Footnotes', type: "premium" /* PluginType.Premium */ },
|
|
605
|
-
{ key: 'formatpainter', name: 'Format Painter', type: "premium" /* PluginType.Premium */ },
|
|
606
|
-
{ key: 'editimage', name: 'Image Editing', type: "premium" /* PluginType.Premium */ },
|
|
607
|
-
{ key: 'uploadcare', name: 'Image Optimizer Powered by Uploadcare', type: "premium" /* PluginType.Premium */ },
|
|
608
|
-
{ key: 'importword', name: 'Import from Word', type: "premium" /* PluginType.Premium */ },
|
|
609
|
-
{ key: 'inlinecss', name: 'Inline CSS', type: "premium" /* PluginType.Premium */, slug: 'inline-css' },
|
|
610
|
-
{ key: 'linkchecker', name: 'Link Checker', type: "premium" /* PluginType.Premium */ },
|
|
611
|
-
{ key: 'math', name: 'Math', type: "premium" /* PluginType.Premium */ },
|
|
612
|
-
{ key: 'markdown', name: 'Markdown', type: "premium" /* PluginType.Premium */ },
|
|
613
|
-
{ key: 'mentions', name: 'Mentions', type: "premium" /* PluginType.Premium */ },
|
|
614
|
-
{ key: 'mergetags', name: 'Merge Tags', type: "premium" /* PluginType.Premium */ },
|
|
615
|
-
{ key: 'pageembed', name: 'Page Embed', type: "premium" /* PluginType.Premium */ },
|
|
616
|
-
{ key: 'permanentpen', name: 'Permanent Pen', type: "premium" /* PluginType.Premium */ },
|
|
617
|
-
{ key: 'powerpaste', name: 'PowerPaste', type: "premium" /* PluginType.Premium */, slug: 'introduction-to-powerpaste' },
|
|
618
|
-
{ key: 'revisionhistory', name: 'Revision History', type: "premium" /* PluginType.Premium */ },
|
|
619
|
-
{ key: 'tinymcespellchecker', name: 'Spell Checker', type: "premium" /* PluginType.Premium */, slug: 'introduction-to-tiny-spellchecker' },
|
|
620
|
-
{ key: 'suggestededits', name: 'Suggested Edits', type: "premium" /* PluginType.Premium */ },
|
|
621
|
-
{ key: 'autocorrect', name: 'Spelling Autocorrect', type: "premium" /* PluginType.Premium */ },
|
|
622
|
-
{ key: 'tableofcontents', name: 'Table of Contents', type: "premium" /* PluginType.Premium */ },
|
|
623
|
-
{ key: 'fullpagehtml', name: 'Fullpage HTML', type: "premium" /* PluginType.Premium */ },
|
|
624
|
-
{ key: 'advtemplate', name: 'Templates', type: "premium" /* PluginType.Premium */, slug: 'advanced-templates' },
|
|
625
|
-
{ key: 'tinycomments', name: 'Tiny Comments', type: "premium" /* PluginType.Premium */, slug: 'introduction-to-tiny-comments' },
|
|
626
|
-
{ key: 'tinydrive', name: 'Tiny Drive', type: "premium" /* PluginType.Premium */, slug: 'tinydrive-introduction' },
|
|
627
|
-
], (item) => ({
|
|
628
|
-
...item,
|
|
629
|
-
// Set the defaults/fallbacks for the plugin urls
|
|
630
|
-
type: item.type || "opensource" /* PluginType.OpenSource */,
|
|
631
|
-
slug: item.slug || item.key
|
|
632
|
-
}));
|
|
633
|
-
|
|
634
|
-
const tab$1 = (editor) => {
|
|
635
|
-
const availablePlugins = () => {
|
|
636
|
-
const premiumPlugins = filter(urls, ({ type }) => {
|
|
637
|
-
return type === "premium" /* PluginUrls.PluginType.Premium */;
|
|
638
|
-
});
|
|
639
|
-
const sortedPremiumPlugins = sort(map(premiumPlugins, (p) => p.name), (s1, s2) => s1.localeCompare(s2));
|
|
640
|
-
const premiumPluginList = map(sortedPremiumPlugins, (pluginName) => `<li>${pluginName}</li>`).join('');
|
|
641
|
-
return '<div>' +
|
|
642
|
-
'<p><b>' + global$2.translate('Premium plugins:') + '</b></p>' +
|
|
643
|
-
'<ul>' +
|
|
644
|
-
premiumPluginList +
|
|
645
|
-
'<li class="tox-help__more-link" ">' +
|
|
646
|
-
'<a href="https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading" rel="noopener" target="_blank"' +
|
|
647
|
-
' data-alloy-tabstop="true" tabindex="-1">' + global$2.translate('Learn more...') + '</a></li>' +
|
|
648
|
-
'</ul>' +
|
|
649
|
-
'</div>';
|
|
650
|
-
};
|
|
651
|
-
const makeLink = (p) => `<a data-alloy-tabstop="true" tabindex="-1" href="${p.url}" target="_blank" rel="noopener">${p.name}</a>`;
|
|
652
|
-
const identifyUnknownPlugin = (editor, key) => {
|
|
653
|
-
const getMetadata = editor.plugins[key].getMetadata;
|
|
654
|
-
if (isFunction(getMetadata)) {
|
|
655
|
-
const metadata = getMetadata();
|
|
656
|
-
return { name: metadata.name, html: makeLink(metadata) };
|
|
657
|
-
}
|
|
658
|
-
else {
|
|
659
|
-
return { name: key, html: key };
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
const getPluginData = (editor, key) => find(urls, (x) => {
|
|
663
|
-
return x.key === key;
|
|
664
|
-
}).fold(() => {
|
|
665
|
-
return identifyUnknownPlugin(editor, key);
|
|
666
|
-
}, (x) => {
|
|
667
|
-
// We know this plugin, so use our stored details.
|
|
668
|
-
const name = x.type === "premium" /* PluginUrls.PluginType.Premium */ ? `${x.name}*` : x.name;
|
|
669
|
-
const html = makeLink({ name, url: `https://www.tiny.cloud/docs/tinymce/${tinymce.majorVersion}/${x.slug}/` });
|
|
670
|
-
return { name, html };
|
|
671
|
-
});
|
|
672
|
-
const getPluginKeys = (editor) => {
|
|
673
|
-
const keys$1 = keys(editor.plugins);
|
|
674
|
-
const forcedPlugins = getForcedPlugins(editor);
|
|
675
|
-
const hiddenPlugins = isUndefined(forcedPlugins) ? ['onboarding', 'licensekeymanager'] : forcedPlugins.concat(['onboarding', 'licensekeymanager']);
|
|
676
|
-
return filter(keys$1, (k) => !contains(hiddenPlugins, k));
|
|
677
|
-
};
|
|
678
|
-
const pluginLister = (editor) => {
|
|
679
|
-
const pluginKeys = getPluginKeys(editor);
|
|
680
|
-
const sortedPluginData = sort(map(pluginKeys, (k) => getPluginData(editor, k)), (pd1, pd2) => pd1.name.localeCompare(pd2.name));
|
|
681
|
-
const pluginLis = map(sortedPluginData, (key) => {
|
|
682
|
-
return '<li>' + key.html + '</li>';
|
|
683
|
-
});
|
|
684
|
-
const count = pluginLis.length;
|
|
685
|
-
const pluginsString = pluginLis.join('');
|
|
686
|
-
const html = '<p><b>' + global$2.translate(['Plugins installed ({0}):', count]) + '</b></p>' +
|
|
687
|
-
'<ul>' + pluginsString + '</ul>';
|
|
688
|
-
return html;
|
|
689
|
-
};
|
|
690
|
-
const installedPlugins = (editor) => {
|
|
691
|
-
if (editor == null) {
|
|
692
|
-
return '';
|
|
693
|
-
}
|
|
694
|
-
return '<div>' +
|
|
695
|
-
pluginLister(editor) +
|
|
696
|
-
'</div>';
|
|
697
|
-
};
|
|
698
|
-
const htmlPanel = {
|
|
699
|
-
type: 'htmlpanel',
|
|
700
|
-
presets: 'document',
|
|
701
|
-
html: [
|
|
702
|
-
installedPlugins(editor),
|
|
703
|
-
availablePlugins()
|
|
704
|
-
].join('')
|
|
705
|
-
};
|
|
706
|
-
return {
|
|
707
|
-
name: 'plugins',
|
|
708
|
-
title: 'Plugins',
|
|
709
|
-
items: [
|
|
710
|
-
htmlPanel
|
|
711
|
-
]
|
|
712
|
-
};
|
|
713
|
-
};
|
|
714
|
-
|
|
715
|
-
var global = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
716
|
-
|
|
717
|
-
const tab = () => {
|
|
718
|
-
const getVersion = (major, minor) => major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
|
|
719
|
-
const version = getVersion(global.majorVersion, global.minorVersion);
|
|
720
|
-
const changeLogLink = '<a data-alloy-tabstop="true" tabindex="-1" href="https://www.tiny.cloud/docs/tinymce/8/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral" rel="noopener" target="_blank">TinyMCE ' + version + '</a>';
|
|
721
|
-
const htmlPanel = {
|
|
722
|
-
type: 'htmlpanel',
|
|
723
|
-
html: '<p>' + global$2.translate(['You are using {0}', changeLogLink]) + '</p>',
|
|
724
|
-
presets: 'document'
|
|
725
|
-
};
|
|
726
|
-
return {
|
|
727
|
-
name: 'versions',
|
|
728
|
-
title: 'Version',
|
|
729
|
-
items: [
|
|
730
|
-
htmlPanel
|
|
731
|
-
]
|
|
732
|
-
};
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
|
|
736
|
-
const newTabs = {};
|
|
737
|
-
const names = map(tabsFromSettings, (t) => {
|
|
738
|
-
if (isString(t)) {
|
|
739
|
-
// Code below shouldn't care if a tab name doesn't have a spec.
|
|
740
|
-
// If we find it does, we'll need to make this smarter.
|
|
741
|
-
// CustomTabsTest has a case for this.
|
|
742
|
-
if (has(tabs, t)) {
|
|
743
|
-
newTabs[t] = tabs[t];
|
|
744
|
-
}
|
|
745
|
-
return t;
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
const name = t.name ?? generate('tab-name');
|
|
749
|
-
newTabs[name] = t;
|
|
750
|
-
return name;
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
return { tabs: newTabs, names };
|
|
754
|
-
};
|
|
755
|
-
const getNamesFromTabs = (tabs) => {
|
|
756
|
-
const names = keys(tabs);
|
|
757
|
-
// Move the versions tab to the end if it exists
|
|
758
|
-
const idx = names.indexOf('versions');
|
|
759
|
-
if (idx !== -1) {
|
|
760
|
-
names.splice(idx, 1);
|
|
761
|
-
names.push('versions');
|
|
762
|
-
}
|
|
763
|
-
return { tabs, names };
|
|
764
|
-
};
|
|
765
|
-
const pParseCustomTabs = async (editor, customTabs, pluginUrl) => {
|
|
766
|
-
const shortcuts = tab$2();
|
|
767
|
-
const nav = await pTab(pluginUrl);
|
|
768
|
-
const plugins = tab$1(editor);
|
|
769
|
-
const versions = tab();
|
|
770
|
-
const tabs = {
|
|
771
|
-
[shortcuts.name]: shortcuts,
|
|
772
|
-
[nav.name]: nav,
|
|
773
|
-
[plugins.name]: plugins,
|
|
774
|
-
[versions.name]: versions,
|
|
775
|
-
...customTabs.get()
|
|
776
|
-
};
|
|
777
|
-
return Optional.from(getHelpTabs(editor)).fold(() => getNamesFromTabs(tabs), (tabsFromSettings) => parseHelpTabsSetting(tabsFromSettings, tabs));
|
|
778
|
-
};
|
|
779
|
-
const init = (editor, customTabs, pluginUrl) => () => {
|
|
780
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
781
|
-
pParseCustomTabs(editor, customTabs, pluginUrl).then(({ tabs, names }) => {
|
|
782
|
-
const foundTabs = map(names, (name) => get$1(tabs, name));
|
|
783
|
-
const dialogTabs = cat(foundTabs);
|
|
784
|
-
const body = {
|
|
785
|
-
type: 'tabpanel',
|
|
786
|
-
tabs: dialogTabs
|
|
787
|
-
};
|
|
788
|
-
editor.windowManager.open({
|
|
789
|
-
title: 'Help',
|
|
790
|
-
size: 'medium',
|
|
791
|
-
body,
|
|
792
|
-
buttons: [
|
|
793
|
-
{
|
|
794
|
-
type: 'cancel',
|
|
795
|
-
name: 'close',
|
|
796
|
-
text: 'Close',
|
|
797
|
-
primary: true
|
|
798
|
-
}
|
|
799
|
-
],
|
|
800
|
-
initialData: {}
|
|
801
|
-
});
|
|
802
|
-
});
|
|
803
|
-
};
|
|
804
|
-
|
|
805
|
-
var Plugin = () => {
|
|
806
|
-
global$4.add('help', (editor, pluginUrl) => {
|
|
807
|
-
const customTabs = Cell({});
|
|
808
|
-
const api = get(customTabs);
|
|
809
|
-
register$1(editor);
|
|
810
|
-
const dialogOpener = init(editor, customTabs, pluginUrl);
|
|
811
|
-
register(editor, dialogOpener);
|
|
812
|
-
register$2(editor, dialogOpener);
|
|
813
|
-
editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
|
|
814
|
-
initI18nLoad(editor, pluginUrl);
|
|
815
|
-
return api;
|
|
816
|
-
});
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
Plugin();
|
|
820
|
-
/** *****
|
|
821
|
-
* DO NOT EXPORT ANYTHING
|
|
822
|
-
*
|
|
823
|
-
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
824
|
-
*******/
|
|
825
|
-
|
|
826
|
-
})();
|