@dangl/angular-material-shared 2.5.1-beta0012 → 2.6.0-beta0019

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.
Files changed (241) hide show
  1. package/README.md +1 -7
  2. package/esm2022/lib/angular-material-shared.module.mjs +2 -2
  3. package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +16 -19
  4. package/fesm2022/dangl-angular-material-shared.mjs +16 -19
  5. package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
  6. package/lib/components/tiny-mce/tiny-mce.component.d.ts +7 -8
  7. package/package.json +1 -1
  8. package/tinymce-assets/icons/default/icons.js +187 -171
  9. package/tinymce-assets/icons/default/icons.min.js +1 -1
  10. package/tinymce-assets/langs/it.js +1 -1
  11. package/tinymce-assets/plugins/accordion/index.js +7 -0
  12. package/tinymce-assets/plugins/accordion/plugin.js +1054 -0
  13. package/tinymce-assets/plugins/accordion/plugin.min.js +4 -0
  14. package/tinymce-assets/plugins/advlist/plugin.js +185 -187
  15. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -7
  16. package/tinymce-assets/plugins/anchor/plugin.js +79 -81
  17. package/tinymce-assets/plugins/anchor/plugin.min.js +2 -7
  18. package/tinymce-assets/plugins/autolink/plugin.js +209 -194
  19. package/tinymce-assets/plugins/autolink/plugin.min.js +2 -7
  20. package/tinymce-assets/plugins/autoresize/plugin.js +110 -102
  21. package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -7
  22. package/tinymce-assets/plugins/autosave/plugin.js +125 -104
  23. package/tinymce-assets/plugins/autosave/plugin.min.js +2 -7
  24. package/tinymce-assets/plugins/charmap/plugin.js +275 -313
  25. package/tinymce-assets/plugins/charmap/plugin.min.js +2 -7
  26. package/tinymce-assets/plugins/code/plugin.js +18 -24
  27. package/tinymce-assets/plugins/code/plugin.min.js +2 -7
  28. package/tinymce-assets/plugins/codesample/plugin.js +2075 -2074
  29. package/tinymce-assets/plugins/codesample/plugin.min.js +2 -7
  30. package/tinymce-assets/plugins/directionality/plugin.js +247 -305
  31. package/tinymce-assets/plugins/directionality/plugin.min.js +2 -7
  32. package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1 -9424
  33. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
  34. package/tinymce-assets/plugins/emoticons/js/emojis.js +1 -9423
  35. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
  36. package/tinymce-assets/plugins/emoticons/plugin.js +334 -374
  37. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -7
  38. package/tinymce-assets/plugins/fullscreen/plugin.js +740 -837
  39. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -7
  40. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +90 -0
  41. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  42. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +90 -0
  43. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +90 -0
  44. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +90 -0
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +90 -0
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +90 -0
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +90 -0
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +90 -0
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +90 -0
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +90 -0
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +90 -0
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +90 -0
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +90 -0
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +90 -0
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +90 -0
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +90 -0
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +90 -0
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +90 -0
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +90 -0
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +90 -0
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +90 -0
  69. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +90 -0
  70. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +90 -0
  71. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  72. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  73. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  74. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +90 -0
  75. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +90 -0
  76. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +90 -0
  77. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  78. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  79. package/tinymce-assets/plugins/help/plugin.js +411 -355
  80. package/tinymce-assets/plugins/help/plugin.min.js +2 -7
  81. package/tinymce-assets/plugins/image/plugin.js +876 -1037
  82. package/tinymce-assets/plugins/image/plugin.min.js +2 -7
  83. package/tinymce-assets/plugins/importcss/plugin.js +146 -144
  84. package/tinymce-assets/plugins/importcss/plugin.min.js +2 -7
  85. package/tinymce-assets/plugins/insertdatetime/plugin.js +93 -88
  86. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -7
  87. package/tinymce-assets/plugins/link/plugin.js +718 -768
  88. package/tinymce-assets/plugins/link/plugin.min.js +2 -7
  89. package/tinymce-assets/plugins/lists/plugin.js +1235 -1375
  90. package/tinymce-assets/plugins/lists/plugin.min.js +2 -7
  91. package/tinymce-assets/plugins/media/plugin.js +614 -756
  92. package/tinymce-assets/plugins/media/plugin.min.js +2 -7
  93. package/tinymce-assets/plugins/nonbreaking/plugin.js +71 -48
  94. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -7
  95. package/tinymce-assets/plugins/pagebreak/plugin.js +53 -40
  96. package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -7
  97. package/tinymce-assets/plugins/preview/plugin.js +36 -65
  98. package/tinymce-assets/plugins/preview/plugin.min.js +2 -7
  99. package/tinymce-assets/plugins/quickbars/plugin.js +304 -331
  100. package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -7
  101. package/tinymce-assets/plugins/save/plugin.js +49 -50
  102. package/tinymce-assets/plugins/save/plugin.min.js +2 -7
  103. package/tinymce-assets/plugins/searchreplace/plugin.js +499 -571
  104. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -7
  105. package/tinymce-assets/plugins/table/plugin.js +2572 -10617
  106. package/tinymce-assets/plugins/table/plugin.min.js +2 -7
  107. package/tinymce-assets/plugins/visualblocks/plugin.js +41 -46
  108. package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -7
  109. package/tinymce-assets/plugins/visualchars/plugin.js +346 -312
  110. package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -7
  111. package/tinymce-assets/plugins/wordcount/plugin.js +159 -179
  112. package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -7
  113. package/tinymce-assets/skins/content/dark/content.css +2 -8
  114. package/tinymce-assets/skins/content/dark/content.js +2 -0
  115. package/tinymce-assets/skins/content/dark/content.min.css +1 -7
  116. package/tinymce-assets/skins/content/default/content.css +0 -6
  117. package/tinymce-assets/skins/content/default/content.js +2 -0
  118. package/tinymce-assets/skins/content/default/content.min.css +0 -6
  119. package/tinymce-assets/skins/content/document/content.css +0 -6
  120. package/tinymce-assets/skins/content/document/content.js +2 -0
  121. package/tinymce-assets/skins/content/document/content.min.css +0 -6
  122. package/tinymce-assets/skins/content/tinymce-5/content.css +61 -0
  123. package/tinymce-assets/skins/content/tinymce-5/content.js +2 -0
  124. package/tinymce-assets/skins/content/tinymce-5/content.min.css +1 -0
  125. package/tinymce-assets/skins/content/tinymce-5-dark/content.css +66 -0
  126. package/tinymce-assets/skins/content/tinymce-5-dark/content.js +2 -0
  127. package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +1 -0
  128. package/tinymce-assets/skins/content/writer/content.css +0 -6
  129. package/tinymce-assets/skins/content/writer/content.js +2 -0
  130. package/tinymce-assets/skins/content/writer/content.min.css +0 -6
  131. package/tinymce-assets/skins/ui/oxide/content.css +73 -20
  132. package/tinymce-assets/skins/ui/oxide/content.inline.css +73 -20
  133. package/tinymce-assets/skins/ui/oxide/content.inline.js +2 -0
  134. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -7
  135. package/tinymce-assets/skins/ui/oxide/content.js +2 -0
  136. package/tinymce-assets/skins/ui/oxide/content.min.css +1 -7
  137. package/tinymce-assets/skins/ui/oxide/skin.css +1480 -435
  138. package/tinymce-assets/skins/ui/oxide/skin.js +2 -0
  139. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -7
  140. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +1 -8
  141. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -0
  142. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -7
  143. package/tinymce-assets/skins/ui/oxide-dark/content.css +71 -19
  144. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +73 -20
  145. package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +2 -0
  146. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -7
  147. package/tinymce-assets/skins/ui/oxide-dark/content.js +2 -0
  148. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -7
  149. package/tinymce-assets/skins/ui/oxide-dark/skin.css +1498 -450
  150. package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -0
  151. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -7
  152. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +1 -8
  153. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  154. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
  155. package/tinymce-assets/skins/ui/tinymce-5/content.css +785 -0
  156. package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +779 -0
  157. package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +2 -0
  158. package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +1 -0
  159. package/tinymce-assets/skins/ui/tinymce-5/content.js +2 -0
  160. package/tinymce-assets/skins/ui/tinymce-5/content.min.css +1 -0
  161. package/tinymce-assets/skins/ui/tinymce-5/skin.css +4185 -0
  162. package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -0
  163. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -0
  164. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
  165. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  166. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  167. package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +766 -0
  168. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +779 -0
  169. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  170. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  171. package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +2 -0
  172. package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +1 -0
  173. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +4185 -0
  174. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -0
  175. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  176. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
  177. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  178. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  179. package/tinymce-assets/themes/silver/theme.js +25226 -28188
  180. package/tinymce-assets/themes/silver/theme.min.js +2 -7
  181. package/tinymce-assets/plugins/bbcode/index.js +0 -7
  182. package/tinymce-assets/plugins/bbcode/plugin.js +0 -99
  183. package/tinymce-assets/plugins/bbcode/plugin.min.js +0 -9
  184. package/tinymce-assets/plugins/colorpicker/index.js +0 -7
  185. package/tinymce-assets/plugins/colorpicker/plugin.js +0 -21
  186. package/tinymce-assets/plugins/colorpicker/plugin.min.js +0 -9
  187. package/tinymce-assets/plugins/contextmenu/index.js +0 -7
  188. package/tinymce-assets/plugins/contextmenu/plugin.js +0 -21
  189. package/tinymce-assets/plugins/contextmenu/plugin.min.js +0 -9
  190. package/tinymce-assets/plugins/fullpage/index.js +0 -7
  191. package/tinymce-assets/plugins/fullpage/plugin.js +0 -544
  192. package/tinymce-assets/plugins/fullpage/plugin.min.js +0 -9
  193. package/tinymce-assets/plugins/hr/index.js +0 -7
  194. package/tinymce-assets/plugins/hr/plugin.js +0 -45
  195. package/tinymce-assets/plugins/hr/plugin.min.js +0 -9
  196. package/tinymce-assets/plugins/imagetools/index.js +0 -7
  197. package/tinymce-assets/plugins/imagetools/plugin.js +0 -1531
  198. package/tinymce-assets/plugins/imagetools/plugin.min.js +0 -9
  199. package/tinymce-assets/plugins/legacyoutput/index.js +0 -7
  200. package/tinymce-assets/plugins/legacyoutput/plugin.js +0 -199
  201. package/tinymce-assets/plugins/legacyoutput/plugin.min.js +0 -9
  202. package/tinymce-assets/plugins/noneditable/index.js +0 -7
  203. package/tinymce-assets/plugins/noneditable/plugin.js +0 -117
  204. package/tinymce-assets/plugins/noneditable/plugin.min.js +0 -9
  205. package/tinymce-assets/plugins/paste/index.js +0 -7
  206. package/tinymce-assets/plugins/paste/plugin.js +0 -1803
  207. package/tinymce-assets/plugins/paste/plugin.min.js +0 -9
  208. package/tinymce-assets/plugins/print/index.js +0 -7
  209. package/tinymce-assets/plugins/print/plugin.js +0 -52
  210. package/tinymce-assets/plugins/print/plugin.min.js +0 -9
  211. package/tinymce-assets/plugins/spellchecker/index.js +0 -7
  212. package/tinymce-assets/plugins/spellchecker/plugin.js +0 -730
  213. package/tinymce-assets/plugins/spellchecker/plugin.min.js +0 -9
  214. package/tinymce-assets/plugins/tabfocus/index.js +0 -7
  215. package/tinymce-assets/plugins/tabfocus/plugin.js +0 -130
  216. package/tinymce-assets/plugins/tabfocus/plugin.min.js +0 -9
  217. package/tinymce-assets/plugins/template/index.js +0 -7
  218. package/tinymce-assets/plugins/template/plugin.js +0 -591
  219. package/tinymce-assets/plugins/template/plugin.min.js +0 -9
  220. package/tinymce-assets/plugins/textcolor/index.js +0 -7
  221. package/tinymce-assets/plugins/textcolor/plugin.js +0 -21
  222. package/tinymce-assets/plugins/textcolor/plugin.min.js +0 -9
  223. package/tinymce-assets/plugins/textpattern/index.js +0 -7
  224. package/tinymce-assets/plugins/textpattern/plugin.js +0 -1374
  225. package/tinymce-assets/plugins/textpattern/plugin.min.js +0 -9
  226. package/tinymce-assets/plugins/toc/index.js +0 -7
  227. package/tinymce-assets/plugins/toc/plugin.js +0 -238
  228. package/tinymce-assets/plugins/toc/plugin.min.js +0 -9
  229. package/tinymce-assets/skins/ui/oxide/content.mobile.css +0 -29
  230. package/tinymce-assets/skins/ui/oxide/content.mobile.min.css +0 -7
  231. package/tinymce-assets/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  232. package/tinymce-assets/skins/ui/oxide/skin.mobile.css +0 -673
  233. package/tinymce-assets/skins/ui/oxide/skin.mobile.min.css +0 -7
  234. package/tinymce-assets/skins/ui/oxide-dark/content.mobile.css +0 -29
  235. package/tinymce-assets/skins/ui/oxide-dark/content.mobile.min.css +0 -7
  236. package/tinymce-assets/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  237. package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.css +0 -673
  238. package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
  239. package/tinymce-assets/themes/mobile/index.js +0 -7
  240. package/tinymce-assets/themes/mobile/theme.js +0 -13130
  241. package/tinymce-assets/themes/mobile/theme.min.js +0 -9
@@ -0,0 +1,4 @@
1
+ /**
2
+ * TinyMCE version 7.0.1 (2024-04-10)
3
+ */
4
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const o=e=>t=>typeof t===e,n=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var o,n,r,s})(e),r=o("boolean"),s=e=>null==e,a=e=>!s(e),i=o("function"),d=o("number"),l=e=>()=>e,c=(e,t)=>e===t,m=l(!1);class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:u.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?u.some(e):u.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const g=Array.prototype.indexOf,p=(e,t)=>{return o=e,n=t,g.call(o,n)>-1;var o,n},h=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},f=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},y=Object.keys;"undefined"!=typeof window?window:Function("return this;")();const v=e=>e.dom.nodeName.toLowerCase(),w=e=>e.dom.nodeType,b=e=>t=>w(t)===e,N=b(1),T=b(3),A=b(9),C=b(11),S=(e,t,o)=>{if(!(n(o)||r(o)||d(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},x=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},E=(e,t)=>u.from(x(e,t)),D=(e,t)=>{e.dom.removeAttribute(t)},M=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},P={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return M(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return M(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return M(o)},fromDom:M,fromPoint:(e,t,o)=>u.from(e.dom.elementFromPoint(t,o)).map(M)},O=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},k=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,B=O,R=(L=/^\s+|\s+$/g,e=>e.replace(L,""));var L;const $=e=>void 0!==e.style&&i(e.style.getPropertyValue),I=e=>A(e)?e:P.fromDom(e.dom.ownerDocument),V=e=>u.from(e.dom.parentNode).map(P.fromDom),j=e=>u.from(e.dom.nextSibling).map(P.fromDom),q=e=>h(e.dom.childNodes,P.fromDom),F=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?e=>P.fromDom(e.dom.getRootNode()):I,H=e=>P.fromDom(e.dom.host),z=e=>{const t=T(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=F(e);return C(o=t)&&a(o.dom.host)?u.some(t):u.none();var o})(P.fromDom(t)).fold((()=>o.body.contains(t)),(n=z,r=H,e=>n(r(e))));var n,r},K=(e,t)=>$(e)?e.style.getPropertyValue(t):"",U=(e,t)=>{V(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Y=(e,t)=>{j(e).fold((()=>{V(e).each((e=>{_(e,t)}))}),(e=>{U(e,t)}))},_=(e,t)=>{e.dom.appendChild(t.dom)},G=(e,t)=>{f(t,((o,n)=>{const r=0===n?e:t[n-1];Y(r,o)}))},J=(e,t)=>{let o=[];return f(q(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(J(e,t))})),o},Q=(e,t,o)=>{let n=e.dom;const r=i(o)?o:m;for(;n.parentNode;){n=n.parentNode;const e=P.fromDom(n);if(t(e))return u.some(e);if(r(e))break}return u.none()},W=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},X=(e,t,o)=>Q(e,(e=>O(e,t)),o),Z=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return k(o)?u.none():u.from(o.querySelector(e)).map(P.fromDom)})(t,e),ee=((e,t)=>{const o=t=>e(t)?u.from(t.dom.nodeValue):u.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(T);var te=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];const oe=(e,t)=>({element:e,offset:t}),ne=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>ne(e,t,o).orThunk((()=>u.some(t))))):u.none(),re=(e,t)=>e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length,se=(e,t)=>{const o=ne(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return oe(o,re(e,o));const n=e.property().children(o);return n.length>0?se(e,n[n.length-1]):oe(o,re(e,o))},ae=se,ie={up:l({selector:X,closest:(e,t,o)=>((e,t,o,n,r)=>((e,t)=>O(e,t))(o,n)?u.some(o):i(r)&&r(o)?u.none():t(o,n,r))(0,X,e,t,o),predicate:Q,all:(e,t)=>{const o=i(t)?t:m;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=P.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r}}),down:l({selector:(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return k(o)?[]:h(o.querySelectorAll(e),P.fromDom)})(t,e),predicate:J}),styles:l({get:(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||z(e)?n:K(o,t)},getRaw:(e,t)=>{const o=e.dom,n=K(o,t);return u.from(n).filter((e=>e.length>0))},set:(e,t,o)=>{((e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);$(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},remove:(e,t)=>{((e,t)=>{$(e)&&e.style.removeProperty(t)})(e.dom,t),((e,t,o=c)=>e.exists((e=>o(e,t))))(E(e,"style").map(R),"")&&D(e,"style")}}),attrs:l({get:x,set:(e,t,o)=>{S(e.dom,t,o)},remove:D,copyTo:(e,t)=>{const o=(n=e.dom.attributes,r=(e,t)=>(e[t.name]=t.value,e),s={},f(n,((e,t)=>{s=r(s,e)})),s);var n,r,s;((e,t)=>{const o=e.dom;((e,t)=>{const o=y(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(t,((e,t)=>{S(o,t,e)}))})(t,o)}}),insert:l({before:U,after:Y,afterAll:G,append:_,appendAll:(e,t)=>{f(t,(t=>{_(e,t)}))},prepend:(e,t)=>{(e=>((e,t)=>{const o=e.dom.childNodes;return u.from(o[0]).map(P.fromDom)})(e))(e).fold((()=>{_(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},wrap:(e,t)=>{U(e,t),_(t,e)}}),remove:l({unwrap:e=>{const t=q(e);t.length>0&&G(e,t),W(e)},remove:W}),create:l({nu:P.fromTag,clone:e=>P.fromDom(e.dom.cloneNode(!1)),text:P.fromText}),query:l({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:e=>u.from(e.dom.previousSibling).map(P.fromDom),nextSibling:j}),property:l({children:q,name:v,parent:V,document:e=>I(e).dom,isText:T,isComment:e=>8===w(e)||"#comment"===v(e),isElement:N,isSpecial:e=>{const t=v(e);return p(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>N(e)?E(e,"lang"):u.none(),getText:e=>ee.get(e),setText:(e,t)=>ee.set(e,t),isBoundary:e=>!!N(e)&&("body"===v(e)||p(te,v(e))),isEmptyTag:e=>!!N(e)&&p(["br","img","hr","input"],v(e)),isNonEditable:e=>N(e)&&"false"===x(e,"contenteditable")}),eq:(e,t)=>e.dom===t.dom,is:B},de="details",le="mce-accordion",ce="mce-accordion-summary",me="mce-accordion-body",ue="div";var ge=tinymce.util.Tools.resolve("tinymce.util.Tools");const pe=e=>"SUMMARY"===(null==e?void 0:e.nodeName),he=e=>"DETAILS"===(null==e?void 0:e.nodeName),fe=e=>e.hasAttribute("open"),ye=e=>{const t=e.selection.getNode();return pe(t)||Boolean(e.dom.getParent(t,pe))},ve=e=>!ye(e)&&e.dom.isEditable(e.selection.getNode()),we=e=>u.from(e.dom.getParent(e.selection.getNode(),he)),be=e=>(e.innerHTML='<br data-mce-bogus="1" />',e),Ne=e=>be(e.dom.create("p")),Te=e=>t=>{((e,t)=>{if(pe(null==t?void 0:t.lastChild)){const o=Ne(e);t.appendChild(o),e.selection.setCursorLocation(o,0)}})(e,t),((e,t)=>{if(!pe(null==t?void 0:t.firstChild)){const o=(e=>be(e.dom.create("summary")))(e);t.prepend(o),e.selection.setCursorLocation(o,0)}})(e,t)},Ae=(e,t)=>{const o=null!=t?t:!fe(e);return o?e.setAttribute("open","open"):e.removeAttribute("open"),o},Ce=e=>{e.addCommand("InsertAccordion",(()=>(e=>{if(!ve(e))return;const o=P.fromDom(e.getBody()),n=(e=>{const o=(new Date).getTime(),n=Math.floor(1e9*Math.random());return t++,"acc_"+n+t+String(o)})(),r=e.dom.encode(e.selection.getRng().toString()||e.translate("Accordion summary...")),s=e.dom.encode(e.translate("Accordion body...")),a=`<summary class="${ce}">${r}</summary>`,i=`<${ue} class="${me}"><p>${s}</p></${ue}>`;e.undoManager.transact((()=>{e.insertContent([`<details data-mce-id="${n}" class="${le}" open="open">`,a,i,"</details>"].join("")),Z(o,`[data-mce-id="${n}"]`).each((t=>{D(t,"data-mce-id"),Z(t,"summary").each((t=>{const o=e.dom.createRng(),n=ae(ie,t);o.setStart(n.element.dom,n.offset),o.setEnd(n.element.dom,n.offset),e.selection.setRng(o)}))}))}))})(e))),e.addCommand("ToggleAccordion",((t,o)=>((e,t)=>{we(e).each((o=>{((e,t,o)=>{e.dispatch("ToggledAccordion",{element:t,state:o})})(e,o,Ae(o,t))}))})(e,o))),e.addCommand("ToggleAllAccordions",((t,o)=>((e,t)=>{const o=Array.from(e.getBody().querySelectorAll("details"));0!==o.length&&(f(o,(e=>Ae(e,null!=t?t:!fe(e)))),((e,t,o)=>{e.dispatch("ToggledAllAccordions",{elements:t,state:o})})(e,o,t))})(e,o))),e.addCommand("RemoveAccordion",(()=>(e=>{we(e).each((t=>{const{nextSibling:o}=t;o?(e.selection.select(o,!0),e.selection.collapse(!0)):((e,t)=>{const o=Ne(e);t.insertAdjacentElement("afterend",o),e.selection.setCursorLocation(o,0)})(e,t),t.remove()}))})(e)))};var Se=tinymce.util.Tools.resolve("tinymce.html.Node");const xe=e=>{var t,o;return null!==(o=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==o?o:[]},Ee=(e,t)=>{const o=new Set([...xe(e),...t]),n=Array.from(o);n.length>0&&e.attr("class",n.join(" "))},De=(e,t)=>{const o=((e,o)=>{const n=[];for(let o=0,s=e.length;o<s;o++){const s=e[o];r=s,!t.has(r)&&n.push(s)}var r;return n})(xe(e));e.attr("class",o.length>0?o.join(" "):null)},Me=e=>e.name===de&&p(xe(e),le),Pe=e=>{const t=e.children();let o,n;const r=[];for(let e=0;e<t.length;e++){const i=t[e];"summary"===i.name&&s(o)?o=i:(a=i).name===ue&&p(xe(a),me)&&s(n)?n=i:r.push(i)}var a;return{summaryNode:o,wrapperNode:n,otherNodes:r}},Oe=e=>{const t=new Se("br",1);t.attr("data-mce-bogus","1"),e.empty(),e.append(t)};var ke=tinymce.util.Tools.resolve("tinymce.util.VK");const Be=e=>{(e=>{e.on("keydown",(t=>{(!t.shiftKey&&t.keyCode===ke.ENTER&&ye(e)||(e=>{const t=e.selection.getRng();return he(t.startContainer)&&t.collapsed&&0===t.startOffset})(e))&&(t.preventDefault(),e.execCommand("ToggleAccordion"))}))})(e),e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!(e=>we(e).isSome())(e)||(e=>{ge.each(ge.grep(e.dom.select("details",e.getBody())),Te(e))})(e)}))};var Re=tinymce.util.Tools.resolve("tinymce.Env");const Le=e=>t=>{const o=()=>t.setEnabled(ve(e));return e.on("NodeChange",o),()=>e.off("NodeChange",o)};e.add("accordion",(e=>{(e=>{const t=()=>e.execCommand("InsertAccordion");e.ui.registry.addButton("accordion",{icon:"accordion",tooltip:"Insert accordion",onSetup:Le(e),onAction:t}),e.ui.registry.addMenuItem("accordion",{icon:"accordion",text:"Accordion",onSetup:Le(e),onAction:t}),e.ui.registry.addToggleButton("accordiontoggle",{icon:"accordion-toggle",tooltip:"Toggle accordion",onAction:()=>e.execCommand("ToggleAccordion")}),e.ui.registry.addToggleButton("accordionremove",{icon:"remove",tooltip:"Delete accordion",onAction:()=>e.execCommand("RemoveAccordion")}),e.ui.registry.addContextToolbar("accordion",{predicate:t=>e.dom.is(t,"details")&&e.getBody().contains(t)&&e.dom.isEditable(t.parentNode),items:"accordiontoggle accordionremove",scope:"node",position:"node"})})(e),Ce(e),Be(e),(e=>{e.on("PreInit",(()=>{const{serializer:t,parser:o}=e;o.addNodeFilter(de,(e=>{for(let t=0;t<e.length;t++){const o=e[t];if(Me(o)){const e=o,{summaryNode:t,wrapperNode:n,otherNodes:r}=Pe(e),i=a(t),d=i?t:new Se("summary",1);s(d.firstChild)&&Oe(d),Ee(d,[ce]),i||(a(e.firstChild)?e.insert(d,e.firstChild,!0):e.append(d));const l=a(n),c=l?n:new Se(ue,1);if(c.attr("data-mce-bogus","1"),Ee(c,[me]),r.length>0)for(let e=0;e<r.length;e++){const t=r[e];c.append(t)}if(s(c.firstChild)){const e=new Se("p",1);Oe(e),c.append(e)}l||e.append(c)}}})),t.addNodeFilter(de,(e=>{const t=new Set([ce]);for(let o=0;o<e.length;o++){const n=e[o];if(Me(n)){const e=n,{summaryNode:o,wrapperNode:r}=Pe(e);a(o)&&De(o,t),a(r)&&r.unwrap()}}}))}))})(e),(e=>{Re.browser.isSafari()&&e.on("click",(t=>{if(pe(t.target)){const o=t.target,n=e.selection.getRng();n.collapsed&&n.startContainer===o.parentNode&&0===n.startOffset&&e.selection.setCursorLocation(o,0)}}))})(e)}))}();
@@ -1,203 +1,206 @@
1
1
  /**
2
- * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
- * Licensed under the LGPL or a commercial license.
4
- * For LGPL see License.txt in the project root for license information.
5
- * For commercial licenses see https://www.tiny.cloud/
6
- *
7
- * Version: 5.10.9 (2023-11-15)
2
+ * TinyMCE version 7.0.1 (2024-04-10)
8
3
  */
4
+
9
5
  (function () {
10
6
  'use strict';
11
7
 
12
8
  var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
9
 
14
- var applyListFormat = function (editor, listName, styleValue) {
15
- var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
10
+ const applyListFormat = (editor, listName, styleValue) => {
11
+ const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
16
12
  editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
17
13
  };
18
14
 
19
- var register$1 = function (editor) {
20
- editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
15
+ const register$2 = editor => {
16
+ editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {
21
17
  applyListFormat(editor, 'UL', value['list-style-type']);
22
18
  });
23
- editor.addCommand('ApplyOrderedListStyle', function (ui, value) {
19
+ editor.addCommand('ApplyOrderedListStyle', (ui, value) => {
24
20
  applyListFormat(editor, 'OL', value['list-style-type']);
25
21
  });
26
22
  };
27
23
 
28
- var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
29
-
30
- var getNumberStyles = function (editor) {
31
- var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman');
32
- return styles ? styles.split(/[ ,]/) : [];
33
- };
34
- var getBulletStyles = function (editor) {
35
- var styles = editor.getParam('advlist_bullet_styles', 'default,circle,square');
36
- return styles ? styles.split(/[ ,]/) : [];
24
+ const option = name => editor => editor.options.get(name);
25
+ const register$1 = editor => {
26
+ const registerOption = editor.options.register;
27
+ registerOption('advlist_number_styles', {
28
+ processor: 'string[]',
29
+ default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')
30
+ });
31
+ registerOption('advlist_bullet_styles', {
32
+ processor: 'string[]',
33
+ default: 'default,circle,square'.split(',')
34
+ });
37
35
  };
36
+ const getNumberStyles = option('advlist_number_styles');
37
+ const getBulletStyles = option('advlist_bullet_styles');
38
38
 
39
- var noop = function () {
40
- };
41
- var constant = function (value) {
42
- return function () {
43
- return value;
44
- };
45
- };
46
- var identity = function (x) {
47
- return x;
48
- };
49
- var never = constant(false);
50
- var always = constant(true);
39
+ const isNullable = a => a === null || a === undefined;
40
+ const isNonNullable = a => !isNullable(a);
51
41
 
52
- var none = function () {
53
- return NONE;
54
- };
55
- var NONE = function () {
56
- var call = function (thunk) {
57
- return thunk();
58
- };
59
- var id = identity;
60
- var me = {
61
- fold: function (n, _s) {
62
- return n();
63
- },
64
- isSome: never,
65
- isNone: always,
66
- getOr: id,
67
- getOrThunk: call,
68
- getOrDie: function (msg) {
69
- throw new Error(msg || 'error: getOrDie called on none.');
70
- },
71
- getOrNull: constant(null),
72
- getOrUndefined: constant(undefined),
73
- or: id,
74
- orThunk: call,
75
- map: none,
76
- each: noop,
77
- bind: none,
78
- exists: never,
79
- forall: always,
80
- filter: function () {
81
- return none();
82
- },
83
- toArray: function () {
84
- return [];
85
- },
86
- toString: constant('none()')
87
- };
88
- return me;
89
- }();
90
- var some = function (a) {
91
- var constant_a = constant(a);
92
- var self = function () {
93
- return me;
94
- };
95
- var bind = function (f) {
96
- return f(a);
97
- };
98
- var me = {
99
- fold: function (n, s) {
100
- return s(a);
101
- },
102
- isSome: always,
103
- isNone: never,
104
- getOr: constant_a,
105
- getOrThunk: constant_a,
106
- getOrDie: constant_a,
107
- getOrNull: constant_a,
108
- getOrUndefined: constant_a,
109
- or: self,
110
- orThunk: self,
111
- map: function (f) {
112
- return some(f(a));
113
- },
114
- each: function (f) {
115
- f(a);
116
- },
117
- bind: bind,
118
- exists: bind,
119
- forall: bind,
120
- filter: function (f) {
121
- return f(a) ? me : NONE;
122
- },
123
- toArray: function () {
124
- return [a];
125
- },
126
- toString: function () {
127
- return 'some(' + a + ')';
42
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
43
+
44
+ class Optional {
45
+ constructor(tag, value) {
46
+ this.tag = tag;
47
+ this.value = value;
48
+ }
49
+ static some(value) {
50
+ return new Optional(true, value);
51
+ }
52
+ static none() {
53
+ return Optional.singletonNone;
54
+ }
55
+ fold(onNone, onSome) {
56
+ if (this.tag) {
57
+ return onSome(this.value);
58
+ } else {
59
+ return onNone();
128
60
  }
129
- };
130
- return me;
131
- };
132
- var from = function (value) {
133
- return value === null || value === undefined ? NONE : some(value);
134
- };
135
- var Optional = {
136
- some: some,
137
- none: none,
138
- from: from
61
+ }
62
+ isSome() {
63
+ return this.tag;
64
+ }
65
+ isNone() {
66
+ return !this.tag;
67
+ }
68
+ map(mapper) {
69
+ if (this.tag) {
70
+ return Optional.some(mapper(this.value));
71
+ } else {
72
+ return Optional.none();
73
+ }
74
+ }
75
+ bind(binder) {
76
+ if (this.tag) {
77
+ return binder(this.value);
78
+ } else {
79
+ return Optional.none();
80
+ }
81
+ }
82
+ exists(predicate) {
83
+ return this.tag && predicate(this.value);
84
+ }
85
+ forall(predicate) {
86
+ return !this.tag || predicate(this.value);
87
+ }
88
+ filter(predicate) {
89
+ if (!this.tag || predicate(this.value)) {
90
+ return this;
91
+ } else {
92
+ return Optional.none();
93
+ }
94
+ }
95
+ getOr(replacement) {
96
+ return this.tag ? this.value : replacement;
97
+ }
98
+ or(replacement) {
99
+ return this.tag ? this : replacement;
100
+ }
101
+ getOrThunk(thunk) {
102
+ return this.tag ? this.value : thunk();
103
+ }
104
+ orThunk(thunk) {
105
+ return this.tag ? this : thunk();
106
+ }
107
+ getOrDie(message) {
108
+ if (!this.tag) {
109
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
110
+ } else {
111
+ return this.value;
112
+ }
113
+ }
114
+ static from(value) {
115
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
116
+ }
117
+ getOrNull() {
118
+ return this.tag ? this.value : null;
119
+ }
120
+ getOrUndefined() {
121
+ return this.value;
122
+ }
123
+ each(worker) {
124
+ if (this.tag) {
125
+ worker(this.value);
126
+ }
127
+ }
128
+ toArray() {
129
+ return this.tag ? [this.value] : [];
130
+ }
131
+ toString() {
132
+ return this.tag ? `some(${ this.value })` : 'none()';
133
+ }
134
+ }
135
+ Optional.singletonNone = new Optional(false);
136
+
137
+ const findUntil = (xs, pred, until) => {
138
+ for (let i = 0, len = xs.length; i < len; i++) {
139
+ const x = xs[i];
140
+ if (pred(x, i)) {
141
+ return Optional.some(x);
142
+ } else if (until(x, i)) {
143
+ break;
144
+ }
145
+ }
146
+ return Optional.none();
139
147
  };
140
148
 
141
- var isChildOfBody = function (editor, elm) {
142
- return editor.$.contains(editor.getBody(), elm);
149
+ const isCustomList = list => /\btox\-/.test(list.className);
150
+ const isChildOfBody = (editor, elm) => {
151
+ return editor.dom.isChildOf(elm, editor.getBody());
143
152
  };
144
- var isTableCellNode = function (node) {
145
- return node && /^(TH|TD)$/.test(node.nodeName);
153
+ const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);
154
+ const isListNode = matchNodeNames(/^(OL|UL|DL)$/);
155
+ const isTableCellNode = matchNodeNames(/^(TH|TD)$/);
156
+ const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));
157
+ const getSelectedStyleType = editor => {
158
+ const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
159
+ const style = editor.dom.getStyle(listElm, 'listStyleType');
160
+ return Optional.from(style);
146
161
  };
147
- var isListNode = function (editor) {
148
- return function (node) {
149
- return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
150
- };
162
+ const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);
163
+ const isWithinNonEditableList = (editor, element) => {
164
+ const parentList = editor.dom.getParent(element, 'ol,ul,dl');
165
+ return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();
151
166
  };
152
- var getSelectedStyleType = function (editor) {
153
- var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
154
- var style = editor.dom.getStyle(listElm, 'listStyleType');
155
- return Optional.from(style);
167
+ const setNodeChangeHandler = (editor, nodeChangeHandler) => {
168
+ const initialNode = editor.selection.getNode();
169
+ nodeChangeHandler({
170
+ parents: editor.dom.getParents(initialNode),
171
+ element: initialNode
172
+ });
173
+ editor.on('NodeChange', nodeChangeHandler);
174
+ return () => editor.off('NodeChange', nodeChangeHandler);
156
175
  };
157
176
 
158
- var findIndex = function (list, predicate) {
159
- for (var index = 0; index < list.length; index++) {
160
- var element = list[index];
161
- if (predicate(element)) {
162
- return index;
163
- }
164
- }
165
- return -1;
166
- };
167
- var styleValueToText = function (styleValue) {
168
- return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) {
177
+ const styleValueToText = styleValue => {
178
+ return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, chr => {
169
179
  return chr.toUpperCase();
170
180
  });
171
181
  };
172
- var isWithinList = function (editor, e, nodeName) {
173
- var tableCellIndex = findIndex(e.parents, isTableCellNode);
174
- var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
175
- var lists = global.grep(parents, isListNode(editor));
176
- return lists.length > 0 && lists[0].nodeName === nodeName;
177
- };
178
- var makeSetupHandler = function (editor, nodeName) {
179
- return function (api) {
180
- var nodeChangeHandler = function (e) {
181
- api.setActive(isWithinList(editor, e, nodeName));
182
- };
183
- editor.on('NodeChange', nodeChangeHandler);
184
- return function () {
185
- return editor.off('NodeChange', nodeChangeHandler);
186
- };
182
+ const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;
183
+ const makeSetupHandler = (editor, nodeName) => api => {
184
+ const updateButtonState = (editor, parents) => {
185
+ const element = editor.selection.getStart(true);
186
+ api.setActive(inList(editor, parents, nodeName));
187
+ api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());
187
188
  };
189
+ const nodeChangeHandler = e => updateButtonState(editor, e.parents);
190
+ return setNodeChangeHandler(editor, nodeChangeHandler);
188
191
  };
189
- var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) {
192
+ const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {
190
193
  editor.ui.registry.addSplitButton(id, {
191
- tooltip: tooltip,
194
+ tooltip,
192
195
  icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
193
196
  presets: 'listpreview',
194
197
  columns: 3,
195
- fetch: function (callback) {
196
- var items = global.map(styles, function (styleValue) {
197
- var iconStyle = nodeName === 'OL' ? 'num' : 'bull';
198
- var iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
199
- var itemValue = styleValue === 'default' ? '' : styleValue;
200
- var displayText = styleValueToText(styleValue);
198
+ fetch: callback => {
199
+ const items = global.map(styles, styleValue => {
200
+ const iconStyle = nodeName === 'OL' ? 'num' : 'bull';
201
+ const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
202
+ const itemValue = normalizeStyleValue(styleValue);
203
+ const displayText = styleValueToText(styleValue);
201
204
  return {
202
205
  type: 'choiceitem',
203
206
  value: itemValue,
@@ -207,55 +210,50 @@
207
210
  });
208
211
  callback(items);
209
212
  },
210
- onAction: function () {
211
- return editor.execCommand(cmd);
212
- },
213
- onItemAction: function (_splitButtonApi, value) {
213
+ onAction: () => editor.execCommand(cmd),
214
+ onItemAction: (_splitButtonApi, value) => {
214
215
  applyListFormat(editor, nodeName, value);
215
216
  },
216
- select: function (value) {
217
- var listStyleType = getSelectedStyleType(editor);
218
- return listStyleType.map(function (listStyle) {
219
- return value === listStyle;
220
- }).getOr(false);
217
+ select: value => {
218
+ const listStyleType = getSelectedStyleType(editor);
219
+ return listStyleType.map(listStyle => value === listStyle).getOr(false);
221
220
  },
222
221
  onSetup: makeSetupHandler(editor, nodeName)
223
222
  });
224
223
  };
225
- var addButton = function (editor, id, tooltip, cmd, nodeName, _styles) {
224
+ const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {
226
225
  editor.ui.registry.addToggleButton(id, {
227
226
  active: false,
228
- tooltip: tooltip,
227
+ tooltip,
229
228
  icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
230
229
  onSetup: makeSetupHandler(editor, nodeName),
231
- onAction: function () {
232
- return editor.execCommand(cmd);
233
- }
230
+ onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)
234
231
  });
235
232
  };
236
- var addControl = function (editor, id, tooltip, cmd, nodeName, styles) {
233
+ const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {
237
234
  if (styles.length > 1) {
238
235
  addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
239
236
  } else {
240
- addButton(editor, id, tooltip, cmd, nodeName);
237
+ addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));
241
238
  }
242
239
  };
243
- var register = function (editor) {
240
+ const register = editor => {
244
241
  addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));
245
242
  addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));
246
243
  };
247
244
 
248
- function Plugin () {
249
- global$1.add('advlist', function (editor) {
245
+ var Plugin = () => {
246
+ global$1.add('advlist', editor => {
250
247
  if (editor.hasPlugin('lists')) {
251
- register(editor);
252
248
  register$1(editor);
249
+ register(editor);
250
+ register$2(editor);
253
251
  } else {
254
- console.error('Please use the Lists plugin together with the Advanced List plugin.');
252
+ console.error('Please use the Lists plugin together with the List Styles plugin.');
255
253
  }
256
254
  });
257
- }
255
+ };
258
256
 
259
257
  Plugin();
260
258
 
261
- }());
259
+ })();
@@ -1,9 +1,4 @@
1
1
  /**
2
- * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
- * Licensed under the LGPL or a commercial license.
4
- * For LGPL see License.txt in the project root for license information.
5
- * For commercial licenses see https://www.tiny.cloud/
6
- *
7
- * Version: 5.10.9 (2023-11-15)
2
+ * TinyMCE version 7.0.1 (2024-04-10)
8
3
  */
9
- !function(){"use strict";function f(t,e,n){t.execCommand("UL"===e?"InsertUnorderedList":"InsertOrderedList",!1,!1===n?null:{"list-style-type":n})}function i(t){return function(){return t}}function t(t){return t}function e(){return s}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=i(!1),l=i(!0),s={fold:function(t,e){return t()},isSome:u,isNone:l,getOr:t,getOrThunk:r,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:t,orThunk:r,map:e,each:function(){},bind:e,exists:u,forall:l,filter:function(){return s},toArray:function(){return[]},toString:i("none()")};function r(t){return t()}function d(t){return t&&/^(TH|TD)$/.test(t.nodeName)}function m(c,a){return function(s){function t(t){var e,n,r,o,i,u,l;s.setActive((e=c,r=a,i=-1!==(o=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}((n=t).parents,d))?n.parents.slice(0,o):n.parents,0<(u=g.grep(i,(l=e,function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(e=t,l.$.contains(l.getBody(),e));var e}))).length&&u[0].nodeName===r))}return c.on("NodeChange",t),function(){return c.off("NodeChange",t)}}}function c(t,e,n,r,o,i){var u,l,s,c,a,d;1<i.length?(c=r,a=o,d=i,(s=t).ui.registry.addSplitButton(e,{tooltip:n,icon:"OL"===a?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(t){t(g.map(d,function(t){return{type:"choiceitem",value:"default"===t?"":t,icon:"list-"+("OL"===a?"num":"bull")+"-"+("disc"===t||"decimal"===t?"default":t),text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()})}}))},onAction:function(){return s.execCommand(c)},onItemAction:function(t,e){f(s,a,e)},select:function(e){var t,n=(t=s).dom.getParent(t.selection.getNode(),"ol,ul"),r=t.dom.getStyle(n,"listStyleType");return p(r).map(function(t){return e===t}).getOr(!1)},onSetup:m(s,a)})):(l=r,(u=t).ui.registry.addToggleButton(e,{active:!1,tooltip:n,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:m(u,o),onAction:function(){return u.execCommand(l)}}))}var a=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},isSome:l,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return a(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:s},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},p=function(t){return null==t?s:a(t)};n.add("advlist",function(t){var n,e,r,o;t.hasPlugin("lists")?(c(e=t,"numlist","Numbered list","InsertOrderedList","OL",(r=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),c(e,"bullist","Bullet list","InsertUnorderedList","UL",(o=e.getParam("advlist_bullet_styles","default,circle,square"))?o.split(/[ ,]/):[]),(n=t).addCommand("ApplyUnorderedListStyle",function(t,e){f(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){f(n,"OL",e["list-style-type"])})):console.error("Please use the Lists plugin together with the Advanced List plugin.")})}();
4
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=t=>i(t)||"default"===t?"":t,h=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];if(d(r=n)&&!/\btox\-/.test(r.className))return a.some(n);if(s(n,e))break}var r;return a.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),m=(t,s,r,n,i,l)=>{l.length>1?((t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=c(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:h(t,i)})})(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:h(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,c(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{m(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),m(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the List Styles plugin.")}))}();