@tabler/core 1.0.0-beta20 → 1.0.0-beta21
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/README.md +7 -6
- package/dist/css/demo.css +8 -8
- package/dist/css/demo.min.css +5 -5
- package/dist/css/demo.rtl.css +8 -8
- package/dist/css/demo.rtl.min.css +5 -5
- package/dist/css/tabler-flags.css +10 -10
- package/dist/css/tabler-flags.min.css +5 -5
- package/dist/css/tabler-flags.rtl.css +10 -10
- package/dist/css/tabler-flags.rtl.min.css +5 -5
- package/dist/css/tabler-payments.css +4 -4
- package/dist/css/tabler-payments.min.css +4 -4
- package/dist/css/tabler-payments.rtl.css +4 -4
- package/dist/css/tabler-payments.rtl.min.css +4 -4
- package/dist/css/tabler-social.css +4 -4
- package/dist/css/tabler-social.min.css +4 -4
- package/dist/css/tabler-social.rtl.css +4 -4
- package/dist/css/tabler-social.rtl.min.css +4 -4
- package/dist/css/tabler-vendors.css +246 -253
- package/dist/css/tabler-vendors.min.css +5 -5
- package/dist/css/tabler-vendors.rtl.css +246 -253
- package/dist/css/tabler-vendors.rtl.min.css +5 -5
- package/dist/css/tabler.css +643 -426
- package/dist/css/tabler.min.css +8 -8
- package/dist/css/tabler.rtl.css +667 -441
- package/dist/css/tabler.rtl.min.css +8 -8
- package/dist/js/demo-theme.js +4 -4
- package/dist/js/demo-theme.min.js +4 -4
- package/dist/js/demo.js +41 -42
- package/dist/js/demo.min.js +5 -5
- package/dist/js/tabler.esm.js +1949 -1248
- package/dist/js/tabler.esm.min.js +8 -8
- package/dist/js/tabler.js +1949 -1248
- package/dist/js/tabler.min.js +8 -8
- package/dist/libs/apexcharts/dist/apexcharts.amd.js +1 -1
- package/dist/libs/apexcharts/dist/apexcharts.common.js +5 -5
- package/dist/libs/apexcharts/dist/apexcharts.css +166 -65
- package/dist/libs/apexcharts/dist/apexcharts.esm.js +5 -5
- package/dist/libs/apexcharts/dist/apexcharts.js +7964 -8527
- package/dist/libs/apexcharts/dist/apexcharts.min.js +5 -5
- package/dist/libs/apexcharts/dist/locales/be-cyrl.json +55 -0
- package/dist/libs/apexcharts/dist/locales/be-latn.json +55 -0
- package/dist/libs/apexcharts/dist/locales/da.json +55 -0
- package/dist/libs/apexcharts/dist/locales/ms.json +63 -0
- package/dist/libs/apexcharts/dist/locales/pt.json +3 -3
- package/dist/libs/apexcharts/dist/locales/vi.json +63 -0
- package/dist/libs/apexcharts/dist/locales/zh-tw.json +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js +8 -8
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js +3 -3
- package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.js +8 -8
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js +3 -3
- package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.js +8 -8
- package/dist/libs/bootstrap/dist/js/bootstrap.js.map +1 -1
- package/dist/libs/bootstrap/dist/js/bootstrap.min.js +3 -3
- package/dist/libs/bootstrap/dist/js/bootstrap.min.js.map +1 -1
- package/dist/libs/countup.js/dist/countUp.d.ts +1 -0
- package/dist/libs/countup.js/dist/countUp.js +4 -1
- package/dist/libs/countup.js/dist/countUp.min.js +1 -1
- package/dist/libs/countup.js/dist/countUp.umd.js +1 -1
- package/dist/libs/jsvectormap/dist/jsvectormap.cjs +2279 -0
- package/dist/libs/jsvectormap/dist/jsvectormap.css +121 -0
- package/dist/libs/jsvectormap/dist/jsvectormap.esm.js +2277 -0
- package/dist/libs/jsvectormap/dist/jsvectormap.js +2285 -0
- package/dist/libs/jsvectormap/dist/jsvectormap.min.css +1 -0
- package/dist/libs/jsvectormap/dist/jsvectormap.min.js +1 -0
- package/dist/libs/jsvectormap/dist/maps/world-merc.js +1 -1
- package/dist/libs/jsvectormap/dist/maps/world.js +1 -1
- package/dist/libs/nouislider/dist/nouislider.d.ts +8 -10
- package/dist/libs/nouislider/dist/nouislider.js +64 -5
- package/dist/libs/nouislider/dist/nouislider.min.js +1 -1
- package/dist/libs/nouislider/dist/nouislider.min.mjs +1 -1
- package/dist/libs/nouislider/dist/nouislider.mjs +64 -5
- package/dist/libs/star-rating.js/dist/star-rating.cjs.js +5 -2
- package/dist/libs/star-rating.js/dist/star-rating.css +23 -20
- package/dist/libs/star-rating.js/dist/star-rating.esm.js +5 -2
- package/dist/libs/star-rating.js/dist/star-rating.js +5 -9
- package/dist/libs/star-rating.js/dist/star-rating.min.css +1 -8
- package/dist/libs/star-rating.js/dist/star-rating.min.js +1 -8
- package/dist/libs/tinymce/CHANGELOG.md +471 -12
- package/dist/libs/tinymce/README.md +16 -10
- package/dist/libs/tinymce/bower.json +1 -1
- package/dist/libs/tinymce/composer.json +2 -2
- package/dist/libs/tinymce/icons/default/icons.js +13 -2
- package/dist/libs/tinymce/icons/default/icons.min.js +1 -1
- package/dist/libs/tinymce/license.md +6 -0
- package/dist/libs/tinymce/models/dom/model.js +237 -213
- package/dist/libs/tinymce/models/dom/model.min.js +2 -2
- package/dist/libs/tinymce/package.json +2 -2
- package/dist/libs/tinymce/plugins/accordion/index.js +7 -0
- package/dist/libs/tinymce/plugins/accordion/plugin.js +1055 -0
- package/dist/libs/tinymce/plugins/accordion/plugin.min.js +4 -0
- package/dist/libs/tinymce/plugins/advlist/plugin.js +4 -4
- package/dist/libs/tinymce/plugins/advlist/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/anchor/plugin.js +21 -3
- package/dist/libs/tinymce/plugins/anchor/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/autolink/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/autolink/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/autoresize/plugin.js +20 -33
- package/dist/libs/tinymce/plugins/autoresize/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/autosave/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/autosave/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/charmap/plugin.js +15 -3
- package/dist/libs/tinymce/plugins/charmap/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/code/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/code/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/codesample/plugin.js +27 -13
- package/dist/libs/tinymce/plugins/codesample/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/directionality/plugin.js +33 -27
- package/dist/libs/tinymce/plugins/directionality/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/emoticons/plugin.js +17 -4
- package/dist/libs/tinymce/plugins/emoticons/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/fullscreen/plugin.js +168 -105
- package/dist/libs/tinymce/plugins/fullscreen/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
- package/dist/libs/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
- package/dist/libs/tinymce/plugins/help/plugin.js +115 -135
- package/dist/libs/tinymce/plugins/help/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/image/plugin.js +23 -5
- package/dist/libs/tinymce/plugins/image/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/importcss/plugin.js +4 -3
- package/dist/libs/tinymce/plugins/importcss/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/insertdatetime/plugin.js +15 -3
- package/dist/libs/tinymce/plugins/insertdatetime/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/link/plugin.js +193 -114
- package/dist/libs/tinymce/plugins/link/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/lists/plugin.js +290 -66
- package/dist/libs/tinymce/plugins/lists/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/media/plugin.js +80 -33
- package/dist/libs/tinymce/plugins/media/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/nonbreaking/plugin.js +15 -3
- package/dist/libs/tinymce/plugins/nonbreaking/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/pagebreak/plugin.js +15 -3
- package/dist/libs/tinymce/plugins/pagebreak/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/preview/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/preview/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/quickbars/plugin.js +19 -7
- package/dist/libs/tinymce/plugins/quickbars/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/save/plugin.js +3 -2
- package/dist/libs/tinymce/plugins/save/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/searchreplace/plugin.js +42 -36
- package/dist/libs/tinymce/plugins/searchreplace/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/table/plugin.js +121 -76
- package/dist/libs/tinymce/plugins/table/plugin.min.js +2 -2
- package/dist/libs/tinymce/plugins/visualblocks/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/visualblocks/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/visualchars/plugin.js +1 -1
- package/dist/libs/tinymce/plugins/visualchars/plugin.min.js +1 -1
- package/dist/libs/tinymce/plugins/wordcount/plugin.js +27 -19
- package/dist/libs/tinymce/plugins/wordcount/plugin.min.js +2 -2
- package/dist/libs/tinymce/skins/content/dark/content.js +1 -0
- package/dist/libs/tinymce/skins/content/default/content.js +1 -0
- package/dist/libs/tinymce/skins/content/document/content.js +1 -0
- package/dist/libs/tinymce/skins/content/tinymce-5/content.js +1 -0
- package/dist/libs/tinymce/skins/content/tinymce-5-dark/content.js +1 -0
- package/dist/libs/tinymce/skins/content/writer/content.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide/content.css +32 -29
- package/dist/libs/tinymce/skins/ui/oxide/content.inline.css +32 -29
- package/dist/libs/tinymce/skins/ui/oxide/content.inline.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide/content.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide/skin.css +1003 -105
- package/dist/libs/tinymce/skins/ui/oxide/skin.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.css +32 -22
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.css +32 -29
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide-dark/skin.css +1008 -110
- package/dist/libs/tinymce/skins/ui/oxide-dark/skin.js +1 -0
- package/dist/libs/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.css +32 -29
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.css +32 -29
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5/skin.css +1003 -86
- package/dist/libs/tinymce/skins/ui/tinymce-5/skin.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.css +32 -22
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.css +32 -29
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.css +1009 -92
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
- package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
- package/dist/libs/tinymce/themes/silver/theme.js +26361 -24936
- package/dist/libs/tinymce/themes/silver/theme.min.js +2 -2
- package/dist/libs/tinymce/tinymce.d.ts +205 -136
- package/dist/libs/tinymce/tinymce.js +4400 -2838
- package/dist/libs/tinymce/tinymce.min.js +2 -2
- package/dist/libs/tom-select/dist/js/plugins/caret_position.js +11 -16
- package/dist/libs/tom-select/dist/js/plugins/caret_position.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/change_listener.js +3 -2
- package/dist/libs/tom-select/dist/js/plugins/change_listener.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/checkbox_options.js +47 -34
- package/dist/libs/tom-select/dist/js/plugins/checkbox_options.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/clear_button.js +3 -13
- package/dist/libs/tom-select/dist/js/plugins/clear_button.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/drag_drop.js +249 -29
- package/dist/libs/tom-select/dist/js/plugins/drag_drop.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/dropdown_header.js +3 -11
- package/dist/libs/tom-select/dist/js/plugins/dropdown_header.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/dropdown_input.js +15 -24
- package/dist/libs/tom-select/dist/js/plugins/dropdown_input.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/input_autogrow.js +4 -6
- package/dist/libs/tom-select/dist/js/plugins/input_autogrow.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/no_active_items.js +2 -1
- package/dist/libs/tom-select/dist/js/plugins/no_active_items.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/no_backspace_delete.js +2 -2
- package/dist/libs/tom-select/dist/js/plugins/no_backspace_delete.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/optgroup_columns.js +3 -15
- package/dist/libs/tom-select/dist/js/plugins/optgroup_columns.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/remove_button.js +11 -15
- package/dist/libs/tom-select/dist/js/plugins/remove_button.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/restore_on_backspace.js +2 -3
- package/dist/libs/tom-select/dist/js/plugins/restore_on_backspace.js.map +1 -1
- package/dist/libs/tom-select/dist/js/plugins/virtual_scroll.js +41 -50
- package/dist/libs/tom-select/dist/js/plugins/virtual_scroll.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.base.js +411 -685
- package/dist/libs/tom-select/dist/js/tom-select.base.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.base.min.js +87 -78
- package/dist/libs/tom-select/dist/js/tom-select.base.min.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.complete.js +614 -820
- package/dist/libs/tom-select/dist/js/tom-select.complete.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.complete.min.js +195 -176
- package/dist/libs/tom-select/dist/js/tom-select.complete.min.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.popular.js +436 -705
- package/dist/libs/tom-select/dist/js/tom-select.popular.js.map +1 -1
- package/dist/libs/tom-select/dist/js/tom-select.popular.min.js +87 -78
- package/dist/libs/tom-select/dist/js/tom-select.popular.min.js.map +1 -1
- package/docs/base/colors.mdx +25 -0
- package/docs/base/typography.mdx +296 -0
- package/docs/components/alerts.mdx +430 -0
- package/docs/components/autosize.mdx +16 -0
- package/docs/components/avatars.mdx +172 -0
- package/docs/components/badges.mdx +127 -0
- package/docs/components/breadcrumb.mdx +107 -0
- package/docs/components/buttons.mdx +863 -0
- package/docs/components/cards.mdx +343 -0
- package/docs/components/carousel.mdx +235 -0
- package/docs/components/charts.mdx +526 -0
- package/docs/components/countup.mdx +136 -0
- package/docs/components/datagrid.mdx +90 -0
- package/docs/components/divider.mdx +63 -0
- package/docs/components/dropdowns.mdx +245 -0
- package/docs/components/dropzone.mdx +63 -0
- package/docs/components/empty.mdx +103 -0
- package/docs/components/icons.mdx +120 -0
- package/docs/components/inline-player.mdx +31 -0
- package/docs/components/modals.mdx +222 -0
- package/docs/components/placeholder.mdx +270 -0
- package/docs/components/popover.mdx +55 -0
- package/docs/components/progress.mdx +92 -0
- package/docs/components/progressbg.mdx +16 -0
- package/docs/components/range-slider.mdx +17 -0
- package/docs/components/ribbons.mdx +151 -0
- package/docs/components/spinners.mdx +119 -0
- package/docs/components/statuses.mdx +285 -0
- package/docs/components/steps.mdx +111 -0
- package/docs/components/switch-icon.mdx +155 -0
- package/docs/components/tables.mdx +410 -0
- package/docs/components/tabs.mdx +243 -0
- package/docs/components/timelines.mdx +506 -0
- package/docs/components/tinymce.mdx +44 -0
- package/docs/components/toasts.mdx +73 -0
- package/docs/components/tooltips.mdx +34 -0
- package/docs/components/tracking.mdx +162 -0
- package/docs/forms/form-color-check.mdx +179 -0
- package/docs/forms/form-elements.mdx +498 -0
- package/docs/forms/form-fieldset.mdx +44 -0
- package/docs/forms/form-helpers.mdx +12 -0
- package/docs/forms/form-image-check.mdx +162 -0
- package/docs/forms/form-input-mask.mdx +18 -0
- package/docs/forms/form-selectboxes.mdx +205 -0
- package/docs/forms/form-validation.mdx +25 -0
- package/docs/getting-started/browser-support.mdx +20 -0
- package/docs/getting-started/customize.mdx +24 -0
- package/docs/getting-started/download.mdx +42 -0
- package/docs/getting-started/faq.mdx +28 -0
- package/docs/getting-started/index.mdx +40 -0
- package/docs/icons/eps.mdx +13 -0
- package/docs/icons/figma.mdx +7 -0
- package/docs/icons/index.mdx +103 -0
- package/docs/icons/pdf.mdx +13 -0
- package/docs/icons/png.mdx +19 -0
- package/docs/icons/preact.mdx +40 -0
- package/docs/icons/react.mdx +40 -0
- package/docs/icons/solidjs.mdx +39 -0
- package/docs/icons/svelte.mdx +40 -0
- package/docs/icons/svg.mdx +74 -0
- package/docs/icons/vue.mdx +45 -0
- package/docs/icons/webfont.mdx +52 -0
- package/docs/layout/page-headers.mdx +226 -0
- package/docs/layout/page-layouts.mdx +204 -0
- package/docs/menu.json +317 -0
- package/docs/plugins/flags.mdx +52 -0
- package/docs/plugins/payments.mdx +43 -0
- package/docs/utilities/borders.mdx +114 -0
- package/docs/utilities/cursors.mdx +92 -0
- package/docs/utilities/interactions.mdx +23 -0
- package/package.json +37 -37
- package/src/js/src/toast.js +9 -1
- package/src/scss/_variables-dark.scss +3 -3
- package/src/scss/_variables.scss +38 -33
- package/src/scss/layout/_dark.scss +10 -2
- package/src/scss/layout/_navbar.scss +22 -13
- package/src/scss/layout/_page.scss +4 -4
- package/src/scss/layout/_root.scss +1 -1
- package/src/scss/mixins/_mixins.scss +4 -4
- package/src/scss/ui/_alerts.scss +2 -2
- package/src/scss/ui/_buttons.scss +4 -4
- package/src/scss/ui/_dropdowns.scss +1 -0
- package/src/scss/ui/_empty.scss +0 -5
- package/src/scss/ui/_flags.scss +2 -2
- package/src/scss/ui/_forms.scss +5 -4
- package/src/scss/ui/_modals.scss +3 -3
- package/src/scss/ui/_ribbons.scss +1 -0
- package/src/scss/ui/_toasts.scss +0 -1
- package/src/scss/ui/_type.scss +4 -2
- package/src/scss/vendor/_apexcharts.scss +2 -2
- package/src/scss/vendor/_jsvectormap.scss +1 -1
- package/src/scss/vendor/_litepicker.scss +1 -1
- package/dist/libs/jsvectormap/dist/js/jsvectormap.js +0 -2318
- package/dist/libs/jsvectormap/dist/js/jsvectormap.min.js +0 -1
- package/dist/libs/tinymce/license.txt +0 -21
- package/dist/libs/tinymce/plugins/template/index.js +0 -7
- package/dist/libs/tinymce/plugins/template/plugin.js +0 -554
- package/dist/libs/tinymce/plugins/template/plugin.min.js +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).jsVectorMap=e()}(this,(function(){"use strict";function t(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,e(t,i)}function e(t,i){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},e(t,i)}function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){throw new TypeError('"'+t+'" is read-only')}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function n(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0;return function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),i=e.length;s("i")>=0&&e.item(i)!==this;);return i>-1}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var s=arguments[i];if(null!=s){s=Object(s);for(var a=Object.keys(Object(s)),n=0,r=a.length;n<r;n++){var o=a[n],h=Object.getOwnPropertyDescriptor(s,o);void 0!==h&&h.enumerable&&(e[o]=s[o])}}}return e}});var r=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t instanceof Node}(t)||function(t){return t.$$typeof===o}(t)}(t)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function h(t,e){return!1!==e.clone&&e.isMergeableObject(t)?d((i=t,Array.isArray(i)?[]:{}),t,e):t;var i}function l(t,e,i){return t.concat(e).map((function(t){return h(t,i)}))}function c(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function u(t,e){try{return e in t}catch(t){return!1}}function p(t,e,i){var s={};return i.isMergeableObject(t)&&c(t).forEach((function(e){s[e]=h(t[e],i)})),c(e).forEach((function(a){(function(t,e){return u(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,a)||(u(t,a)&&i.isMergeableObject(e[a])?s[a]=function(t,e){if(!e.customMerge)return d;var i=e.customMerge(t);return"function"==typeof i?i:d}(a,i)(t[a],e[a],i):s[a]=h(e[a],i))})),s}var d=function(t,e,i){(i=i||{}).arrayMerge=i.arrayMerge||l,i.isMergeableObject=i.isMergeableObject||r,i.cloneUnlessOtherwiseSpecified=h;var s=Array.isArray(e);return s===Array.isArray(t)?s?i.arrayMerge(t,e,i):p(t,e,i):h(e,i)},f=function(t){return"object"==typeof t&&void 0!==t.nodeType?t:"string"==typeof t?document.querySelector(t):null},m=function(t,e,i,s){void 0===s&&(s=!1);var a=document.createElement(t);return i&&(a[s?"innerHTML":"textContent"]=i),e&&(a.className=e),a},g=function(t){t.parentNode.removeChild(t)},v=function(t,e,i){return void 0===i&&(i=!1),i?d(t,e):Object.assign(t,e)},_=function(t,e){return t.toLowerCase()+":to:"+e.toLowerCase()},y=function(t,e){Object.assign(t.prototype,e)},b={},w=1,S={on:function(t,e,i,s){void 0===s&&(s={});var a="jvm:"+e+"::"+w++;b[a]={selector:t,handler:i},i._uid=a,t.addEventListener(e,i,s)},delegate:function(t,e,i,s){(e=e.split(" ")).forEach((function(e){S.on(t,e,(function(t){var e=t.target;e.matches(i)&&s.call(e,t)}))}))},off:function(t,e,i){var s=e.split(":")[1];t.removeEventListener(s,i),delete b[i._uid]},flush:function(){Object.keys(b).forEach((function(t){S.off(b[t].selector,t,b[t].handler)}))},getEventRegistry:function(){return b}};var k={onLoaded:"map:loaded",onViewportChange:"viewport:changed",onRegionClick:"region:clicked",onMarkerClick:"marker:clicked",onRegionSelected:"region:selected",onMarkerSelected:"marker:selected",onRegionTooltipShow:"region.tooltip:show",onMarkerTooltipShow:"marker.tooltip:show",onDestroyed:"map:destroyed"},M=function(t,e,i){var s=f(e),a=-1===s.getAttribute("class").indexOf("jvm-region")?"marker":"region",n="region"===a,r=n?s.getAttribute("data-code"):s.getAttribute("data-index"),o=n?k.onRegionSelected:k.onMarkerSelected;return i&&(o=n?k.onRegionTooltipShow:k.onMarkerTooltipShow),{type:a,code:r,event:o,element:n?t.regions[r].element:t._markers[r].element,tooltipText:n?t._mapData.paths[r].name||"":t._markers[r].config.name||""}};var x=function(){function t(){}return t.prototype.dispose=function(){this._tooltip?g(this._tooltip):this.shape.remove();for(var t,e=n(Object.getOwnPropertyNames(this));!(t=e()).done;){this[t.value]=null}},t}(),j={getLabelText:function(t,e){if(e){if("function"==typeof e.render){var i=[];return this.config&&this.config.marker&&i.push(this.config.marker),i.push(t),e.render.apply(this,i)}return t}},getLabelOffsets:function(t,e){return"function"==typeof e.offsets?e.offsets(t):Array.isArray(e.offsets)?e.offsets[t]:[0,0]},setStyle:function(t,e){this.shape.setStyle(t,e)},remove:function(){this.shape.remove(),this.label&&this.label.remove()},hover:function(t){this._setStatus("isHovered",t)},select:function(t){this._setStatus("isSelected",t)},_setStatus:function(t,e){this.shape[t]=e,this.shape.updateStyle(),this[t]=e,this.label&&(this.label[t]=e,this.label.updateStyle())}},C=function(e){function i(t){var i,s=t.map,a=t.code,n=t.path,r=t.style,o=t.label,h=t.labelStyle,l=t.labelsGroup;(i=e.call(this)||this)._map=s,i.shape=i._createRegion(n,a,r);var c=i.getLabelText(a,o);if(o&&c){var u=i.shape.getBBox(),p=i.getLabelOffsets(a,o);i.labelX=u.x+u.width/2+p[0],i.labelY=u.y+u.height/2+p[1],i.label=i._map.canvas.createText({text:c,textAnchor:"middle",alignmentBaseline:"central",dataCode:a,x:i.labelX,y:i.labelY},h,l),i.label.addClass("jvm-region jvm-element")}return i}t(i,e);var s=i.prototype;return s._createRegion=function(t,e,i){return(t=this._map.canvas.createPath({d:t,dataCode:e},i)).addClass("jvm-region jvm-element"),t},s.updateLabelPosition=function(){this.label&&this.label.set({x:this.labelX*this._map.scale+this._map.transX*this._map.scale,y:this.labelY*this._map.scale+this._map.transY*this._map.scale})},i}(x);y(C,j);var L=function(e){function i(t){var i,s=t.index,a=t.map,n=t.style,r=t.x1,o=t.y1,h=t.x2,l=t.y2,c=t.group,u=t.config;return(i=e.call(this)||this).config=u,i.shape=a.canvas.createLine({x1:r,y1:o,x2:h,y2:l,dataIndex:s},n,c),i.shape.addClass("jvm-line"),i}return t(i,e),i.prototype.setStyle=function(t,e){this.shape.setStyle(t,e)},i}(x);var O=function(e){function i(t){var i,s=t.index,a=t.style,n=t.label,r=t.cx,o=t.cy,h=t.map,l=t.group;return(i=e.call(this)||this)._map=h,i._isImage=!!a.initial.image,i.config=arguments[0],i.shape=h.canvas[i._isImage?"createImage":"createCircle"]({dataIndex:s,cx:r,cy:o},a,l),i.shape.addClass("jvm-marker jvm-element"),i._isImage&&i.updateLabelPosition(),n&&i._createLabel(i.config),i}t(i,e);var s=i.prototype;return s.updateLabelPosition=function(){this.label&&this.label.set({x:this._labelX*this._map.scale+this._offsets[0]+this._map.transX*this._map.scale+5+(this._isImage?(this.shape.width||0)/2:this.shape.node.r.baseVal.value),y:this._labelY*this._map.scale+this._map.transY*this._map.scale+this._offsets[1]})},s._createLabel=function(t){var e=t.index,i=t.map,s=t.label,a=t.labelsGroup,n=t.cx,r=t.cy,o=t.marker,h=t.isRecentlyCreated,l=this.getLabelText(e,s);this._labelX=n/i.scale-i.transX,this._labelY=r/i.scale-i.transY,this._offsets=h&&o.offsets?o.offsets:this.getLabelOffsets(e,s),this.label=i.canvas.createText({text:l,dataIndex:e,x:this._labelX,y:this._labelY,dy:"0.6ex"},i.params.markerLabelStyle,a),this.label.addClass("jvm-marker jvm-element"),h&&this.updateLabelPosition()},i}(x);y(O,j);var A=function(){function t(t){void 0===t&&(t={}),this._options=t,this._map=this._options.map,this._series=this._options.series,this._body=m("div","jvm-legend"),this._options.cssClass&&this._body.setAttribute("class",this._options.cssClass),t.vertical?this._map.legendVertical.appendChild(this._body):this._map.legendHorizontal.appendChild(this._body),this.render()}return t.prototype.render=function(){var t,e=this._series.scale.getTicks(),i=m("div","jvm-legend-inner");if(this._body.innderHTML="",this._options.title){var s=m("div","jvm-legend-title",this._options.title);this._body.appendChild(s)}this._body.appendChild(i);for(var a=0;a<e.length;a++){var n=m("div","jvm-legend-tick"),r=m("div","jvm-legend-tick-sample");switch(this._series.config.attribute){case"fill":t=e[a].value,/\.(jpg|gif|png)$/.test(t)?r.style.background="url("+e[a].value+")":r.style.background=e[a].value;break;case"stroke":r.style.background=e[a].value;break;case"image":r.style.background="url("+("object"==typeof e[a].value?e[a].value.url:e[a].value)+") no-repeat center center",r.style.backgroundSize="cover"}n.appendChild(r);var o=e[a].label;this._options.labelRender&&(o=this._options.labelRender(o));var h=m("div","jvm-legend-tick-text",o);n.appendChild(h),i.appendChild(n)}},t}(),X=function(){function t(t){this._scale=t}var e=t.prototype;return e.getValue=function(t){return this._scale[t]},e.getTicks=function(){var t=[];for(var e in this._scale)t.push({label:e,value:this._scale[e]});return t},t}(),Y=function(){function t(t,e,i){void 0===t&&(t={}),this._map=i,this._elements=e,this._values=t.values||{},this.config=t,this.config.attribute=t.attribute||"fill",t.attributes&&this.setAttributes(t.attributes),"object"==typeof t.scale&&(this.scale=new X(t.scale)),this.config.legend&&(this.legend=new A(v({map:this._map,series:this},this.config.legend))),this.setValues(this._values)}var e=t.prototype;return e.setValues=function(t){var e={};for(var i in t)t[i]&&(e[i]=this.scale.getValue(t[i]));this.setAttributes(e)},e.setAttributes=function(t){for(var e in t)this._elements[e]&&this._elements[e].element.setStyle(this.config.attribute,t[e])},e.clear=function(){var t,e={};for(t in this._values)this._elements[t]&&(e[t]=this._elements[t].element.shape.style.initial[this.config.attribute]);this.setAttributes(e),this._values={}},t}();var E={mill:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*t)*this.radDeg))/.8}},merc:function(t,e,i){return{x:this.radius*(e-i)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+t*Math.PI/360))}},aea:function(t,e,i){var s=i*this.radDeg,a=29.5*this.radDeg,n=45.5*this.radDeg,r=t*this.radDeg,o=e*this.radDeg,h=(Math.sin(a)+Math.sin(n))/2,l=Math.cos(a)*Math.cos(a)+2*h*Math.sin(a),c=h*(o-s),u=Math.sqrt(l-2*h*Math.sin(r))/h,p=Math.sqrt(l-2*h*Math.sin(0))/h;return{x:u*Math.sin(c)*this.radius,y:-(p-u*Math.cos(c))*this.radius}},lcc:function(t,e,i){var s=i*this.radDeg,a=e*this.radDeg,n=33*this.radDeg,r=45*this.radDeg,o=t*this.radDeg,h=Math.log(Math.cos(n)*(1/Math.cos(r)))/Math.log(Math.tan(Math.PI/4+r/2)*(1/Math.tan(Math.PI/4+n/2))),l=Math.cos(n)*Math.pow(Math.tan(Math.PI/4+n/2),h)/h,c=l*Math.pow(1/Math.tan(Math.PI/4+o/2),h),u=l*Math.pow(1/Math.tan(Math.PI/4+0),h);return{x:c*Math.sin(h*(a-s))*this.radius,y:-(u-c*Math.cos(h*(a-s)))*this.radius}}};E.degRad=180/Math.PI,E.radDeg=Math.PI/180,E.radius=6381372;var T={_setupContainerEvents:function(){var t,e,i=this,s=this,a=!1;this.params.draggable&&(S.on(this.container,"mousemove",(function(i){if(!a)return!1;s.transX-=(t-i.pageX)/s.scale,s.transY-=(e-i.pageY)/s.scale,s._applyTransform(),t=i.pageX,e=i.pageY})),S.on(this.container,"mousedown",(function(i){return a=!0,t=i.pageX,e=i.pageY,!1})),S.on(document.body,"mouseup",(function(){a=!1}))),this.params.zoomOnScroll&&S.on(this.container,"wheel",(function(t){var e=75*((t.deltaY||-t.wheelDelta||t.detail)>>10||1),a=i.container.getBoundingClientRect(),n=t.pageX-a.left-window.pageXOffset,r=t.pageY-a.top-window.pageYOffset,o=Math.pow(1+s.params.zoomOnScrollSpeed/1e3,-1.5*e);s.tooltip&&s._tooltip.hide(),s._setScale(s.scale*o,n,r),t.preventDefault()}))},_setupElementEvents:function(){var t,e,i,s=this,a=this.container;S.on(a,"mousemove",(function(s){Math.abs(t-s.pageX)+Math.abs(e-s.pageY)>2&&(i=!0)})),S.delegate(a,"mousedown",".jvm-element",(function(s){t=s.pageX,e=s.pageY,i=!1})),S.delegate(a,"mouseover mouseout",".jvm-element",(function(t){var e=M(s,this,!0),i=s.params.showTooltip;"mouseover"===t.type?(e.element.hover(!0),i&&(s._tooltip.text(e.tooltipText),s._tooltip.show(),s._emit(e.event,[t,s._tooltip,e.code]))):(e.element.hover(!1),i&&s._tooltip.hide())})),S.delegate(a,"mouseup",".jvm-element",(function(t){var e=M(s,this);if(!i&&("region"===e.type&&s.params.regionsSelectable||"marker"===e.type&&s.params.markersSelectable)){var a=e.element;s.params[e.type+"sSelectableOne"]&&s._clearSelected(e.type+"s"),e.element.isSelected?a.select(!1):a.select(!0),s._emit(e.event,[e.code,a.isSelected,s._getSelected(e.type+"s")])}})),S.delegate(a,"click",".jvm-element",(function(t){var e=M(s,this),i=e.type,a=e.code;s._emit("region"===i?k.onRegionClick:k.onMarkerClick,[t,a])}))},_setupZoomButtons:function(){var t=this,e=m("div","jvm-zoom-btn jvm-zoomin","+",!0),i=m("div","jvm-zoom-btn jvm-zoomout","−",!0);this.container.appendChild(e),this.container.appendChild(i);var s=function(e){return void 0===e&&(e=!0),function(){return t._setScale(e?t.scale*t.params.zoomStep:t.scale/t.params.zoomStep,t._width/2,t._height/2,!1,t.params.zoomAnimate)}};S.on(e,"click",s()),S.on(i,"click",s(!1))},_setupContainerTouchEvents:function(){var t,e,i,s,a,n,r,o=this,h=function(h){var l,c,u,p,d=h.touches;if("touchstart"==h.type&&(r=0),1==d.length)1==r&&(u=o.transX,p=o.transY,o.transX-=(i-d[0].pageX)/o.scale,o.transY-=(s-d[0].pageY)/o.scale,o._tooltip.hide(),o._applyTransform(),u==o.transX&&p==o.transY||h.preventDefault()),i=d[0].pageX,s=d[0].pageY;else if(2==d.length)if(2==r)c=Math.sqrt(Math.pow(d[0].pageX-d[1].pageX,2)+Math.pow(d[0].pageY-d[1].pageY,2))/e,o._setScale(t*c,a,n),o._tooltip.hide(),h.preventDefault();else{var f=o.container.getBoundingClientRect();l={top:f.top+window.scrollY,left:f.left+window.scrollX},a=d[0].pageX>d[1].pageX?d[1].pageX+(d[0].pageX-d[1].pageX)/2:d[0].pageX+(d[1].pageX-d[0].pageX)/2,n=d[0].pageY>d[1].pageY?d[1].pageY+(d[0].pageY-d[1].pageY)/2:d[0].pageY+(d[1].pageY-d[0].pageY)/2,a-=l.left,n-=l.top,t=o.scale,e=Math.sqrt(Math.pow(d[0].pageX-d[1].pageX,2)+Math.pow(d[0].pageY-d[1].pageY,2))}r=d.length};S.on(o.container,"touchstart",h),S.on(o.container,"touchmove",h)},_createRegions:function(){for(var t in this._regionLabelsGroup=this._regionLabelsGroup||this.canvas.createGroup("jvm-regions-labels-group"),this._mapData.paths){var e=new C({map:this,code:t,path:this._mapData.paths[t].path,style:v({},this.params.regionStyle),labelStyle:this.params.regionLabelStyle,labelsGroup:this._regionLabelsGroup,label:this.params.labels&&this.params.labels.regions});this.regions[t]={config:this._mapData.paths[t],element:e}}},_createLines:function(t,e,i){void 0===i&&(i=!1);var s=!1,a=!1;for(var n in this.linesGroup=this.linesGroup||this.canvas.createGroup("jvm-lines-group"),t){var r=t[n];for(var o in e){var h=i?e[o].config:e[o];h.name===r.from&&(s=this.getMarkerPosition(h)),h.name===r.to&&(a=this.getMarkerPosition(h))}!1!==s&&!1!==a&&(this._lines[_(r.from,r.to)]=new L({index:n,map:this,style:v({initial:this.params.lineStyle},{initial:r.style||{}},!0),x1:s.x,y1:s.y,x2:a.x,y2:a.y,group:this.linesGroup,config:r}))}},_createMarkers:function(t,e){var i=this;void 0===t&&(t={}),void 0===e&&(e=!1),this._markersGroup=this._markersGroup||this.canvas.createGroup("jvm-markers-group"),this._markerLabelsGroup=this._markerLabelsGroup||this.canvas.createGroup("jvm-markers-labels-group");var s=function(){var s=t[a],n=i.getMarkerPosition(s),r=s.coords.join(":");if(!n)return"continue";if(e){if(Object.keys(i._markers).filter((function(t){return i._markers[t]._uid===r})).length)return"continue";a=Object.keys(i._markers).length}var o=new O({index:a,map:i,style:v(i.params.markerStyle,{initial:s.style||{}},!0),label:i.params.labels&&i.params.labels.markers,labelsGroup:i._markerLabelsGroup,cx:n.x,cy:n.y,group:i._markersGroup,marker:s,isRecentlyCreated:e});i._markers[a]&&i.removeMarkers([a]),i._markers[a]={_uid:r,config:s,element:o}};for(var a in t)s()},_createSeries:function(){for(var t in this.series={markers:[],regions:[]},this.params.series)for(var e=0;e<this.params.series[t].length;e++)this.series[t][e]=new Y(this.params.series[t][e],"markers"===t?this._markers:this.regions,this)},_applyTransform:function(){var t,e,i,s;this._defaultWidth*this.scale<=this._width?(t=(this._width-this._defaultWidth*this.scale)/(2*this.scale),i=(this._width-this._defaultWidth*this.scale)/(2*this.scale)):(t=0,i=(this._width-this._defaultWidth*this.scale)/this.scale),this._defaultHeight*this.scale<=this._height?(e=(this._height-this._defaultHeight*this.scale)/(2*this.scale),s=(this._height-this._defaultHeight*this.scale)/(2*this.scale)):(e=0,s=(this._height-this._defaultHeight*this.scale)/this.scale),this.transY>e?this.transY=e:this.transY<s&&(this.transY=s),this.transX>t?this.transX=t:this.transX<i&&(this.transX=i),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this._markers&&this._repositionMarkers(),this._lines&&this._repositionLines(),this._repositionLabels()},_resize:function(){var t=this._baseScale;this._width/this._height>this._defaultWidth/this._defaultHeight?(this._baseScale=this._height/this._defaultHeight,this._baseTransX=Math.abs(this._width-this._defaultWidth*this._baseScale)/(2*this._baseScale)):(this._baseScale=this._width/this._defaultWidth,this._baseTransY=Math.abs(this._height-this._defaultHeight*this._baseScale)/(2*this._baseScale)),this.scale*=this._baseScale/t,this.transX*=this._baseScale/t,this.transY*=this._baseScale/t},_setScale:function(t,e,i,s,a){var n,r,o,h,l,c,u,p,d,f,m=this,g=0,v=Math.abs(Math.round(60*(t-this.scale)/Math.max(t,this.scale)));t>this.params.zoomMax*this._baseScale?t=this.params.zoomMax*this._baseScale:t<this.params.zoomMin*this._baseScale&&(t=this.params.zoomMin*this._baseScale),void 0!==e&&void 0!==i&&(n=t/this.scale,s?(d=e+this._defaultWidth*(this._width/(this._defaultWidth*t))/2,f=i+this._defaultHeight*(this._height/(this._defaultHeight*t))/2):(d=this.transX-(n-1)/t*e,f=this.transY-(n-1)/t*i)),a&&v>0?(o=this.scale,h=(t-o)/v,l=this.transX*this.scale,u=this.transY*this.scale,c=(d*t-l)/v,p=(f*t-u)/v,r=setInterval((function(){g+=1,m.scale=o+h*g,m.transX=(l+c*g)/m.scale,m.transY=(u+p*g)/m.scale,m._applyTransform(),g==v&&(clearInterval(r),m._emit(k.onViewportChange,[m.scale,m.transX,m.transY]))}),10)):(this.transX=d,this.transY=f,this.scale=t,this._applyTransform(),this._emit(k.onViewportChange,[this.scale,this.transX,this.transY]))},setFocus:function(t){var e=this;void 0===t&&(t={});var i,s=[];if(t.region?s.push(t.region):t.regions&&(s=t.regions),s.length)return s.forEach((function(t){if(e.regions[t]){var s=e.regions[t].element.shape.getBBox();s&&(i=void 0===i?s:{x:Math.min(i.x,s.x),y:Math.min(i.y,s.y),width:Math.max(i.x+i.width,s.x+s.width)-Math.min(i.x,s.x),height:Math.max(i.y+i.height,s.y+s.height)-Math.min(i.y,s.y)})}})),this._setScale(Math.min(this._width/i.width,this._height/i.height),-(i.x+i.width/2),-(i.y+i.height/2),!0,t.animate);if(t.coords){var a=this.coordsToPoint(t.coords[0],t.coords[1]),n=this.transX-a.x/this.scale,r=this.transY-a.y/this.scale;return this._setScale(t.scale*this._baseScale,n,r,!0,t.animate)}},updateSize:function(){this._width=this.container.offsetWidth,this._height=this.container.offsetHeight,this._resize(),this.canvas.setSize(this._width,this._height),this._applyTransform()},coordsToPoint:function(t,e){var i=G.maps[this.params.map].projection,s=E[i.type](t,e,i.centralMeridian),a=s.x,n=s.y,r=this.getInsetForPoint(a,n);if(!r)return!1;var o=r.bbox;return a=(a-o[0].x)/(o[1].x-o[0].x)*r.width*this.scale,n=(n-o[0].y)/(o[1].y-o[0].y)*r.height*this.scale,{x:a+this.transX*this.scale+r.left*this.scale,y:n+this.transY*this.scale+r.top*this.scale}},getInsetForPoint:function(t,e){for(var i=G.maps[this.params.map].insets,s=0;s<i.length;s++){var a=i[s].bbox,n=a[0],r=a[1];if(t>n.x&&t<r.x&&e>n.y&&e<r.y)return i[s]}},getMarkerPosition:function(t){var e=t.coords;return G.maps[this.params.map].projection?this.coordsToPoint.apply(this,e):{x:e[0]*this.scale+this.transX*this.scale,y:e[1]*this.scale+this.transY*this.scale}},_repositionLines:function(){var t=!1,e=!1;for(var i in this._lines){for(var s in this._markers){var a=this._markers[s];a.config.name===this._lines[i].config.from&&(t=this.getMarkerPosition(a.config)),a.config.name===this._lines[i].config.to&&(e=this.getMarkerPosition(a.config))}!1!==t&&!1!==e&&this._lines[i].setStyle({x1:t.x,y1:t.y,x2:e.x,y2:e.y})}},_repositionMarkers:function(){for(var t in this._markers){var e=this.getMarkerPosition(this._markers[t].config);!1!==e&&this._markers[t].element.setStyle({cx:e.x,cy:e.y})}},_repositionLabels:function(){var t=this.params.labels;if(t){if(t.regions)for(var e in this.regions)this.regions[e].element.updateLabelPosition();if(t.markers)for(var i in this._markers)this._markers[i].element.updateLabelPosition()}}},z=function(){function t(t,e){this.node=this._createElement(t),e&&this.set(e)}var e=t.prototype;return e._createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e.addClass=function(t){this.node.setAttribute("class",t)},e.getBBox=function(){return this.node.getBBox()},e.set=function(t,e){if("object"==typeof t)for(var i in t)this.applyAttr(i,t[i]);else this.applyAttr(t,e)},e.get=function(t){return this.style.initial[t]},e.applyAttr=function(t,e){this.node.setAttribute(t.replace(/[\w]([A-Z])/g,(function(t){return t[0]+"-"+t[1]})).toLowerCase(),e)},e.remove=function(){g(this.node)},t}(),P=function(e){function i(t,i,s){var a;return void 0===s&&(s={}),(a=e.call(this,t,i)||this).isHovered=!1,a.isSelected=!1,a.style=s,a.style.current={},a.updateStyle(),a}t(i,e);var s=i.prototype;return s.setStyle=function(t,e){var i;"object"==typeof t?v(this.style.current,t):v(this.style.current,((i={})[t]=e,i));this.updateStyle()},s.updateStyle=function(){var t={};v(t,this.style.initial),v(t,this.style.current),this.isHovered&&v(t,this.style.hover),this.isSelected&&(v(t,this.style.selected),this.isHovered&&v(t,this.style.selectedHover)),this.set(t)},i}(z),D=function(e){function i(t,i){return e.call(this,"text",t,i)||this}return t(i,e),i.prototype.applyAttr=function(t,i){"text"===t?this.node.textContent=i:e.prototype.applyAttr.call(this,t,i)},i}(P),I=function(e){function i(t,i){return e.call(this,"image",t,i)||this}return t(i,e),i.prototype.applyAttr=function(t,i){var s;"image"===t?("object"==typeof i?(s=i.url,this.offset=i.offset||[0,0]):(s=i,this.offset=[0,0]),this.node.setAttributeNS("http://www.w3.org/1999/xlink","href",s),this.width=23,this.height=23,this.applyAttr("width",this.width),this.applyAttr("height",this.height),this.applyAttr("x",this.cx-this.width/2+this.offset[0]),this.applyAttr("y",this.cy-this.height/2+this.offset[1])):"cx"==t?(this.cx=i,this.width&&this.applyAttr("x",i-this.width/2+this.offset[0])):"cy"==t?(this.cy=i,this.height&&this.applyAttr("y",i-this.height/2+this.offset[1])):e.prototype.applyAttr.apply(this,arguments)},i}(P),R=function(e){function i(t){var i;return(i=e.call(this,"svg")||this)._container=t,i._defsElement=new z("defs"),i._rootElement=new z("g",{id:"jvm-regions-group"}),i.node.appendChild(i._defsElement.node),i.node.appendChild(i._rootElement.node),i._container.appendChild(i.node),i}t(i,e);var s=i.prototype;return s.setSize=function(t,e){this.node.setAttribute("width",t),this.node.setAttribute("height",e)},s.applyTransformParams=function(t,e,i){this._rootElement.node.setAttribute("transform","scale("+t+") translate("+e+", "+i+")")},s.createPath=function(t,e){var i=new P("path",t,e);return i.node.setAttribute("fill-rule","evenodd"),this._add(i)},s.createCircle=function(t,e,i){var s=new P("circle",t,e);return this._add(s,i)},s.createLine=function(t,e,i){var s=new P("line",t,e);return this._add(s,i)},s.createText=function(t,e,i){var s=new D(t,e);return this._add(s,i)},s.createImage=function(t,e,i){var s=new I(t,e);return this._add(s,i)},s.createGroup=function(t){var e=new z("g");return this.node.appendChild(e.node),t&&(e.node.id=t),e.canvas=this,e},s._add=function(t,e){return(e=e||this._rootElement).node.appendChild(t.node),t},i}(z),H=function(e){function s(t){var s;s=e.call(this)||this;var a=m("div","jvm-tooltip");return s._map=t,s._tooltip=document.body.appendChild(a),s._bindEventListeners(),i(s)||i(s)}t(s,e);var a=s.prototype;return a._bindEventListeners=function(){var t=this;S.on(this._map.container,"mousemove",(function(e){if(t._tooltip.classList.contains("active")){var i,s,a=(i=t._map.container,s="#jvm-regions-group",Element.prototype.querySelector.call(i,s)).getBoundingClientRect(),n=t._tooltip.getBoundingClientRect(),r=n.height,o=n.width,h=e.clientY<=a.top+r+5,l=e.pageY-r-5,c=e.pageX-o-5;h&&(l+=r+5,c-=10),e.clientX<a.left+o+5&&(c=e.pageX+5+2,h&&(c+=10)),t.css({top:l+"px",left:c+"px"})}}))},a.getElement=function(){return this._tooltip},a.show=function(){this._tooltip.classList.add("active")},a.hide=function(){this._tooltip.classList.remove("active")},a.text=function(t,e){void 0===e&&(e=!1);var i=e?"innerHTML":"textContent";if(!t)return this._tooltip[i];this._tooltip[i]=t},a.css=function(t){for(var e in t)this._tooltip.style[e]=t[e];return this},s}(x),V=function(){function t(t,e){var i=t.scale,s=t.values;this._scale=i,this._values=s,this._fromColor=this.hexToRgb(i[0]),this._toColor=this.hexToRgb(i[1]),this._map=e,this.setMinMaxValues(s),this.visualize()}var e=t.prototype;return e.setMinMaxValues=function(t){for(var e in this.min=Number.MAX_VALUE,this.max=0,t)(e=parseFloat(t[e]))>this.max&&(this.max=e),e<this.min&&(this.min=e)},e.visualize=function(){var t,e={};for(var i in this._values)t=parseFloat(this._values[i]),isNaN(t)||(e[i]=this.getValue(t));this.setAttributes(e)},e.setAttributes=function(t){for(var e in t)this._map.regions[e]&&this._map.regions[e].element.setStyle("fill",t[e])},e.getValue=function(t){for(var e,i="#",s=0;s<3;s++)i+=(1===(e=Math.round(this._fromColor[s]+(this._toColor[s]-this._fromColor[s])*((t-this.min)/(this.max-this.min))).toString(16)).length?"0":"")+e;return i},e.hexToRgb=function(t){var e=0,i=0,s=0;return 4==t.length?(e="0x"+t[1]+t[1],i="0x"+t[2]+t[2],s="0x"+t[3]+t[3]):7==t.length&&(e="0x"+t[1]+t[2],i="0x"+t[3]+t[4],s="0x"+t[5]+t[6]),[parseInt(e),parseInt(i),parseInt(s)]},t}(),G=function(){function t(e){var i=this;if(void 0===e&&(e={}),this.params=v(t.defaults,e,!0),!t.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+e.map);this.regions={},this.scale=1,this.transX=0,this.transY=0,this._mapData=t.maps[this.params.map],this._markers={},this._lines={},this._defaultWidth=this._mapData.width,this._defaultHeight=this._mapData.height,this._height=0,this._width=0,this._baseScale=1,this._baseTransX=0,this._baseTransY=0,"loading"!==document.readyState?this._init():window.addEventListener("DOMContentLoaded",(function(){return i._init()}))}var e=t.prototype;return e._init=function(){var t=this.params;this.container=f(t.selector),this.container.classList.add("jvm-container"),this.canvas=new R(this.container),this.setBackgroundColor(t.backgroundColor),this._createRegions(),this.updateSize(),this._createLines(t.lines||{},t.markers||{}),this._createMarkers(t.markers),this._repositionLabels(),this._setupContainerEvents(),this._setupElementEvents(),t.zoomButtons&&this._setupZoomButtons(),t.showTooltip&&(this._tooltip=new H(this)),t.selectedRegions&&this._setSelected("regions",t.selectedRegions),t.selectedMarkers&&this._setSelected("_markers",t.selectedMarkers),t.focusOn&&this.setFocus(t.focusOn),t.visualizeData&&(this.dataVisualization=new V(t.visualizeData,this)),t.bindTouchEvents&&("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&this._setupContainerTouchEvents(),t.series&&(this.container.appendChild(this.legendHorizontal=m("div","jvm-series-container jvm-series-h")),this.container.appendChild(this.legendVertical=m("div","jvm-series-container jvm-series-v")),this._createSeries()),this._emit(k.onLoaded,[this])},e.setBackgroundColor=function(t){this.container.style.backgroundColor=t},e.getSelectedRegions=function(){return this._getSelected("regions")},e.clearSelectedRegions=function(){this._clearSelected("regions")},e.getSelectedMarkers=function(){return this._getSelected("_markers")},e.clearSelectedMarkers=function(){this._clearSelected("_markers")},e.addMarkers=function(t){if(Array.isArray(t))return this._createMarkers(t,!0);this._createMarkers([t],!0)},e.removeMarkers=function(t){var e=this;t||(t=Object.keys(this._markers)),t.forEach((function(t){e._markers[t].element.remove(),delete e._markers[t]}))},e.addLine=function(t,e,i){void 0===i&&(i={}),console.warn("`addLine` method is deprecated, please use `addLines` instead."),this._createLines([{from:t,to:e,style:i}],this._markers,!0)},e.addLines=function(t){var e=this._getLinesAsUids();Array.isArray(t)||(t=[t]),this._createLines(t.filter((function(t){return!(e.indexOf(_(t.from,t.to))>-1)})),this._markers,!0)},e.removeLines=function(t){var e=this;(t=Array.isArray(t)?t.map((function(t){return _(t.from,t.to)})):this._getLinesAsUids()).forEach((function(t){e._lines[t].dispose(),delete e._lines[t]}))},e.removeLine=function(t,e){console.warn("`removeLine` method is deprecated, please use `removeLines` instead.");var i=_(t,e);this._lines.hasOwnProperty(i)&&(this._lines[i].element.remove(),delete this._lines[i])},e.reset=function(){for(var t in this.series)for(var e=0;e<this.series[t].length;e++)this.series[t][e].clear();this.legendHorizontal&&(g(this.legendHorizontal),this.legendHorizontal=null),this.legendVertical&&(g(this.legendVertical),this.legendVertical=null),this.scale=this._baseScale,this.transX=this._baseTransX,this.transY=this._baseTransY,this._applyTransform(),this.clearSelectedMarkers(),this.clearSelectedRegions(),this.removeMarkers()},e.destroy=function(t){var e=this;void 0===t&&(t=!0),S.flush(),this._tooltip.dispose(),this._emit(k.onDestroyed),t&&Object.keys(this).forEach((function(t){try{delete e[t]}catch(t){}}))},e.extend=function(e,i){if("function"==typeof this[e])throw new Error("The method ["+e+"] does already exist, please use another name.");t.prototype[e]=i},e._emit=function(t,e){for(var i in k)k[i]===t&&"function"==typeof this.params[i]&&this.params[i].apply(this,e)},e._getSelected=function(t){var e=[];for(var i in this[t])this[t][i].element.isSelected&&e.push(i);return e},e._setSelected=function(t,e){var i=this;e.forEach((function(e){i[t][e]&&i[t][e].element.select(!0)}))},e._clearSelected=function(t){var e=this;this._getSelected(t).forEach((function(i){e[t][i].element.select(!1)}))},e._getLinesAsUids=function(){return Object.keys(this._lines)},t}();G.maps={},G.defaults={map:"world",backgroundColor:"transparent",draggable:!0,zoomButtons:!0,zoomOnScroll:!0,zoomOnScrollSpeed:3,zoomMax:12,zoomMin:1,zoomAnimate:!0,showTooltip:!0,zoomStep:1.5,bindTouchEvents:!0,lineStyle:{stroke:"#808080",strokeWidth:1,strokeLinecap:"round"},markersSelectable:!1,markersSelectableOne:!1,markerStyle:{initial:{r:7,fill:"#374151",fillOpacity:1,stroke:"#FFF",strokeWidth:5,strokeOpacity:.5},hover:{fill:"#3cc0ff",cursor:"pointer"},selected:{fill:"blue"},selectedHover:{}},markerLabelStyle:{initial:{fontFamily:"Verdana",fontSize:12,fontWeight:500,cursor:"default",fill:"#374151"},hover:{cursor:"pointer"},selected:{},selectedHover:{}},regionsSelectable:!1,regionsSelectableOne:!1,regionStyle:{initial:{fill:"#dee2e8",fillOpacity:1,stroke:"none",strokeWidth:0},hover:{fillOpacity:.7,cursor:"pointer"},selected:{fill:"#9ca3af"},selectedHover:{}},regionLabelStyle:{initial:{fontFamily:"Verdana",fontSize:"12",fontWeight:"bold",cursor:"default",fill:"#35373e"},hover:{cursor:"pointer"}}},Object.assign(G.prototype,T);var B=function(){function t(t){if(void 0===t&&(t={}),!t.selector)throw new Error("Selector is not given.");return new G(t)}return t.addMap=function(t,e){G.maps[t]=e},t}();return window.jsVectorMap=B}));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Ephox Corporation DBA Tiny Technologies, Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1,554 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TinyMCE version 6.4.2 (2023-04-26)
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
(function () {
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
|
-
var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
-
|
|
10
|
-
const hasProto = (v, constructor, predicate) => {
|
|
11
|
-
var _a;
|
|
12
|
-
if (predicate(v, constructor.prototype)) {
|
|
13
|
-
return true;
|
|
14
|
-
} else {
|
|
15
|
-
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const typeOf = x => {
|
|
19
|
-
const t = typeof x;
|
|
20
|
-
if (x === null) {
|
|
21
|
-
return 'null';
|
|
22
|
-
} else if (t === 'object' && Array.isArray(x)) {
|
|
23
|
-
return 'array';
|
|
24
|
-
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
25
|
-
return 'string';
|
|
26
|
-
} else {
|
|
27
|
-
return t;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const isType = type => value => typeOf(value) === type;
|
|
31
|
-
const isSimpleType = type => value => typeof value === type;
|
|
32
|
-
const isString = isType('string');
|
|
33
|
-
const isObject = isType('object');
|
|
34
|
-
const isArray = isType('array');
|
|
35
|
-
const isNullable = a => a === null || a === undefined;
|
|
36
|
-
const isNonNullable = a => !isNullable(a);
|
|
37
|
-
const isFunction = isSimpleType('function');
|
|
38
|
-
const isArrayOf = (value, pred) => {
|
|
39
|
-
if (isArray(value)) {
|
|
40
|
-
for (let i = 0, len = value.length; i < len; ++i) {
|
|
41
|
-
if (!pred(value[i])) {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const constant = value => {
|
|
51
|
-
return () => {
|
|
52
|
-
return value;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
function curry(fn, ...initialArgs) {
|
|
56
|
-
return (...restArgs) => {
|
|
57
|
-
const all = initialArgs.concat(restArgs);
|
|
58
|
-
return fn.apply(null, all);
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
const never = constant(false);
|
|
62
|
-
|
|
63
|
-
const escape = text => text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
64
|
-
|
|
65
|
-
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
66
|
-
|
|
67
|
-
const option = name => editor => editor.options.get(name);
|
|
68
|
-
const register$2 = editor => {
|
|
69
|
-
const registerOption = editor.options.register;
|
|
70
|
-
registerOption('template_cdate_classes', {
|
|
71
|
-
processor: 'string',
|
|
72
|
-
default: 'cdate'
|
|
73
|
-
});
|
|
74
|
-
registerOption('template_mdate_classes', {
|
|
75
|
-
processor: 'string',
|
|
76
|
-
default: 'mdate'
|
|
77
|
-
});
|
|
78
|
-
registerOption('template_selected_content_classes', {
|
|
79
|
-
processor: 'string',
|
|
80
|
-
default: 'selcontent'
|
|
81
|
-
});
|
|
82
|
-
registerOption('template_preview_replace_values', { processor: 'object' });
|
|
83
|
-
registerOption('template_replace_values', { processor: 'object' });
|
|
84
|
-
registerOption('templates', {
|
|
85
|
-
processor: value => isString(value) || isArrayOf(value, isObject) || isFunction(value),
|
|
86
|
-
default: []
|
|
87
|
-
});
|
|
88
|
-
registerOption('template_cdate_format', {
|
|
89
|
-
processor: 'string',
|
|
90
|
-
default: editor.translate('%Y-%m-%d')
|
|
91
|
-
});
|
|
92
|
-
registerOption('template_mdate_format', {
|
|
93
|
-
processor: 'string',
|
|
94
|
-
default: editor.translate('%Y-%m-%d')
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
const getCreationDateClasses = option('template_cdate_classes');
|
|
98
|
-
const getModificationDateClasses = option('template_mdate_classes');
|
|
99
|
-
const getSelectedContentClasses = option('template_selected_content_classes');
|
|
100
|
-
const getPreviewReplaceValues = option('template_preview_replace_values');
|
|
101
|
-
const getTemplateReplaceValues = option('template_replace_values');
|
|
102
|
-
const getTemplates = option('templates');
|
|
103
|
-
const getCdateFormat = option('template_cdate_format');
|
|
104
|
-
const getMdateFormat = option('template_mdate_format');
|
|
105
|
-
const getContentStyle = option('content_style');
|
|
106
|
-
const shouldUseContentCssCors = option('content_css_cors');
|
|
107
|
-
const getBodyClass = option('body_class');
|
|
108
|
-
|
|
109
|
-
const addZeros = (value, len) => {
|
|
110
|
-
value = '' + value;
|
|
111
|
-
if (value.length < len) {
|
|
112
|
-
for (let i = 0; i < len - value.length; i++) {
|
|
113
|
-
value = '0' + value;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return value;
|
|
117
|
-
};
|
|
118
|
-
const getDateTime = (editor, fmt, date = new Date()) => {
|
|
119
|
-
const daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
|
120
|
-
const daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
|
121
|
-
const monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
|
122
|
-
const monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
|
123
|
-
fmt = fmt.replace('%D', '%m/%d/%Y');
|
|
124
|
-
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
|
125
|
-
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
|
126
|
-
fmt = fmt.replace('%y', '' + date.getYear());
|
|
127
|
-
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
|
128
|
-
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
|
129
|
-
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
|
130
|
-
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
|
131
|
-
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
|
132
|
-
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
|
133
|
-
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
|
134
|
-
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
|
135
|
-
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
|
136
|
-
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
|
137
|
-
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
|
138
|
-
fmt = fmt.replace('%%', '%');
|
|
139
|
-
return fmt;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
class Optional {
|
|
143
|
-
constructor(tag, value) {
|
|
144
|
-
this.tag = tag;
|
|
145
|
-
this.value = value;
|
|
146
|
-
}
|
|
147
|
-
static some(value) {
|
|
148
|
-
return new Optional(true, value);
|
|
149
|
-
}
|
|
150
|
-
static none() {
|
|
151
|
-
return Optional.singletonNone;
|
|
152
|
-
}
|
|
153
|
-
fold(onNone, onSome) {
|
|
154
|
-
if (this.tag) {
|
|
155
|
-
return onSome(this.value);
|
|
156
|
-
} else {
|
|
157
|
-
return onNone();
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
isSome() {
|
|
161
|
-
return this.tag;
|
|
162
|
-
}
|
|
163
|
-
isNone() {
|
|
164
|
-
return !this.tag;
|
|
165
|
-
}
|
|
166
|
-
map(mapper) {
|
|
167
|
-
if (this.tag) {
|
|
168
|
-
return Optional.some(mapper(this.value));
|
|
169
|
-
} else {
|
|
170
|
-
return Optional.none();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
bind(binder) {
|
|
174
|
-
if (this.tag) {
|
|
175
|
-
return binder(this.value);
|
|
176
|
-
} else {
|
|
177
|
-
return Optional.none();
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
exists(predicate) {
|
|
181
|
-
return this.tag && predicate(this.value);
|
|
182
|
-
}
|
|
183
|
-
forall(predicate) {
|
|
184
|
-
return !this.tag || predicate(this.value);
|
|
185
|
-
}
|
|
186
|
-
filter(predicate) {
|
|
187
|
-
if (!this.tag || predicate(this.value)) {
|
|
188
|
-
return this;
|
|
189
|
-
} else {
|
|
190
|
-
return Optional.none();
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
getOr(replacement) {
|
|
194
|
-
return this.tag ? this.value : replacement;
|
|
195
|
-
}
|
|
196
|
-
or(replacement) {
|
|
197
|
-
return this.tag ? this : replacement;
|
|
198
|
-
}
|
|
199
|
-
getOrThunk(thunk) {
|
|
200
|
-
return this.tag ? this.value : thunk();
|
|
201
|
-
}
|
|
202
|
-
orThunk(thunk) {
|
|
203
|
-
return this.tag ? this : thunk();
|
|
204
|
-
}
|
|
205
|
-
getOrDie(message) {
|
|
206
|
-
if (!this.tag) {
|
|
207
|
-
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
208
|
-
} else {
|
|
209
|
-
return this.value;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
static from(value) {
|
|
213
|
-
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
214
|
-
}
|
|
215
|
-
getOrNull() {
|
|
216
|
-
return this.tag ? this.value : null;
|
|
217
|
-
}
|
|
218
|
-
getOrUndefined() {
|
|
219
|
-
return this.value;
|
|
220
|
-
}
|
|
221
|
-
each(worker) {
|
|
222
|
-
if (this.tag) {
|
|
223
|
-
worker(this.value);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
toArray() {
|
|
227
|
-
return this.tag ? [this.value] : [];
|
|
228
|
-
}
|
|
229
|
-
toString() {
|
|
230
|
-
return this.tag ? `some(${ this.value })` : 'none()';
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
Optional.singletonNone = new Optional(false);
|
|
234
|
-
|
|
235
|
-
const exists = (xs, pred) => {
|
|
236
|
-
for (let i = 0, len = xs.length; i < len; i++) {
|
|
237
|
-
const x = xs[i];
|
|
238
|
-
if (pred(x, i)) {
|
|
239
|
-
return true;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return false;
|
|
243
|
-
};
|
|
244
|
-
const map = (xs, f) => {
|
|
245
|
-
const len = xs.length;
|
|
246
|
-
const r = new Array(len);
|
|
247
|
-
for (let i = 0; i < len; i++) {
|
|
248
|
-
const x = xs[i];
|
|
249
|
-
r[i] = f(x, i);
|
|
250
|
-
}
|
|
251
|
-
return r;
|
|
252
|
-
};
|
|
253
|
-
const findUntil = (xs, pred, until) => {
|
|
254
|
-
for (let i = 0, len = xs.length; i < len; i++) {
|
|
255
|
-
const x = xs[i];
|
|
256
|
-
if (pred(x, i)) {
|
|
257
|
-
return Optional.some(x);
|
|
258
|
-
} else if (until(x, i)) {
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return Optional.none();
|
|
263
|
-
};
|
|
264
|
-
const find = (xs, pred) => {
|
|
265
|
-
return findUntil(xs, pred, never);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
const hasOwnProperty = Object.hasOwnProperty;
|
|
269
|
-
const get = (obj, key) => {
|
|
270
|
-
return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
|
|
271
|
-
};
|
|
272
|
-
const has = (obj, key) => hasOwnProperty.call(obj, key);
|
|
273
|
-
|
|
274
|
-
var global$1 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
|
|
275
|
-
|
|
276
|
-
const entitiesAttr = {
|
|
277
|
-
'"': '"',
|
|
278
|
-
'<': '<',
|
|
279
|
-
'>': '>',
|
|
280
|
-
'&': '&',
|
|
281
|
-
'\'': '''
|
|
282
|
-
};
|
|
283
|
-
const htmlEscape = html => html.replace(/["'<>&]/g, match => get(entitiesAttr, match).getOr(match));
|
|
284
|
-
const hasAnyClasses = (dom, n, classes) => exists(classes.split(/\s+/), c => dom.hasClass(n, c));
|
|
285
|
-
const parseAndSerialize = (editor, html) => global$1({ validate: true }, editor.schema).serialize(editor.parser.parse(html, { insert: true }));
|
|
286
|
-
|
|
287
|
-
const createTemplateList = (editor, callback) => {
|
|
288
|
-
return () => {
|
|
289
|
-
const templateList = getTemplates(editor);
|
|
290
|
-
if (isFunction(templateList)) {
|
|
291
|
-
templateList(callback);
|
|
292
|
-
} else if (isString(templateList)) {
|
|
293
|
-
fetch(templateList).then(res => {
|
|
294
|
-
if (res.ok) {
|
|
295
|
-
res.json().then(callback);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
} else {
|
|
299
|
-
callback(templateList);
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
const replaceTemplateValues = (html, templateValues) => {
|
|
304
|
-
global$2.each(templateValues, (v, k) => {
|
|
305
|
-
if (isFunction(v)) {
|
|
306
|
-
v = v(k);
|
|
307
|
-
}
|
|
308
|
-
html = html.replace(new RegExp('\\{\\$' + escape(k) + '\\}', 'g'), v);
|
|
309
|
-
});
|
|
310
|
-
return html;
|
|
311
|
-
};
|
|
312
|
-
const replaceVals = (editor, scope) => {
|
|
313
|
-
const dom = editor.dom, vl = getTemplateReplaceValues(editor);
|
|
314
|
-
global$2.each(dom.select('*', scope), e => {
|
|
315
|
-
global$2.each(vl, (v, k) => {
|
|
316
|
-
if (dom.hasClass(e, k)) {
|
|
317
|
-
if (isFunction(v)) {
|
|
318
|
-
v(e);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
});
|
|
323
|
-
};
|
|
324
|
-
const insertTemplate = (editor, _ui, html) => {
|
|
325
|
-
const dom = editor.dom;
|
|
326
|
-
const sel = editor.selection.getContent();
|
|
327
|
-
html = replaceTemplateValues(html, getTemplateReplaceValues(editor));
|
|
328
|
-
let el = dom.create('div', {}, parseAndSerialize(editor, html));
|
|
329
|
-
const n = dom.select('.mceTmpl', el);
|
|
330
|
-
if (n && n.length > 0) {
|
|
331
|
-
el = dom.create('div');
|
|
332
|
-
el.appendChild(n[0].cloneNode(true));
|
|
333
|
-
}
|
|
334
|
-
global$2.each(dom.select('*', el), n => {
|
|
335
|
-
if (hasAnyClasses(dom, n, getCreationDateClasses(editor))) {
|
|
336
|
-
n.innerHTML = getDateTime(editor, getCdateFormat(editor));
|
|
337
|
-
}
|
|
338
|
-
if (hasAnyClasses(dom, n, getModificationDateClasses(editor))) {
|
|
339
|
-
n.innerHTML = getDateTime(editor, getMdateFormat(editor));
|
|
340
|
-
}
|
|
341
|
-
if (hasAnyClasses(dom, n, getSelectedContentClasses(editor))) {
|
|
342
|
-
n.innerHTML = sel;
|
|
343
|
-
}
|
|
344
|
-
});
|
|
345
|
-
replaceVals(editor, el);
|
|
346
|
-
editor.execCommand('mceInsertContent', false, el.innerHTML);
|
|
347
|
-
editor.addVisual();
|
|
348
|
-
};
|
|
349
|
-
|
|
350
|
-
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
|
351
|
-
|
|
352
|
-
const getPreviewContent = (editor, html) => {
|
|
353
|
-
var _a;
|
|
354
|
-
if (html.indexOf('<html>') === -1) {
|
|
355
|
-
let contentCssEntries = '';
|
|
356
|
-
const contentStyle = (_a = getContentStyle(editor)) !== null && _a !== void 0 ? _a : '';
|
|
357
|
-
const cors = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
|
|
358
|
-
global$2.each(editor.contentCSS, url => {
|
|
359
|
-
contentCssEntries += '<link type="text/css" rel="stylesheet" href="' + editor.documentBaseURI.toAbsolute(url) + '"' + cors + '>';
|
|
360
|
-
});
|
|
361
|
-
if (contentStyle) {
|
|
362
|
-
contentCssEntries += '<style type="text/css">' + contentStyle + '</style>';
|
|
363
|
-
}
|
|
364
|
-
const bodyClass = getBodyClass(editor);
|
|
365
|
-
const encode = editor.dom.encode;
|
|
366
|
-
const isMetaKeyPressed = global.os.isMacOS() || global.os.isiOS() ? 'e.metaKey' : 'e.ctrlKey && !e.altKey';
|
|
367
|
-
const preventClicksOnLinksScript = '<script>' + 'document.addEventListener && document.addEventListener("click", function(e) {' + 'for (var elm = e.target; elm; elm = elm.parentNode) {' + 'if (elm.nodeName === "A" && !(' + isMetaKeyPressed + ')) {' + 'e.preventDefault();' + '}' + '}' + '}, false);' + '</script> ';
|
|
368
|
-
const directionality = editor.getBody().dir;
|
|
369
|
-
const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : '';
|
|
370
|
-
html = '<!DOCTYPE html>' + '<html>' + '<head>' + '<base href="' + encode(editor.documentBaseURI.getURI()) + '">' + contentCssEntries + preventClicksOnLinksScript + '</head>' + '<body class="' + encode(bodyClass) + '"' + dirAttr + '>' + parseAndSerialize(editor, html) + '</body>' + '</html>';
|
|
371
|
-
}
|
|
372
|
-
return replaceTemplateValues(html, getPreviewReplaceValues(editor));
|
|
373
|
-
};
|
|
374
|
-
const open = (editor, templateList) => {
|
|
375
|
-
const createTemplates = () => {
|
|
376
|
-
if (!templateList || templateList.length === 0) {
|
|
377
|
-
const message = editor.translate('No templates defined.');
|
|
378
|
-
editor.notificationManager.open({
|
|
379
|
-
text: message,
|
|
380
|
-
type: 'info'
|
|
381
|
-
});
|
|
382
|
-
return Optional.none();
|
|
383
|
-
}
|
|
384
|
-
return Optional.from(global$2.map(templateList, (template, index) => {
|
|
385
|
-
const isUrlTemplate = t => t.url !== undefined;
|
|
386
|
-
return {
|
|
387
|
-
selected: index === 0,
|
|
388
|
-
text: template.title,
|
|
389
|
-
value: {
|
|
390
|
-
url: isUrlTemplate(template) ? Optional.from(template.url) : Optional.none(),
|
|
391
|
-
content: !isUrlTemplate(template) ? Optional.from(template.content) : Optional.none(),
|
|
392
|
-
description: template.description
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
}));
|
|
396
|
-
};
|
|
397
|
-
const createSelectBoxItems = templates => map(templates, t => ({
|
|
398
|
-
text: t.text,
|
|
399
|
-
value: t.text
|
|
400
|
-
}));
|
|
401
|
-
const findTemplate = (templates, templateTitle) => find(templates, t => t.text === templateTitle);
|
|
402
|
-
const loadFailedAlert = api => {
|
|
403
|
-
editor.windowManager.alert('Could not load the specified template.', () => api.focus('template'));
|
|
404
|
-
};
|
|
405
|
-
const getTemplateContent = t => t.value.url.fold(() => Promise.resolve(t.value.content.getOr('')), url => fetch(url).then(res => res.ok ? res.text() : Promise.reject()));
|
|
406
|
-
const onChange = (templates, updateDialog) => (api, change) => {
|
|
407
|
-
if (change.name === 'template') {
|
|
408
|
-
const newTemplateTitle = api.getData().template;
|
|
409
|
-
findTemplate(templates, newTemplateTitle).each(t => {
|
|
410
|
-
api.block('Loading...');
|
|
411
|
-
getTemplateContent(t).then(previewHtml => {
|
|
412
|
-
updateDialog(api, t, previewHtml);
|
|
413
|
-
}).catch(() => {
|
|
414
|
-
updateDialog(api, t, '');
|
|
415
|
-
api.setEnabled('save', false);
|
|
416
|
-
loadFailedAlert(api);
|
|
417
|
-
});
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
const onSubmit = templates => api => {
|
|
422
|
-
const data = api.getData();
|
|
423
|
-
findTemplate(templates, data.template).each(t => {
|
|
424
|
-
getTemplateContent(t).then(previewHtml => {
|
|
425
|
-
editor.execCommand('mceInsertTemplate', false, previewHtml);
|
|
426
|
-
api.close();
|
|
427
|
-
}).catch(() => {
|
|
428
|
-
api.setEnabled('save', false);
|
|
429
|
-
loadFailedAlert(api);
|
|
430
|
-
});
|
|
431
|
-
});
|
|
432
|
-
};
|
|
433
|
-
const openDialog = templates => {
|
|
434
|
-
const selectBoxItems = createSelectBoxItems(templates);
|
|
435
|
-
const buildDialogSpec = (bodyItems, initialData) => ({
|
|
436
|
-
title: 'Insert Template',
|
|
437
|
-
size: 'large',
|
|
438
|
-
body: {
|
|
439
|
-
type: 'panel',
|
|
440
|
-
items: bodyItems
|
|
441
|
-
},
|
|
442
|
-
initialData,
|
|
443
|
-
buttons: [
|
|
444
|
-
{
|
|
445
|
-
type: 'cancel',
|
|
446
|
-
name: 'cancel',
|
|
447
|
-
text: 'Cancel'
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
type: 'submit',
|
|
451
|
-
name: 'save',
|
|
452
|
-
text: 'Save',
|
|
453
|
-
primary: true
|
|
454
|
-
}
|
|
455
|
-
],
|
|
456
|
-
onSubmit: onSubmit(templates),
|
|
457
|
-
onChange: onChange(templates, updateDialog)
|
|
458
|
-
});
|
|
459
|
-
const updateDialog = (dialogApi, template, previewHtml) => {
|
|
460
|
-
const content = getPreviewContent(editor, previewHtml);
|
|
461
|
-
const bodyItems = [
|
|
462
|
-
{
|
|
463
|
-
type: 'selectbox',
|
|
464
|
-
name: 'template',
|
|
465
|
-
label: 'Templates',
|
|
466
|
-
items: selectBoxItems
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
type: 'htmlpanel',
|
|
470
|
-
html: `<p aria-live="polite">${ htmlEscape(template.value.description) }</p>`
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
label: 'Preview',
|
|
474
|
-
type: 'iframe',
|
|
475
|
-
name: 'preview',
|
|
476
|
-
sandboxed: false,
|
|
477
|
-
transparent: false
|
|
478
|
-
}
|
|
479
|
-
];
|
|
480
|
-
const initialData = {
|
|
481
|
-
template: template.text,
|
|
482
|
-
preview: content
|
|
483
|
-
};
|
|
484
|
-
dialogApi.unblock();
|
|
485
|
-
dialogApi.redial(buildDialogSpec(bodyItems, initialData));
|
|
486
|
-
dialogApi.focus('template');
|
|
487
|
-
};
|
|
488
|
-
const dialogApi = editor.windowManager.open(buildDialogSpec([], {
|
|
489
|
-
template: '',
|
|
490
|
-
preview: ''
|
|
491
|
-
}));
|
|
492
|
-
dialogApi.block('Loading...');
|
|
493
|
-
getTemplateContent(templates[0]).then(previewHtml => {
|
|
494
|
-
updateDialog(dialogApi, templates[0], previewHtml);
|
|
495
|
-
}).catch(() => {
|
|
496
|
-
updateDialog(dialogApi, templates[0], '');
|
|
497
|
-
dialogApi.setEnabled('save', false);
|
|
498
|
-
loadFailedAlert(dialogApi);
|
|
499
|
-
});
|
|
500
|
-
};
|
|
501
|
-
const optTemplates = createTemplates();
|
|
502
|
-
optTemplates.each(openDialog);
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
const showDialog = editor => templates => {
|
|
506
|
-
open(editor, templates);
|
|
507
|
-
};
|
|
508
|
-
const register$1 = editor => {
|
|
509
|
-
editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor));
|
|
510
|
-
editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor)));
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
const setup = editor => {
|
|
514
|
-
editor.on('PreProcess', o => {
|
|
515
|
-
const dom = editor.dom, dateFormat = getMdateFormat(editor);
|
|
516
|
-
global$2.each(dom.select('div', o.node), e => {
|
|
517
|
-
if (dom.hasClass(e, 'mceTmpl')) {
|
|
518
|
-
global$2.each(dom.select('*', e), e => {
|
|
519
|
-
if (hasAnyClasses(dom, e, getModificationDateClasses(editor))) {
|
|
520
|
-
e.innerHTML = getDateTime(editor, dateFormat);
|
|
521
|
-
}
|
|
522
|
-
});
|
|
523
|
-
replaceVals(editor, e);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
};
|
|
528
|
-
|
|
529
|
-
const register = editor => {
|
|
530
|
-
const onAction = () => editor.execCommand('mceTemplate');
|
|
531
|
-
editor.ui.registry.addButton('template', {
|
|
532
|
-
icon: 'template',
|
|
533
|
-
tooltip: 'Insert template',
|
|
534
|
-
onAction
|
|
535
|
-
});
|
|
536
|
-
editor.ui.registry.addMenuItem('template', {
|
|
537
|
-
icon: 'template',
|
|
538
|
-
text: 'Insert template...',
|
|
539
|
-
onAction
|
|
540
|
-
});
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
var Plugin = () => {
|
|
544
|
-
global$3.add('template', editor => {
|
|
545
|
-
register$2(editor);
|
|
546
|
-
register(editor);
|
|
547
|
-
register$1(editor);
|
|
548
|
-
setup(editor);
|
|
549
|
-
});
|
|
550
|
-
};
|
|
551
|
-
|
|
552
|
-
Plugin();
|
|
553
|
-
|
|
554
|
-
})();
|