@dangl/angular-material-shared 2.5.1-beta0012 → 2.5.1-beta0018

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
@@ -1,171 +1,170 @@
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
- var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
8
+ var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
9
 
14
- var fireInsertCustomChar = function (editor, chr) {
15
- return editor.fire('insertCustomChar', { chr: chr });
10
+ const fireInsertCustomChar = (editor, chr) => {
11
+ return editor.dispatch('insertCustomChar', { chr });
16
12
  };
17
13
 
18
- var insertChar = function (editor, chr) {
19
- var evtChr = fireInsertCustomChar(editor, chr).chr;
14
+ const insertChar = (editor, chr) => {
15
+ const evtChr = fireInsertCustomChar(editor, chr).chr;
20
16
  editor.execCommand('mceInsertContent', false, evtChr);
21
17
  };
22
18
 
23
- var typeOf = function (x) {
24
- var t = typeof x;
19
+ const hasProto = (v, constructor, predicate) => {
20
+ var _a;
21
+ if (predicate(v, constructor.prototype)) {
22
+ return true;
23
+ } else {
24
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
25
+ }
26
+ };
27
+ const typeOf = x => {
28
+ const t = typeof x;
25
29
  if (x === null) {
26
30
  return 'null';
27
- } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
31
+ } else if (t === 'object' && Array.isArray(x)) {
28
32
  return 'array';
29
- } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
33
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
30
34
  return 'string';
31
35
  } else {
32
36
  return t;
33
37
  }
34
38
  };
35
- var isType = function (type) {
36
- return function (value) {
37
- return typeOf(value) === type;
38
- };
39
- };
40
- var eq = function (t) {
41
- return function (a) {
42
- return t === a;
43
- };
44
- };
45
- var isArray$1 = isType('array');
46
- var isNull = eq(null);
39
+ const isType = type => value => typeOf(value) === type;
40
+ const isSimpleType = type => value => typeof value === type;
41
+ const eq = t => a => t === a;
42
+ const isArray$1 = isType('array');
43
+ const isNull = eq(null);
44
+ const isUndefined = eq(undefined);
45
+ const isNullable = a => a === null || a === undefined;
46
+ const isNonNullable = a => !isNullable(a);
47
+ const isFunction = isSimpleType('function');
47
48
 
48
- var noop = function () {
49
- };
50
- var constant = function (value) {
51
- return function () {
49
+ const constant = value => {
50
+ return () => {
52
51
  return value;
53
52
  };
54
53
  };
55
- var identity = function (x) {
56
- return x;
57
- };
58
- var never = constant(false);
59
- var always = constant(true);
54
+ const never = constant(false);
60
55
 
61
- var none = function () {
62
- return NONE;
63
- };
64
- var NONE = function () {
65
- var call = function (thunk) {
66
- return thunk();
67
- };
68
- var id = identity;
69
- var me = {
70
- fold: function (n, _s) {
71
- return n();
72
- },
73
- isSome: never,
74
- isNone: always,
75
- getOr: id,
76
- getOrThunk: call,
77
- getOrDie: function (msg) {
78
- throw new Error(msg || 'error: getOrDie called on none.');
79
- },
80
- getOrNull: constant(null),
81
- getOrUndefined: constant(undefined),
82
- or: id,
83
- orThunk: call,
84
- map: none,
85
- each: noop,
86
- bind: none,
87
- exists: never,
88
- forall: always,
89
- filter: function () {
90
- return none();
91
- },
92
- toArray: function () {
93
- return [];
94
- },
95
- toString: constant('none()')
96
- };
97
- return me;
98
- }();
99
- var some = function (a) {
100
- var constant_a = constant(a);
101
- var self = function () {
102
- return me;
103
- };
104
- var bind = function (f) {
105
- return f(a);
106
- };
107
- var me = {
108
- fold: function (n, s) {
109
- return s(a);
110
- },
111
- isSome: always,
112
- isNone: never,
113
- getOr: constant_a,
114
- getOrThunk: constant_a,
115
- getOrDie: constant_a,
116
- getOrNull: constant_a,
117
- getOrUndefined: constant_a,
118
- or: self,
119
- orThunk: self,
120
- map: function (f) {
121
- return some(f(a));
122
- },
123
- each: function (f) {
124
- f(a);
125
- },
126
- bind: bind,
127
- exists: bind,
128
- forall: bind,
129
- filter: function (f) {
130
- return f(a) ? me : NONE;
131
- },
132
- toArray: function () {
133
- return [a];
134
- },
135
- toString: function () {
136
- return 'some(' + a + ')';
56
+ class Optional {
57
+ constructor(tag, value) {
58
+ this.tag = tag;
59
+ this.value = value;
60
+ }
61
+ static some(value) {
62
+ return new Optional(true, value);
63
+ }
64
+ static none() {
65
+ return Optional.singletonNone;
66
+ }
67
+ fold(onNone, onSome) {
68
+ if (this.tag) {
69
+ return onSome(this.value);
70
+ } else {
71
+ return onNone();
137
72
  }
138
- };
139
- return me;
140
- };
141
- var from = function (value) {
142
- return value === null || value === undefined ? NONE : some(value);
143
- };
144
- var Optional = {
145
- some: some,
146
- none: none,
147
- from: from
148
- };
73
+ }
74
+ isSome() {
75
+ return this.tag;
76
+ }
77
+ isNone() {
78
+ return !this.tag;
79
+ }
80
+ map(mapper) {
81
+ if (this.tag) {
82
+ return Optional.some(mapper(this.value));
83
+ } else {
84
+ return Optional.none();
85
+ }
86
+ }
87
+ bind(binder) {
88
+ if (this.tag) {
89
+ return binder(this.value);
90
+ } else {
91
+ return Optional.none();
92
+ }
93
+ }
94
+ exists(predicate) {
95
+ return this.tag && predicate(this.value);
96
+ }
97
+ forall(predicate) {
98
+ return !this.tag || predicate(this.value);
99
+ }
100
+ filter(predicate) {
101
+ if (!this.tag || predicate(this.value)) {
102
+ return this;
103
+ } else {
104
+ return Optional.none();
105
+ }
106
+ }
107
+ getOr(replacement) {
108
+ return this.tag ? this.value : replacement;
109
+ }
110
+ or(replacement) {
111
+ return this.tag ? this : replacement;
112
+ }
113
+ getOrThunk(thunk) {
114
+ return this.tag ? this.value : thunk();
115
+ }
116
+ orThunk(thunk) {
117
+ return this.tag ? this : thunk();
118
+ }
119
+ getOrDie(message) {
120
+ if (!this.tag) {
121
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
122
+ } else {
123
+ return this.value;
124
+ }
125
+ }
126
+ static from(value) {
127
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
128
+ }
129
+ getOrNull() {
130
+ return this.tag ? this.value : null;
131
+ }
132
+ getOrUndefined() {
133
+ return this.value;
134
+ }
135
+ each(worker) {
136
+ if (this.tag) {
137
+ worker(this.value);
138
+ }
139
+ }
140
+ toArray() {
141
+ return this.tag ? [this.value] : [];
142
+ }
143
+ toString() {
144
+ return this.tag ? `some(${ this.value })` : 'none()';
145
+ }
146
+ }
147
+ Optional.singletonNone = new Optional(false);
149
148
 
150
- var nativePush = Array.prototype.push;
151
- var map = function (xs, f) {
152
- var len = xs.length;
153
- var r = new Array(len);
154
- for (var i = 0; i < len; i++) {
155
- var x = xs[i];
149
+ const nativePush = Array.prototype.push;
150
+ const map = (xs, f) => {
151
+ const len = xs.length;
152
+ const r = new Array(len);
153
+ for (let i = 0; i < len; i++) {
154
+ const x = xs[i];
156
155
  r[i] = f(x, i);
157
156
  }
158
157
  return r;
159
158
  };
160
- var each = function (xs, f) {
161
- for (var i = 0, len = xs.length; i < len; i++) {
162
- var x = xs[i];
159
+ const each = (xs, f) => {
160
+ for (let i = 0, len = xs.length; i < len; i++) {
161
+ const x = xs[i];
163
162
  f(x, i);
164
163
  }
165
164
  };
166
- var findUntil = function (xs, pred, until) {
167
- for (var i = 0, len = xs.length; i < len; i++) {
168
- var x = xs[i];
165
+ const findUntil = (xs, pred, until) => {
166
+ for (let i = 0, len = xs.length; i < len; i++) {
167
+ const x = xs[i];
169
168
  if (pred(x, i)) {
170
169
  return Optional.some(x);
171
170
  } else if (until(x, i)) {
@@ -174,12 +173,12 @@
174
173
  }
175
174
  return Optional.none();
176
175
  };
177
- var find = function (xs, pred) {
176
+ const find = (xs, pred) => {
178
177
  return findUntil(xs, pred, never);
179
178
  };
180
- var flatten = function (xs) {
181
- var r = [];
182
- for (var i = 0, len = xs.length; i < len; ++i) {
179
+ const flatten = xs => {
180
+ const r = [];
181
+ for (let i = 0, len = xs.length; i < len; ++i) {
183
182
  if (!isArray$1(xs[i])) {
184
183
  throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
185
184
  }
@@ -187,22 +186,23 @@
187
186
  }
188
187
  return r;
189
188
  };
190
- var bind = function (xs, f) {
191
- return flatten(map(xs, f));
192
- };
189
+ const bind = (xs, f) => flatten(map(xs, f));
193
190
 
194
- var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
191
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
195
192
 
196
- var getCharMap$1 = function (editor) {
197
- return editor.getParam('charmap');
198
- };
199
- var getCharMapAppend = function (editor) {
200
- return editor.getParam('charmap_append');
193
+ const option = name => editor => editor.options.get(name);
194
+ const register$2 = editor => {
195
+ const registerOption = editor.options.register;
196
+ const charMapProcessor = value => isFunction(value) || isArray$1(value);
197
+ registerOption('charmap', { processor: charMapProcessor });
198
+ registerOption('charmap_append', { processor: charMapProcessor });
201
199
  };
200
+ const getCharMap$1 = option('charmap');
201
+ const getCharMapAppend = option('charmap_append');
202
202
 
203
- var isArray = global$1.isArray;
204
- var UserDefined = 'User Defined';
205
- var getDefaultCharMap = function () {
203
+ const isArray = global.isArray;
204
+ const UserDefined = 'User Defined';
205
+ const getDefaultCharMap = () => {
206
206
  return [
207
207
  {
208
208
  name: 'Currency',
@@ -1393,59 +1393,58 @@
1393
1393
  }
1394
1394
  ];
1395
1395
  };
1396
- var charmapFilter = function (charmap) {
1397
- return global$1.grep(charmap, function (item) {
1396
+ const charmapFilter = charmap => {
1397
+ return global.grep(charmap, item => {
1398
1398
  return isArray(item) && item.length === 2;
1399
1399
  });
1400
1400
  };
1401
- var getCharsFromSetting = function (settingValue) {
1402
- if (isArray(settingValue)) {
1403
- return charmapFilter(settingValue);
1401
+ const getCharsFromOption = optionValue => {
1402
+ if (isArray(optionValue)) {
1403
+ return charmapFilter(optionValue);
1404
1404
  }
1405
- if (typeof settingValue === 'function') {
1406
- return settingValue();
1405
+ if (typeof optionValue === 'function') {
1406
+ return optionValue();
1407
1407
  }
1408
1408
  return [];
1409
1409
  };
1410
- var extendCharMap = function (editor, charmap) {
1411
- var userCharMap = getCharMap$1(editor);
1410
+ const extendCharMap = (editor, charmap) => {
1411
+ const userCharMap = getCharMap$1(editor);
1412
1412
  if (userCharMap) {
1413
1413
  charmap = [{
1414
1414
  name: UserDefined,
1415
- characters: getCharsFromSetting(userCharMap)
1415
+ characters: getCharsFromOption(userCharMap)
1416
1416
  }];
1417
1417
  }
1418
- var userCharMapAppend = getCharMapAppend(editor);
1418
+ const userCharMapAppend = getCharMapAppend(editor);
1419
1419
  if (userCharMapAppend) {
1420
- var userDefinedGroup = global$1.grep(charmap, function (cg) {
1421
- return cg.name === UserDefined;
1422
- });
1420
+ const userDefinedGroup = global.grep(charmap, cg => cg.name === UserDefined);
1423
1421
  if (userDefinedGroup.length) {
1424
- userDefinedGroup[0].characters = [].concat(userDefinedGroup[0].characters).concat(getCharsFromSetting(userCharMapAppend));
1422
+ userDefinedGroup[0].characters = [
1423
+ ...userDefinedGroup[0].characters,
1424
+ ...getCharsFromOption(userCharMapAppend)
1425
+ ];
1425
1426
  return charmap;
1426
1427
  }
1427
1428
  return charmap.concat({
1428
1429
  name: UserDefined,
1429
- characters: getCharsFromSetting(userCharMapAppend)
1430
+ characters: getCharsFromOption(userCharMapAppend)
1430
1431
  });
1431
1432
  }
1432
1433
  return charmap;
1433
1434
  };
1434
- var getCharMap = function (editor) {
1435
- var groups = extendCharMap(editor, getDefaultCharMap());
1435
+ const getCharMap = editor => {
1436
+ const groups = extendCharMap(editor, getDefaultCharMap());
1436
1437
  return groups.length > 1 ? [{
1437
1438
  name: 'All',
1438
- characters: bind(groups, function (g) {
1439
- return g.characters;
1440
- })
1439
+ characters: bind(groups, g => g.characters)
1441
1440
  }].concat(groups) : groups;
1442
1441
  };
1443
1442
 
1444
- var get = function (editor) {
1445
- var getCharMap$1 = function () {
1443
+ const get = editor => {
1444
+ const getCharMap$1 = () => {
1446
1445
  return getCharMap(editor);
1447
1446
  };
1448
- var insertChar$1 = function (chr) {
1447
+ const insertChar$1 = chr => {
1449
1448
  insertChar(editor, chr);
1450
1449
  };
1451
1450
  return {
@@ -1454,209 +1453,162 @@
1454
1453
  };
1455
1454
  };
1456
1455
 
1457
- var Cell = function (initial) {
1458
- var value = initial;
1459
- var get = function () {
1456
+ const Cell = initial => {
1457
+ let value = initial;
1458
+ const get = () => {
1460
1459
  return value;
1461
1460
  };
1462
- var set = function (v) {
1461
+ const set = v => {
1463
1462
  value = v;
1464
1463
  };
1465
1464
  return {
1466
- get: get,
1467
- set: set
1465
+ get,
1466
+ set
1468
1467
  };
1469
1468
  };
1470
1469
 
1471
- var last = function (fn, rate) {
1472
- var timer = null;
1473
- var cancel = function () {
1470
+ const last = (fn, rate) => {
1471
+ let timer = null;
1472
+ const cancel = () => {
1474
1473
  if (!isNull(timer)) {
1475
1474
  clearTimeout(timer);
1476
1475
  timer = null;
1477
1476
  }
1478
1477
  };
1479
- var throttle = function () {
1480
- var args = [];
1481
- for (var _i = 0; _i < arguments.length; _i++) {
1482
- args[_i] = arguments[_i];
1483
- }
1478
+ const throttle = (...args) => {
1484
1479
  cancel();
1485
- timer = setTimeout(function () {
1480
+ timer = setTimeout(() => {
1486
1481
  timer = null;
1487
1482
  fn.apply(null, args);
1488
1483
  }, rate);
1489
1484
  };
1490
1485
  return {
1491
- cancel: cancel,
1492
- throttle: throttle
1486
+ cancel,
1487
+ throttle
1493
1488
  };
1494
1489
  };
1495
1490
 
1496
- var nativeFromCodePoint = String.fromCodePoint;
1497
- var contains = function (str, substr) {
1498
- return str.indexOf(substr) !== -1;
1499
- };
1500
- var fromCodePoint = function () {
1501
- var codePoints = [];
1502
- for (var _i = 0; _i < arguments.length; _i++) {
1503
- codePoints[_i] = arguments[_i];
1504
- }
1505
- if (nativeFromCodePoint) {
1506
- return nativeFromCodePoint.apply(void 0, codePoints);
1491
+ const contains = (str, substr, start = 0, end) => {
1492
+ const idx = str.indexOf(substr, start);
1493
+ if (idx !== -1) {
1494
+ return isUndefined(end) ? true : idx + substr.length <= end;
1507
1495
  } else {
1508
- var codeUnits = [];
1509
- var codeLen = 0;
1510
- var result = '';
1511
- for (var index = 0, len = codePoints.length; index !== len; ++index) {
1512
- var codePoint = +codePoints[index];
1513
- if (!(codePoint < 1114111 && codePoint >>> 0 === codePoint)) {
1514
- throw RangeError('Invalid code point: ' + codePoint);
1515
- }
1516
- if (codePoint <= 65535) {
1517
- codeLen = codeUnits.push(codePoint);
1518
- } else {
1519
- codePoint -= 65536;
1520
- codeLen = codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
1521
- }
1522
- if (codeLen >= 16383) {
1523
- result += String.fromCharCode.apply(null, codeUnits);
1524
- codeUnits.length = 0;
1525
- }
1526
- }
1527
- return result + String.fromCharCode.apply(null, codeUnits);
1496
+ return false;
1528
1497
  }
1529
1498
  };
1499
+ const fromCodePoint = String.fromCodePoint;
1530
1500
 
1531
- var charMatches = function (charCode, name, lowerCasePattern) {
1501
+ const charMatches = (charCode, name, lowerCasePattern) => {
1532
1502
  if (contains(fromCodePoint(charCode).toLowerCase(), lowerCasePattern)) {
1533
1503
  return true;
1534
1504
  } else {
1535
1505
  return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\s+/g, ''), lowerCasePattern);
1536
1506
  }
1537
1507
  };
1538
- var scan = function (group, pattern) {
1539
- var matches = [];
1540
- var lowerCasePattern = pattern.toLowerCase();
1541
- each(group.characters, function (g) {
1508
+ const scan = (group, pattern) => {
1509
+ const matches = [];
1510
+ const lowerCasePattern = pattern.toLowerCase();
1511
+ each(group.characters, g => {
1542
1512
  if (charMatches(g[0], g[1], lowerCasePattern)) {
1543
1513
  matches.push(g);
1544
1514
  }
1545
1515
  });
1546
- return map(matches, function (m) {
1547
- return {
1548
- text: m[1],
1549
- value: fromCodePoint(m[0]),
1550
- icon: fromCodePoint(m[0])
1551
- };
1552
- });
1516
+ return map(matches, m => ({
1517
+ text: m[1],
1518
+ value: fromCodePoint(m[0]),
1519
+ icon: fromCodePoint(m[0])
1520
+ }));
1553
1521
  };
1554
1522
 
1555
- var patternName = 'pattern';
1556
- var open = function (editor, charMap) {
1557
- var makeGroupItems = function () {
1558
- return [
1559
- {
1560
- label: 'Search',
1561
- type: 'input',
1562
- name: patternName
1563
- },
1564
- {
1565
- type: 'collection',
1566
- name: 'results'
1567
- }
1568
- ];
1569
- };
1570
- var makeTabs = function () {
1571
- return map(charMap, function (charGroup) {
1572
- return {
1573
- title: charGroup.name,
1574
- name: charGroup.name,
1575
- items: makeGroupItems()
1576
- };
1577
- });
1578
- };
1579
- var makePanel = function () {
1580
- return {
1581
- type: 'panel',
1582
- items: makeGroupItems()
1583
- };
1584
- };
1585
- var makeTabPanel = function () {
1586
- return {
1587
- type: 'tabpanel',
1588
- tabs: makeTabs()
1589
- };
1590
- };
1591
- var currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');
1592
- var scanAndSet = function (dialogApi, pattern) {
1593
- find(charMap, function (group) {
1594
- return group.name === currentTab.get();
1595
- }).each(function (f) {
1596
- var items = scan(f, pattern);
1523
+ const patternName = 'pattern';
1524
+ const open = (editor, charMap) => {
1525
+ const makeGroupItems = () => [
1526
+ {
1527
+ label: 'Search',
1528
+ type: 'input',
1529
+ name: patternName
1530
+ },
1531
+ {
1532
+ type: 'collection',
1533
+ name: 'results'
1534
+ }
1535
+ ];
1536
+ const makeTabs = () => map(charMap, charGroup => ({
1537
+ title: charGroup.name,
1538
+ name: charGroup.name,
1539
+ items: makeGroupItems()
1540
+ }));
1541
+ const makePanel = () => ({
1542
+ type: 'panel',
1543
+ items: makeGroupItems()
1544
+ });
1545
+ const makeTabPanel = () => ({
1546
+ type: 'tabpanel',
1547
+ tabs: makeTabs()
1548
+ });
1549
+ const currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');
1550
+ const scanAndSet = (dialogApi, pattern) => {
1551
+ find(charMap, group => group.name === currentTab.get()).each(f => {
1552
+ const items = scan(f, pattern);
1597
1553
  dialogApi.setData({ results: items });
1598
1554
  });
1599
1555
  };
1600
- var SEARCH_DELAY = 40;
1601
- var updateFilter = last(function (dialogApi) {
1602
- var pattern = dialogApi.getData().pattern;
1556
+ const SEARCH_DELAY = 40;
1557
+ const updateFilter = last(dialogApi => {
1558
+ const pattern = dialogApi.getData().pattern;
1603
1559
  scanAndSet(dialogApi, pattern);
1604
1560
  }, SEARCH_DELAY);
1605
- var body = charMap.length === 1 ? makePanel() : makeTabPanel();
1606
- var initialData = {
1561
+ const body = charMap.length === 1 ? makePanel() : makeTabPanel();
1562
+ const initialData = {
1607
1563
  pattern: '',
1608
1564
  results: scan(charMap[0], '')
1609
1565
  };
1610
- var bridgeSpec = {
1566
+ const bridgeSpec = {
1611
1567
  title: 'Special Character',
1612
1568
  size: 'normal',
1613
- body: body,
1569
+ body,
1614
1570
  buttons: [{
1615
1571
  type: 'cancel',
1616
1572
  name: 'close',
1617
1573
  text: 'Close',
1618
1574
  primary: true
1619
1575
  }],
1620
- initialData: initialData,
1621
- onAction: function (api, details) {
1576
+ initialData,
1577
+ onAction: (api, details) => {
1622
1578
  if (details.name === 'results') {
1623
1579
  insertChar(editor, details.value);
1624
1580
  api.close();
1625
1581
  }
1626
1582
  },
1627
- onTabChange: function (dialogApi, details) {
1583
+ onTabChange: (dialogApi, details) => {
1628
1584
  currentTab.set(details.newTabName);
1629
1585
  updateFilter.throttle(dialogApi);
1630
1586
  },
1631
- onChange: function (dialogApi, changeData) {
1587
+ onChange: (dialogApi, changeData) => {
1632
1588
  if (changeData.name === patternName) {
1633
1589
  updateFilter.throttle(dialogApi);
1634
1590
  }
1635
1591
  }
1636
1592
  };
1637
- var dialogApi = editor.windowManager.open(bridgeSpec);
1593
+ const dialogApi = editor.windowManager.open(bridgeSpec);
1638
1594
  dialogApi.focus(patternName);
1639
1595
  };
1640
1596
 
1641
- var register$1 = function (editor, charMap) {
1642
- editor.addCommand('mceShowCharmap', function () {
1597
+ const register$1 = (editor, charMap) => {
1598
+ editor.addCommand('mceShowCharmap', () => {
1643
1599
  open(editor, charMap);
1644
1600
  });
1645
1601
  };
1646
1602
 
1647
- var global = tinymce.util.Tools.resolve('tinymce.util.Promise');
1648
-
1649
- var init = function (editor, all) {
1603
+ const init = (editor, all) => {
1650
1604
  editor.ui.registry.addAutocompleter('charmap', {
1651
- ch: ':',
1605
+ trigger: ':',
1652
1606
  columns: 'auto',
1653
1607
  minChars: 2,
1654
- fetch: function (pattern, _maxResults) {
1655
- return new global(function (resolve, _reject) {
1656
- resolve(scan(all, pattern));
1657
- });
1658
- },
1659
- onAction: function (autocompleteApi, rng, value) {
1608
+ fetch: (pattern, _maxResults) => new Promise((resolve, _reject) => {
1609
+ resolve(scan(all, pattern));
1610
+ }),
1611
+ onAction: (autocompleteApi, rng, value) => {
1660
1612
  editor.selection.setRng(rng);
1661
1613
  editor.insertContent(value);
1662
1614
  autocompleteApi.hide();
@@ -1664,33 +1616,43 @@
1664
1616
  });
1665
1617
  };
1666
1618
 
1667
- var register = function (editor) {
1619
+ const onSetupEditable = editor => api => {
1620
+ const nodeChanged = () => {
1621
+ api.setEnabled(editor.selection.isEditable());
1622
+ };
1623
+ editor.on('NodeChange', nodeChanged);
1624
+ nodeChanged();
1625
+ return () => {
1626
+ editor.off('NodeChange', nodeChanged);
1627
+ };
1628
+ };
1629
+ const register = editor => {
1630
+ const onAction = () => editor.execCommand('mceShowCharmap');
1668
1631
  editor.ui.registry.addButton('charmap', {
1669
1632
  icon: 'insert-character',
1670
1633
  tooltip: 'Special character',
1671
- onAction: function () {
1672
- return editor.execCommand('mceShowCharmap');
1673
- }
1634
+ onAction,
1635
+ onSetup: onSetupEditable(editor)
1674
1636
  });
1675
1637
  editor.ui.registry.addMenuItem('charmap', {
1676
1638
  icon: 'insert-character',
1677
1639
  text: 'Special character...',
1678
- onAction: function () {
1679
- return editor.execCommand('mceShowCharmap');
1680
- }
1640
+ onAction,
1641
+ onSetup: onSetupEditable(editor)
1681
1642
  });
1682
1643
  };
1683
1644
 
1684
- function Plugin () {
1685
- global$2.add('charmap', function (editor) {
1686
- var charMap = getCharMap(editor);
1645
+ var Plugin = () => {
1646
+ global$1.add('charmap', editor => {
1647
+ register$2(editor);
1648
+ const charMap = getCharMap(editor);
1687
1649
  register$1(editor, charMap);
1688
1650
  register(editor);
1689
1651
  init(editor, charMap[0]);
1690
1652
  return get(editor);
1691
1653
  });
1692
- }
1654
+ };
1693
1655
 
1694
1656
  Plugin();
1695
1657
 
1696
- }());
1658
+ })();