@dangl/angular-material-shared 2.5.1-beta0006 → 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 (246) hide show
  1. package/README.md +1 -7
  2. package/esm2022/lib/angular-material-shared.module.mjs +6 -25
  3. package/esm2022/lib/components/footer/footer.component.mjs +12 -7
  4. package/esm2022/lib/components/header/header.component.mjs +18 -10
  5. package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +18 -21
  6. package/fesm2022/dangl-angular-material-shared.mjs +45 -55
  7. package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
  8. package/lib/angular-material-shared.module.d.ts +5 -9
  9. package/lib/components/footer/footer.component.d.ts +1 -1
  10. package/lib/components/header/header.component.d.ts +1 -1
  11. package/lib/components/tiny-mce/tiny-mce.component.d.ts +7 -8
  12. package/package.json +1 -1
  13. package/tinymce-assets/icons/default/icons.js +187 -171
  14. package/tinymce-assets/icons/default/icons.min.js +1 -1
  15. package/tinymce-assets/langs/it.js +1 -1
  16. package/tinymce-assets/plugins/accordion/index.js +7 -0
  17. package/tinymce-assets/plugins/accordion/plugin.js +1054 -0
  18. package/tinymce-assets/plugins/accordion/plugin.min.js +4 -0
  19. package/tinymce-assets/plugins/advlist/plugin.js +185 -187
  20. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -7
  21. package/tinymce-assets/plugins/anchor/plugin.js +79 -81
  22. package/tinymce-assets/plugins/anchor/plugin.min.js +2 -7
  23. package/tinymce-assets/plugins/autolink/plugin.js +209 -194
  24. package/tinymce-assets/plugins/autolink/plugin.min.js +2 -7
  25. package/tinymce-assets/plugins/autoresize/plugin.js +110 -102
  26. package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -7
  27. package/tinymce-assets/plugins/autosave/plugin.js +125 -104
  28. package/tinymce-assets/plugins/autosave/plugin.min.js +2 -7
  29. package/tinymce-assets/plugins/charmap/plugin.js +275 -313
  30. package/tinymce-assets/plugins/charmap/plugin.min.js +2 -7
  31. package/tinymce-assets/plugins/code/plugin.js +18 -24
  32. package/tinymce-assets/plugins/code/plugin.min.js +2 -7
  33. package/tinymce-assets/plugins/codesample/plugin.js +2075 -2074
  34. package/tinymce-assets/plugins/codesample/plugin.min.js +2 -7
  35. package/tinymce-assets/plugins/directionality/plugin.js +247 -305
  36. package/tinymce-assets/plugins/directionality/plugin.min.js +2 -7
  37. package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1 -9424
  38. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
  39. package/tinymce-assets/plugins/emoticons/js/emojis.js +1 -9423
  40. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
  41. package/tinymce-assets/plugins/emoticons/plugin.js +334 -374
  42. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -7
  43. package/tinymce-assets/plugins/fullscreen/plugin.js +740 -837
  44. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -7
  45. package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +90 -0
  46. package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  47. package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +90 -0
  48. package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +90 -0
  49. package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +90 -0
  50. package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +90 -0
  51. package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +90 -0
  52. package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +90 -0
  53. package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +90 -0
  54. package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +90 -0
  55. package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +90 -0
  56. package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +90 -0
  57. package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  58. package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  59. package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +90 -0
  60. package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +90 -0
  61. package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  62. package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +90 -0
  63. package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +90 -0
  64. package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +90 -0
  65. package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +90 -0
  66. package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  67. package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +90 -0
  68. package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  69. package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +90 -0
  70. package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +90 -0
  71. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  72. package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  73. package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +90 -0
  74. package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +90 -0
  75. package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +90 -0
  76. package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  77. package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  78. package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  79. package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +90 -0
  80. package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +90 -0
  81. package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +90 -0
  82. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  83. package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  84. package/tinymce-assets/plugins/help/plugin.js +411 -355
  85. package/tinymce-assets/plugins/help/plugin.min.js +2 -7
  86. package/tinymce-assets/plugins/image/plugin.js +876 -1037
  87. package/tinymce-assets/plugins/image/plugin.min.js +2 -7
  88. package/tinymce-assets/plugins/importcss/plugin.js +146 -144
  89. package/tinymce-assets/plugins/importcss/plugin.min.js +2 -7
  90. package/tinymce-assets/plugins/insertdatetime/plugin.js +93 -88
  91. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -7
  92. package/tinymce-assets/plugins/link/plugin.js +718 -768
  93. package/tinymce-assets/plugins/link/plugin.min.js +2 -7
  94. package/tinymce-assets/plugins/lists/plugin.js +1235 -1375
  95. package/tinymce-assets/plugins/lists/plugin.min.js +2 -7
  96. package/tinymce-assets/plugins/media/plugin.js +614 -756
  97. package/tinymce-assets/plugins/media/plugin.min.js +2 -7
  98. package/tinymce-assets/plugins/nonbreaking/plugin.js +71 -48
  99. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -7
  100. package/tinymce-assets/plugins/pagebreak/plugin.js +53 -40
  101. package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -7
  102. package/tinymce-assets/plugins/preview/plugin.js +36 -65
  103. package/tinymce-assets/plugins/preview/plugin.min.js +2 -7
  104. package/tinymce-assets/plugins/quickbars/plugin.js +304 -331
  105. package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -7
  106. package/tinymce-assets/plugins/save/plugin.js +49 -50
  107. package/tinymce-assets/plugins/save/plugin.min.js +2 -7
  108. package/tinymce-assets/plugins/searchreplace/plugin.js +499 -571
  109. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -7
  110. package/tinymce-assets/plugins/table/plugin.js +2572 -10617
  111. package/tinymce-assets/plugins/table/plugin.min.js +2 -7
  112. package/tinymce-assets/plugins/visualblocks/plugin.js +41 -46
  113. package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -7
  114. package/tinymce-assets/plugins/visualchars/plugin.js +346 -312
  115. package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -7
  116. package/tinymce-assets/plugins/wordcount/plugin.js +159 -179
  117. package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -7
  118. package/tinymce-assets/skins/content/dark/content.css +2 -8
  119. package/tinymce-assets/skins/content/dark/content.js +2 -0
  120. package/tinymce-assets/skins/content/dark/content.min.css +1 -7
  121. package/tinymce-assets/skins/content/default/content.css +0 -6
  122. package/tinymce-assets/skins/content/default/content.js +2 -0
  123. package/tinymce-assets/skins/content/default/content.min.css +0 -6
  124. package/tinymce-assets/skins/content/document/content.css +0 -6
  125. package/tinymce-assets/skins/content/document/content.js +2 -0
  126. package/tinymce-assets/skins/content/document/content.min.css +0 -6
  127. package/tinymce-assets/skins/content/tinymce-5/content.css +61 -0
  128. package/tinymce-assets/skins/content/tinymce-5/content.js +2 -0
  129. package/tinymce-assets/skins/content/tinymce-5/content.min.css +1 -0
  130. package/tinymce-assets/skins/content/tinymce-5-dark/content.css +66 -0
  131. package/tinymce-assets/skins/content/tinymce-5-dark/content.js +2 -0
  132. package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +1 -0
  133. package/tinymce-assets/skins/content/writer/content.css +0 -6
  134. package/tinymce-assets/skins/content/writer/content.js +2 -0
  135. package/tinymce-assets/skins/content/writer/content.min.css +0 -6
  136. package/tinymce-assets/skins/ui/oxide/content.css +73 -20
  137. package/tinymce-assets/skins/ui/oxide/content.inline.css +73 -20
  138. package/tinymce-assets/skins/ui/oxide/content.inline.js +2 -0
  139. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -7
  140. package/tinymce-assets/skins/ui/oxide/content.js +2 -0
  141. package/tinymce-assets/skins/ui/oxide/content.min.css +1 -7
  142. package/tinymce-assets/skins/ui/oxide/skin.css +1480 -435
  143. package/tinymce-assets/skins/ui/oxide/skin.js +2 -0
  144. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -7
  145. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +1 -8
  146. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -0
  147. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -7
  148. package/tinymce-assets/skins/ui/oxide-dark/content.css +71 -19
  149. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +73 -20
  150. package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +2 -0
  151. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -7
  152. package/tinymce-assets/skins/ui/oxide-dark/content.js +2 -0
  153. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -7
  154. package/tinymce-assets/skins/ui/oxide-dark/skin.css +1498 -450
  155. package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -0
  156. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -7
  157. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +1 -8
  158. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  159. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
  160. package/tinymce-assets/skins/ui/tinymce-5/content.css +785 -0
  161. package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +779 -0
  162. package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +2 -0
  163. package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +1 -0
  164. package/tinymce-assets/skins/ui/tinymce-5/content.js +2 -0
  165. package/tinymce-assets/skins/ui/tinymce-5/content.min.css +1 -0
  166. package/tinymce-assets/skins/ui/tinymce-5/skin.css +4185 -0
  167. package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -0
  168. package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -0
  169. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
  170. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  171. package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  172. package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +766 -0
  173. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +779 -0
  174. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  175. package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  176. package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +2 -0
  177. package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +1 -0
  178. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +4185 -0
  179. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -0
  180. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  181. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
  182. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  183. package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  184. package/tinymce-assets/themes/silver/theme.js +25226 -28188
  185. package/tinymce-assets/themes/silver/theme.min.js +2 -7
  186. package/tinymce-assets/plugins/bbcode/index.js +0 -7
  187. package/tinymce-assets/plugins/bbcode/plugin.js +0 -99
  188. package/tinymce-assets/plugins/bbcode/plugin.min.js +0 -9
  189. package/tinymce-assets/plugins/colorpicker/index.js +0 -7
  190. package/tinymce-assets/plugins/colorpicker/plugin.js +0 -21
  191. package/tinymce-assets/plugins/colorpicker/plugin.min.js +0 -9
  192. package/tinymce-assets/plugins/contextmenu/index.js +0 -7
  193. package/tinymce-assets/plugins/contextmenu/plugin.js +0 -21
  194. package/tinymce-assets/plugins/contextmenu/plugin.min.js +0 -9
  195. package/tinymce-assets/plugins/fullpage/index.js +0 -7
  196. package/tinymce-assets/plugins/fullpage/plugin.js +0 -544
  197. package/tinymce-assets/plugins/fullpage/plugin.min.js +0 -9
  198. package/tinymce-assets/plugins/hr/index.js +0 -7
  199. package/tinymce-assets/plugins/hr/plugin.js +0 -45
  200. package/tinymce-assets/plugins/hr/plugin.min.js +0 -9
  201. package/tinymce-assets/plugins/imagetools/index.js +0 -7
  202. package/tinymce-assets/plugins/imagetools/plugin.js +0 -1531
  203. package/tinymce-assets/plugins/imagetools/plugin.min.js +0 -9
  204. package/tinymce-assets/plugins/legacyoutput/index.js +0 -7
  205. package/tinymce-assets/plugins/legacyoutput/plugin.js +0 -199
  206. package/tinymce-assets/plugins/legacyoutput/plugin.min.js +0 -9
  207. package/tinymce-assets/plugins/noneditable/index.js +0 -7
  208. package/tinymce-assets/plugins/noneditable/plugin.js +0 -117
  209. package/tinymce-assets/plugins/noneditable/plugin.min.js +0 -9
  210. package/tinymce-assets/plugins/paste/index.js +0 -7
  211. package/tinymce-assets/plugins/paste/plugin.js +0 -1803
  212. package/tinymce-assets/plugins/paste/plugin.min.js +0 -9
  213. package/tinymce-assets/plugins/print/index.js +0 -7
  214. package/tinymce-assets/plugins/print/plugin.js +0 -52
  215. package/tinymce-assets/plugins/print/plugin.min.js +0 -9
  216. package/tinymce-assets/plugins/spellchecker/index.js +0 -7
  217. package/tinymce-assets/plugins/spellchecker/plugin.js +0 -730
  218. package/tinymce-assets/plugins/spellchecker/plugin.min.js +0 -9
  219. package/tinymce-assets/plugins/tabfocus/index.js +0 -7
  220. package/tinymce-assets/plugins/tabfocus/plugin.js +0 -130
  221. package/tinymce-assets/plugins/tabfocus/plugin.min.js +0 -9
  222. package/tinymce-assets/plugins/template/index.js +0 -7
  223. package/tinymce-assets/plugins/template/plugin.js +0 -591
  224. package/tinymce-assets/plugins/template/plugin.min.js +0 -9
  225. package/tinymce-assets/plugins/textcolor/index.js +0 -7
  226. package/tinymce-assets/plugins/textcolor/plugin.js +0 -21
  227. package/tinymce-assets/plugins/textcolor/plugin.min.js +0 -9
  228. package/tinymce-assets/plugins/textpattern/index.js +0 -7
  229. package/tinymce-assets/plugins/textpattern/plugin.js +0 -1374
  230. package/tinymce-assets/plugins/textpattern/plugin.min.js +0 -9
  231. package/tinymce-assets/plugins/toc/index.js +0 -7
  232. package/tinymce-assets/plugins/toc/plugin.js +0 -238
  233. package/tinymce-assets/plugins/toc/plugin.min.js +0 -9
  234. package/tinymce-assets/skins/ui/oxide/content.mobile.css +0 -29
  235. package/tinymce-assets/skins/ui/oxide/content.mobile.min.css +0 -7
  236. package/tinymce-assets/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  237. package/tinymce-assets/skins/ui/oxide/skin.mobile.css +0 -673
  238. package/tinymce-assets/skins/ui/oxide/skin.mobile.min.css +0 -7
  239. package/tinymce-assets/skins/ui/oxide-dark/content.mobile.css +0 -29
  240. package/tinymce-assets/skins/ui/oxide-dark/content.mobile.min.css +0 -7
  241. package/tinymce-assets/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  242. package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.css +0 -673
  243. package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
  244. package/tinymce-assets/themes/mobile/index.js +0 -7
  245. package/tinymce-assets/themes/mobile/theme.js +0 -13130
  246. package/tinymce-assets/themes/mobile/theme.min.js +0 -9
@@ -1,44 +1,59 @@
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 Cell = function (initial) {
13
- var value = initial;
14
- var get = function () {
8
+ const Cell = initial => {
9
+ let value = initial;
10
+ const get = () => {
15
11
  return value;
16
12
  };
17
- var set = function (v) {
13
+ const set = v => {
18
14
  value = v;
19
15
  };
20
16
  return {
21
- get: get,
22
- set: set
17
+ get,
18
+ set
23
19
  };
24
20
  };
25
21
 
26
- var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
22
+ var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
23
+
24
+ let unique = 0;
25
+ const generate = prefix => {
26
+ const date = new Date();
27
+ const time = date.getTime();
28
+ const random = Math.floor(Math.random() * 1000000000);
29
+ unique++;
30
+ return prefix + '_' + random + unique + String(time);
31
+ };
27
32
 
28
- var get$1 = function (customTabs) {
29
- var addTab = function (spec) {
30
- var currentCustomTabs = customTabs.get();
31
- currentCustomTabs[spec.name] = spec;
33
+ const get$1 = customTabs => {
34
+ const addTab = spec => {
35
+ var _a;
36
+ const name = (_a = spec.name) !== null && _a !== void 0 ? _a : generate('tab-name');
37
+ const currentCustomTabs = customTabs.get();
38
+ currentCustomTabs[name] = spec;
32
39
  customTabs.set(currentCustomTabs);
33
40
  };
34
- return { addTab: addTab };
41
+ return { addTab };
35
42
  };
36
43
 
37
- var register$1 = function (editor, dialogOpener) {
44
+ const register$2 = (editor, dialogOpener) => {
38
45
  editor.addCommand('mceHelp', dialogOpener);
39
46
  };
40
47
 
41
- var register = function (editor, dialogOpener) {
48
+ const option = name => editor => editor.options.get(name);
49
+ const register$1 = editor => {
50
+ const registerOption = editor.options.register;
51
+ registerOption('help_tabs', { processor: 'array' });
52
+ };
53
+ const getHelpTabs = option('help_tabs');
54
+ const getForcedPlugins = option('forced_plugins');
55
+
56
+ const register = (editor, dialogOpener) => {
42
57
  editor.ui.registry.addButton('help', {
43
58
  icon: 'help',
44
59
  tooltip: 'Help',
@@ -52,150 +67,161 @@
52
67
  });
53
68
  };
54
69
 
55
- var __assign = function () {
56
- __assign = Object.assign || function __assign(t) {
57
- for (var s, i = 1, n = arguments.length; i < n; i++) {
58
- s = arguments[i];
59
- for (var p in s)
60
- if (Object.prototype.hasOwnProperty.call(s, p))
61
- t[p] = s[p];
62
- }
70
+ const hasProto = (v, constructor, predicate) => {
71
+ var _a;
72
+ if (predicate(v, constructor.prototype)) {
73
+ return true;
74
+ } else {
75
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
76
+ }
77
+ };
78
+ const typeOf = x => {
79
+ const t = typeof x;
80
+ if (x === null) {
81
+ return 'null';
82
+ } else if (t === 'object' && Array.isArray(x)) {
83
+ return 'array';
84
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
85
+ return 'string';
86
+ } else {
63
87
  return t;
64
- };
65
- return __assign.apply(this, arguments);
88
+ }
66
89
  };
90
+ const isType = type => value => typeOf(value) === type;
91
+ const isSimpleType = type => value => typeof value === type;
92
+ const eq = t => a => t === a;
93
+ const isString = isType('string');
94
+ const isUndefined = eq(undefined);
95
+ const isNullable = a => a === null || a === undefined;
96
+ const isNonNullable = a => !isNullable(a);
97
+ const isFunction = isSimpleType('function');
67
98
 
68
- var noop = function () {
69
- };
70
- var constant = function (value) {
71
- return function () {
99
+ const constant = value => {
100
+ return () => {
72
101
  return value;
73
102
  };
74
103
  };
75
- var identity = function (x) {
76
- return x;
77
- };
78
- var never = constant(false);
79
- var always = constant(true);
104
+ const never = constant(false);
80
105
 
81
- var none = function () {
82
- return NONE;
83
- };
84
- var NONE = function () {
85
- var call = function (thunk) {
86
- return thunk();
87
- };
88
- var id = identity;
89
- var me = {
90
- fold: function (n, _s) {
91
- return n();
92
- },
93
- isSome: never,
94
- isNone: always,
95
- getOr: id,
96
- getOrThunk: call,
97
- getOrDie: function (msg) {
98
- throw new Error(msg || 'error: getOrDie called on none.');
99
- },
100
- getOrNull: constant(null),
101
- getOrUndefined: constant(undefined),
102
- or: id,
103
- orThunk: call,
104
- map: none,
105
- each: noop,
106
- bind: none,
107
- exists: never,
108
- forall: always,
109
- filter: function () {
110
- return none();
111
- },
112
- toArray: function () {
113
- return [];
114
- },
115
- toString: constant('none()')
116
- };
117
- return me;
118
- }();
119
- var some = function (a) {
120
- var constant_a = constant(a);
121
- var self = function () {
122
- return me;
123
- };
124
- var bind = function (f) {
125
- return f(a);
126
- };
127
- var me = {
128
- fold: function (n, s) {
129
- return s(a);
130
- },
131
- isSome: always,
132
- isNone: never,
133
- getOr: constant_a,
134
- getOrThunk: constant_a,
135
- getOrDie: constant_a,
136
- getOrNull: constant_a,
137
- getOrUndefined: constant_a,
138
- or: self,
139
- orThunk: self,
140
- map: function (f) {
141
- return some(f(a));
142
- },
143
- each: function (f) {
144
- f(a);
145
- },
146
- bind: bind,
147
- exists: bind,
148
- forall: bind,
149
- filter: function (f) {
150
- return f(a) ? me : NONE;
151
- },
152
- toArray: function () {
153
- return [a];
154
- },
155
- toString: function () {
156
- return 'some(' + a + ')';
106
+ class Optional {
107
+ constructor(tag, value) {
108
+ this.tag = tag;
109
+ this.value = value;
110
+ }
111
+ static some(value) {
112
+ return new Optional(true, value);
113
+ }
114
+ static none() {
115
+ return Optional.singletonNone;
116
+ }
117
+ fold(onNone, onSome) {
118
+ if (this.tag) {
119
+ return onSome(this.value);
120
+ } else {
121
+ return onNone();
157
122
  }
158
- };
159
- return me;
160
- };
161
- var from = function (value) {
162
- return value === null || value === undefined ? NONE : some(value);
163
- };
164
- var Optional = {
165
- some: some,
166
- none: none,
167
- from: from
168
- };
123
+ }
124
+ isSome() {
125
+ return this.tag;
126
+ }
127
+ isNone() {
128
+ return !this.tag;
129
+ }
130
+ map(mapper) {
131
+ if (this.tag) {
132
+ return Optional.some(mapper(this.value));
133
+ } else {
134
+ return Optional.none();
135
+ }
136
+ }
137
+ bind(binder) {
138
+ if (this.tag) {
139
+ return binder(this.value);
140
+ } else {
141
+ return Optional.none();
142
+ }
143
+ }
144
+ exists(predicate) {
145
+ return this.tag && predicate(this.value);
146
+ }
147
+ forall(predicate) {
148
+ return !this.tag || predicate(this.value);
149
+ }
150
+ filter(predicate) {
151
+ if (!this.tag || predicate(this.value)) {
152
+ return this;
153
+ } else {
154
+ return Optional.none();
155
+ }
156
+ }
157
+ getOr(replacement) {
158
+ return this.tag ? this.value : replacement;
159
+ }
160
+ or(replacement) {
161
+ return this.tag ? this : replacement;
162
+ }
163
+ getOrThunk(thunk) {
164
+ return this.tag ? this.value : thunk();
165
+ }
166
+ orThunk(thunk) {
167
+ return this.tag ? this : thunk();
168
+ }
169
+ getOrDie(message) {
170
+ if (!this.tag) {
171
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
172
+ } else {
173
+ return this.value;
174
+ }
175
+ }
176
+ static from(value) {
177
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
178
+ }
179
+ getOrNull() {
180
+ return this.tag ? this.value : null;
181
+ }
182
+ getOrUndefined() {
183
+ return this.value;
184
+ }
185
+ each(worker) {
186
+ if (this.tag) {
187
+ worker(this.value);
188
+ }
189
+ }
190
+ toArray() {
191
+ return this.tag ? [this.value] : [];
192
+ }
193
+ toString() {
194
+ return this.tag ? `some(${ this.value })` : 'none()';
195
+ }
196
+ }
197
+ Optional.singletonNone = new Optional(false);
169
198
 
170
- var nativeIndexOf = Array.prototype.indexOf;
171
- var rawIndexOf = function (ts, t) {
172
- return nativeIndexOf.call(ts, t);
173
- };
174
- var contains = function (xs, x) {
175
- return rawIndexOf(xs, x) > -1;
176
- };
177
- var map = function (xs, f) {
178
- var len = xs.length;
179
- var r = new Array(len);
180
- for (var i = 0; i < len; i++) {
181
- var x = xs[i];
199
+ const nativeSlice = Array.prototype.slice;
200
+ const nativeIndexOf = Array.prototype.indexOf;
201
+ const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
202
+ const contains = (xs, x) => rawIndexOf(xs, x) > -1;
203
+ const map = (xs, f) => {
204
+ const len = xs.length;
205
+ const r = new Array(len);
206
+ for (let i = 0; i < len; i++) {
207
+ const x = xs[i];
182
208
  r[i] = f(x, i);
183
209
  }
184
210
  return r;
185
211
  };
186
- var filter = function (xs, pred) {
187
- var r = [];
188
- for (var i = 0, len = xs.length; i < len; i++) {
189
- var x = xs[i];
212
+ const filter = (xs, pred) => {
213
+ const r = [];
214
+ for (let i = 0, len = xs.length; i < len; i++) {
215
+ const x = xs[i];
190
216
  if (pred(x, i)) {
191
217
  r.push(x);
192
218
  }
193
219
  }
194
220
  return r;
195
221
  };
196
- var findUntil = function (xs, pred, until) {
197
- for (var i = 0, len = xs.length; i < len; i++) {
198
- var x = xs[i];
222
+ const findUntil = (xs, pred, until) => {
223
+ for (let i = 0, len = xs.length; i < len; i++) {
224
+ const x = xs[i];
199
225
  if (pred(x, i)) {
200
226
  return Optional.some(x);
201
227
  } else if (until(x, i)) {
@@ -204,43 +230,50 @@
204
230
  }
205
231
  return Optional.none();
206
232
  };
207
- var find = function (xs, pred) {
233
+ const find = (xs, pred) => {
208
234
  return findUntil(xs, pred, never);
209
235
  };
236
+ const sort = (xs, comparator) => {
237
+ const copy = nativeSlice.call(xs, 0);
238
+ copy.sort(comparator);
239
+ return copy;
240
+ };
210
241
 
211
- var keys = Object.keys;
212
- var hasOwnProperty = Object.hasOwnProperty;
213
- var get = function (obj, key) {
242
+ const keys = Object.keys;
243
+ const hasOwnProperty = Object.hasOwnProperty;
244
+ const get = (obj, key) => {
214
245
  return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
215
246
  };
216
- var has = function (obj, key) {
217
- return hasOwnProperty.call(obj, key);
218
- };
247
+ const has = (obj, key) => hasOwnProperty.call(obj, key);
219
248
 
220
- var cat = function (arr) {
221
- var r = [];
222
- var push = function (x) {
249
+ const cat = arr => {
250
+ const r = [];
251
+ const push = x => {
223
252
  r.push(x);
224
253
  };
225
- for (var i = 0; i < arr.length; i++) {
254
+ for (let i = 0; i < arr.length; i++) {
226
255
  arr[i].each(push);
227
256
  }
228
257
  return r;
229
258
  };
230
259
 
231
- var getHelpTabs = function (editor) {
232
- return Optional.from(editor.getParam('help_tabs'));
233
- };
234
- var getForcedPlugins = function (editor) {
235
- return editor.getParam('forced_plugins');
260
+ var global$3 = tinymce.util.Tools.resolve('tinymce.Resource');
261
+
262
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.I18n');
263
+
264
+ const pLoadHtmlByLangCode = (baseUrl, langCode) => global$3.load(`tinymce.html-i18n.help-keynav.${ langCode }`, `${ baseUrl }/js/i18n/keynav/${ langCode }.js`);
265
+ const pLoadI18nHtml = baseUrl => pLoadHtmlByLangCode(baseUrl, global$2.getCode()).catch(() => pLoadHtmlByLangCode(baseUrl, 'en'));
266
+ const initI18nLoad = (editor, baseUrl) => {
267
+ editor.on('init', () => {
268
+ pLoadI18nHtml(baseUrl);
269
+ });
236
270
  };
237
271
 
238
- var description = '<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab\u2019s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>';
239
- var tab$3 = function () {
240
- var body = {
272
+ const pTab = async pluginUrl => {
273
+ const body = {
241
274
  type: 'htmlpanel',
242
275
  presets: 'document',
243
- html: description
276
+ html: await pLoadI18nHtml(pluginUrl)
244
277
  };
245
278
  return {
246
279
  name: 'keyboardnav',
@@ -249,30 +282,31 @@
249
282
  };
250
283
  };
251
284
 
252
- var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
285
+ var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
253
286
 
254
- var convertText = function (source) {
255
- var mac = {
287
+ const convertText = source => {
288
+ const isMac = global$1.os.isMacOS() || global$1.os.isiOS();
289
+ const mac = {
256
290
  alt: '&#x2325;',
257
291
  ctrl: '&#x2303;',
258
292
  shift: '&#x21E7;',
259
293
  meta: '&#x2318;',
260
294
  access: '&#x2303;&#x2325;'
261
295
  };
262
- var other = {
296
+ const other = {
263
297
  meta: 'Ctrl ',
264
298
  access: 'Shift + Alt '
265
299
  };
266
- var replace = global$2.mac ? mac : other;
267
- var shortcut = source.split('+');
268
- var updated = map(shortcut, function (segment) {
269
- var search = segment.toLowerCase().trim();
300
+ const replace = isMac ? mac : other;
301
+ const shortcut = source.split('+');
302
+ const updated = map(shortcut, segment => {
303
+ const search = segment.toLowerCase().trim();
270
304
  return has(replace, search) ? replace[search] : segment;
271
305
  });
272
- return global$2.mac ? updated.join('').replace(/\s/, '') : updated.join('+');
306
+ return isMac ? updated.join('').replace(/\s/, '') : updated.join('+');
273
307
  };
274
308
 
275
- var shortcuts = [
309
+ const shortcuts = [
276
310
  {
277
311
  shortcuts: ['Meta + B'],
278
312
  action: 'Bold'
@@ -378,15 +412,15 @@
378
412
  }
379
413
  ];
380
414
 
381
- var tab$2 = function () {
382
- var shortcutList = map(shortcuts, function (shortcut) {
383
- var shortcutText = map(shortcut.shortcuts, convertText).join(' or ');
415
+ const tab$2 = () => {
416
+ const shortcutList = map(shortcuts, shortcut => {
417
+ const shortcutText = map(shortcut.shortcuts, convertText).join(' or ');
384
418
  return [
385
419
  shortcut.action,
386
420
  shortcutText
387
421
  ];
388
422
  });
389
- var tablePanel = {
423
+ const tablePanel = {
390
424
  type: 'table',
391
425
  header: [
392
426
  'Action',
@@ -401,12 +435,10 @@
401
435
  };
402
436
  };
403
437
 
404
- var global$1 = tinymce.util.Tools.resolve('tinymce.util.I18n');
405
-
406
- var urls = map([
438
+ const urls = map([
407
439
  {
408
- key: 'advlist',
409
- name: 'Advanced List'
440
+ key: 'accordion',
441
+ name: 'Accordion'
410
442
  },
411
443
  {
412
444
  key: 'anchor',
@@ -424,10 +456,6 @@
424
456
  key: 'autosave',
425
457
  name: 'Autosave'
426
458
  },
427
- {
428
- key: 'bbcode',
429
- name: 'BBCode'
430
- },
431
459
  {
432
460
  key: 'charmap',
433
461
  name: 'Character Map'
@@ -452,10 +480,6 @@
452
480
  key: 'emoticons',
453
481
  name: 'Emoticons'
454
482
  },
455
- {
456
- key: 'fullpage',
457
- name: 'Full Page'
458
- },
459
483
  {
460
484
  key: 'fullscreen',
461
485
  name: 'Full Screen'
@@ -464,18 +488,10 @@
464
488
  key: 'help',
465
489
  name: 'Help'
466
490
  },
467
- {
468
- key: 'hr',
469
- name: 'Horizontal Rule'
470
- },
471
491
  {
472
492
  key: 'image',
473
493
  name: 'Image'
474
494
  },
475
- {
476
- key: 'imagetools',
477
- name: 'Image Tools'
478
- },
479
495
  {
480
496
  key: 'importcss',
481
497
  name: 'Import CSS'
@@ -484,10 +500,6 @@
484
500
  key: 'insertdatetime',
485
501
  name: 'Insert Date/Time'
486
502
  },
487
- {
488
- key: 'legacyoutput',
489
- name: 'Legacy Output'
490
- },
491
503
  {
492
504
  key: 'link',
493
505
  name: 'Link'
@@ -496,6 +508,10 @@
496
508
  key: 'lists',
497
509
  name: 'Lists'
498
510
  },
511
+ {
512
+ key: 'advlist',
513
+ name: 'List Styles'
514
+ },
499
515
  {
500
516
  key: 'media',
501
517
  name: 'Media'
@@ -504,26 +520,14 @@
504
520
  key: 'nonbreaking',
505
521
  name: 'Nonbreaking'
506
522
  },
507
- {
508
- key: 'noneditable',
509
- name: 'Noneditable'
510
- },
511
523
  {
512
524
  key: 'pagebreak',
513
525
  name: 'Page Break'
514
526
  },
515
- {
516
- key: 'paste',
517
- name: 'Paste'
518
- },
519
527
  {
520
528
  key: 'preview',
521
529
  name: 'Preview'
522
530
  },
523
- {
524
- key: 'print',
525
- name: 'Print'
526
- },
527
531
  {
528
532
  key: 'quickbars',
529
533
  name: 'Quick Toolbars'
@@ -536,34 +540,14 @@
536
540
  key: 'searchreplace',
537
541
  name: 'Search and Replace'
538
542
  },
539
- {
540
- key: 'spellchecker',
541
- name: 'Spell Checker'
542
- },
543
- {
544
- key: 'tabfocus',
545
- name: 'Tab Focus'
546
- },
547
543
  {
548
544
  key: 'table',
549
545
  name: 'Table'
550
546
  },
551
- {
552
- key: 'template',
553
- name: 'Template'
554
- },
555
547
  {
556
548
  key: 'textcolor',
557
549
  name: 'Text Color'
558
550
  },
559
- {
560
- key: 'textpattern',
561
- name: 'Text Pattern'
562
- },
563
- {
564
- key: 'toc',
565
- name: 'Table of Contents'
566
- },
567
551
  {
568
552
  key: 'visualblocks',
569
553
  name: 'Visual Blocks'
@@ -582,18 +566,14 @@
582
566
  type: 'premium'
583
567
  },
584
568
  {
585
- key: 'advcode',
586
- name: 'Advanced Code Editor',
587
- type: 'premium'
588
- },
589
- {
590
- key: 'advtable',
591
- name: 'Advanced Tables',
592
- type: 'premium'
569
+ key: 'typography',
570
+ name: 'Advanced Typography',
571
+ type: 'premium',
572
+ slug: 'advanced-typography'
593
573
  },
594
574
  {
595
- key: 'autocorrect',
596
- name: 'Autocorrect',
575
+ key: 'ai',
576
+ name: 'AI Assistant',
597
577
  type: 'premium'
598
578
  },
599
579
  {
@@ -607,13 +587,34 @@
607
587
  type: 'premium'
608
588
  },
609
589
  {
610
- key: 'export',
611
- name: 'Export',
590
+ key: 'advcode',
591
+ name: 'Enhanced Code Editor',
612
592
  type: 'premium'
613
593
  },
614
594
  {
615
595
  key: 'mediaembed',
616
596
  name: 'Enhanced Media Embed',
597
+ type: 'premium',
598
+ slug: 'introduction-to-mediaembed'
599
+ },
600
+ {
601
+ key: 'advtable',
602
+ name: 'Enhanced Tables',
603
+ type: 'premium'
604
+ },
605
+ {
606
+ key: 'exportpdf',
607
+ name: 'Export to PDF',
608
+ type: 'premium'
609
+ },
610
+ {
611
+ key: 'exportword',
612
+ name: 'Export to Word',
613
+ type: 'premium'
614
+ },
615
+ {
616
+ key: 'footnotes',
617
+ name: 'Footnotes',
617
618
  type: 'premium'
618
619
  },
619
620
  {
@@ -621,16 +622,42 @@
621
622
  name: 'Format Painter',
622
623
  type: 'premium'
623
624
  },
625
+ {
626
+ key: 'editimage',
627
+ name: 'Image Editing',
628
+ type: 'premium'
629
+ },
630
+ {
631
+ key: 'importword',
632
+ name: 'Import from Word',
633
+ type: 'premium'
634
+ },
635
+ {
636
+ key: 'inlinecss',
637
+ name: 'Inline CSS',
638
+ type: 'premium',
639
+ slug: 'inline-css'
640
+ },
624
641
  {
625
642
  key: 'linkchecker',
626
643
  name: 'Link Checker',
627
644
  type: 'premium'
628
645
  },
646
+ {
647
+ key: 'markdown',
648
+ name: 'Markdown',
649
+ type: 'premium'
650
+ },
629
651
  {
630
652
  key: 'mentions',
631
653
  name: 'Mentions',
632
654
  type: 'premium'
633
655
  },
656
+ {
657
+ key: 'mergetags',
658
+ name: 'Merge Tags',
659
+ type: 'premium'
660
+ },
634
661
  {
635
662
  key: 'pageembed',
636
663
  name: 'Page Embed',
@@ -644,91 +671,120 @@
644
671
  {
645
672
  key: 'powerpaste',
646
673
  name: 'PowerPaste',
647
- type: 'premium'
674
+ type: 'premium',
675
+ slug: 'introduction-to-powerpaste'
648
676
  },
649
677
  {
650
- key: 'rtc',
651
- name: 'Real-Time Collaboration',
678
+ key: 'revisionhistory',
679
+ name: 'Revision History',
652
680
  type: 'premium'
653
681
  },
654
682
  {
655
683
  key: 'tinymcespellchecker',
656
- name: 'Spell Checker Pro',
684
+ name: 'Spell Checker',
685
+ type: 'premium',
686
+ slug: 'introduction-to-tiny-spellchecker'
687
+ },
688
+ {
689
+ key: 'autocorrect',
690
+ name: 'Spelling Autocorrect',
691
+ type: 'premium'
692
+ },
693
+ {
694
+ key: 'tableofcontents',
695
+ name: 'Table of Contents',
657
696
  type: 'premium'
658
697
  },
698
+ {
699
+ key: 'advtemplate',
700
+ name: 'Templates',
701
+ type: 'premium',
702
+ slug: 'advanced-templates'
703
+ },
659
704
  {
660
705
  key: 'tinycomments',
661
706
  name: 'Tiny Comments',
662
707
  type: 'premium',
663
- slug: 'comments'
708
+ slug: 'introduction-to-tiny-comments'
664
709
  },
665
710
  {
666
711
  key: 'tinydrive',
667
712
  name: 'Tiny Drive',
668
- type: 'premium'
713
+ type: 'premium',
714
+ slug: 'tinydrive-introduction'
669
715
  }
670
- ], function (item) {
671
- return __assign(__assign({}, item), {
672
- type: item.type || 'opensource',
673
- slug: item.slug || item.key
674
- });
675
- });
716
+ ], item => ({
717
+ ...item,
718
+ type: item.type || 'opensource',
719
+ slug: item.slug || item.key
720
+ }));
676
721
 
677
- var tab$1 = function (editor) {
678
- var availablePlugins = function () {
679
- var premiumPlugins = filter(urls, function (_a) {
680
- var key = _a.key, type = _a.type;
681
- return key !== 'autocorrect' && type === 'premium';
682
- });
683
- var premiumPluginList = map(premiumPlugins, function (plugin) {
684
- return '<li>' + global$1.translate(plugin.name) + '</li>';
685
- }).join('');
686
- return '<div data-mce-tabstop="1" tabindex="-1">' + '<p><b>' + global$1.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">' + global$1.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
687
- };
688
- var makeLink = function (p) {
689
- return '<a href="' + p.url + '" target="_blank" rel="noopener">' + p.name + '</a>';
690
- };
691
- var maybeUrlize = function (editor, key) {
692
- return find(urls, function (x) {
693
- return x.key === key;
694
- }).fold(function () {
695
- var getMetadata = editor.plugins[key].getMetadata;
696
- return typeof getMetadata === 'function' ? makeLink(getMetadata()) : key;
697
- }, function (x) {
698
- var name = x.type === 'premium' ? x.name + '*' : x.name;
699
- return makeLink({
700
- name: name,
701
- url: 'https://www.tiny.cloud/docs/plugins/' + x.type + '/' + x.slug
702
- });
722
+ const tab$1 = editor => {
723
+ const availablePlugins = () => {
724
+ const premiumPlugins = filter(urls, ({type}) => {
725
+ return type === 'premium';
703
726
  });
727
+ const sortedPremiumPlugins = sort(map(premiumPlugins, p => p.name), (s1, s2) => s1.localeCompare(s2));
728
+ const premiumPluginList = map(sortedPremiumPlugins, pluginName => `<li>${ pluginName }</li>`).join('');
729
+ return '<div>' + '<p><b>' + global$2.translate('Premium plugins:') + '</b></p>' + '<ul>' + premiumPluginList + '<li class="tox-help__more-link" ">' + '<a href="https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading" rel="noopener" target="_blank"' + ' data-alloy-tabstop="true" tabindex="-1">' + global$2.translate('Learn more...') + '</a></li>' + '</ul>' + '</div>';
730
+ };
731
+ const makeLink = p => `<a data-alloy-tabstop="true" tabindex="-1" href="${ p.url }" target="_blank" rel="noopener">${ p.name }</a>`;
732
+ const identifyUnknownPlugin = (editor, key) => {
733
+ const getMetadata = editor.plugins[key].getMetadata;
734
+ if (isFunction(getMetadata)) {
735
+ const metadata = getMetadata();
736
+ return {
737
+ name: metadata.name,
738
+ html: makeLink(metadata)
739
+ };
740
+ } else {
741
+ return {
742
+ name: key,
743
+ html: key
744
+ };
745
+ }
704
746
  };
705
- var getPluginKeys = function (editor) {
706
- var keys$1 = keys(editor.plugins);
707
- var forced_plugins = getForcedPlugins(editor);
708
- return forced_plugins === undefined ? keys$1 : filter(keys$1, function (k) {
709
- return !contains(forced_plugins, k);
747
+ const getPluginData = (editor, key) => find(urls, x => {
748
+ return x.key === key;
749
+ }).fold(() => {
750
+ return identifyUnknownPlugin(editor, key);
751
+ }, x => {
752
+ const name = x.type === 'premium' ? `${ x.name }*` : x.name;
753
+ const html = makeLink({
754
+ name,
755
+ url: `https://www.tiny.cloud/docs/tinymce/7/${ x.slug }/`
710
756
  });
711
- };
712
- var pluginLister = function (editor) {
713
- var pluginKeys = getPluginKeys(editor);
714
- var pluginLis = map(pluginKeys, function (key) {
715
- return '<li>' + maybeUrlize(editor, key) + '</li>';
757
+ return {
758
+ name,
759
+ html
760
+ };
761
+ });
762
+ const getPluginKeys = editor => {
763
+ const keys$1 = keys(editor.plugins);
764
+ const forcedPlugins = getForcedPlugins(editor);
765
+ return isUndefined(forcedPlugins) ? keys$1 : filter(keys$1, k => !contains(forcedPlugins, k));
766
+ };
767
+ const pluginLister = editor => {
768
+ const pluginKeys = getPluginKeys(editor);
769
+ const sortedPluginData = sort(map(pluginKeys, k => getPluginData(editor, k)), (pd1, pd2) => pd1.name.localeCompare(pd2.name));
770
+ const pluginLis = map(sortedPluginData, key => {
771
+ return '<li>' + key.html + '</li>';
716
772
  });
717
- var count = pluginLis.length;
718
- var pluginsString = pluginLis.join('');
719
- var html = '<p><b>' + global$1.translate([
773
+ const count = pluginLis.length;
774
+ const pluginsString = pluginLis.join('');
775
+ const html = '<p><b>' + global$2.translate([
720
776
  'Plugins installed ({0}):',
721
777
  count
722
778
  ]) + '</b></p>' + '<ul>' + pluginsString + '</ul>';
723
779
  return html;
724
780
  };
725
- var installedPlugins = function (editor) {
781
+ const installedPlugins = editor => {
726
782
  if (editor == null) {
727
783
  return '';
728
784
  }
729
- return '<div data-mce-tabstop="1" tabindex="-1">' + pluginLister(editor) + '</div>';
785
+ return '<div>' + pluginLister(editor) + '</div>';
730
786
  };
731
- var htmlPanel = {
787
+ const htmlPanel = {
732
788
  type: 'htmlpanel',
733
789
  presets: 'document',
734
790
  html: [
@@ -745,15 +801,13 @@
745
801
 
746
802
  var global = tinymce.util.Tools.resolve('tinymce.EditorManager');
747
803
 
748
- var tab = function () {
749
- var getVersion = function (major, minor) {
750
- return major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
751
- };
752
- var version = getVersion(global.majorVersion, global.minorVersion);
753
- var changeLogLink = '<a href="https://www.tiny.cloud/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE ' + version + '</a>';
754
- var htmlPanel = {
804
+ const tab = () => {
805
+ const getVersion = (major, minor) => major.indexOf('@') === 0 ? 'X.X.X' : major + '.' + minor;
806
+ const version = getVersion(global.majorVersion, global.minorVersion);
807
+ const changeLogLink = '<a data-alloy-tabstop="true" tabindex="-1" href="https://www.tiny.cloud/docs/tinymce/7/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral" rel="noopener" target="_blank">TinyMCE ' + version + '</a>';
808
+ const htmlPanel = {
755
809
  type: 'htmlpanel',
756
- html: '<p>' + global$1.translate([
810
+ html: '<p>' + global$2.translate([
757
811
  'You are using {0}',
758
812
  changeLogLink
759
813
  ]) + '</p>',
@@ -766,64 +820,64 @@
766
820
  };
767
821
  };
768
822
 
769
- var parseHelpTabsSetting = function (tabsFromSettings, tabs) {
770
- var newTabs = {};
771
- var names = map(tabsFromSettings, function (t) {
772
- if (typeof t === 'string') {
823
+ const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
824
+ const newTabs = {};
825
+ const names = map(tabsFromSettings, t => {
826
+ var _a;
827
+ if (isString(t)) {
773
828
  if (has(tabs, t)) {
774
829
  newTabs[t] = tabs[t];
775
830
  }
776
831
  return t;
777
832
  } else {
778
- newTabs[t.name] = t;
779
- return t.name;
833
+ const name = (_a = t.name) !== null && _a !== void 0 ? _a : generate('tab-name');
834
+ newTabs[name] = t;
835
+ return name;
780
836
  }
781
837
  });
782
838
  return {
783
839
  tabs: newTabs,
784
- names: names
840
+ names
785
841
  };
786
842
  };
787
- var getNamesFromTabs = function (tabs) {
788
- var names = keys(tabs);
789
- var idx = names.indexOf('versions');
843
+ const getNamesFromTabs = tabs => {
844
+ const names = keys(tabs);
845
+ const idx = names.indexOf('versions');
790
846
  if (idx !== -1) {
791
847
  names.splice(idx, 1);
792
848
  names.push('versions');
793
849
  }
794
850
  return {
795
- tabs: tabs,
796
- names: names
797
- };
798
- };
799
- var parseCustomTabs = function (editor, customTabs) {
800
- var _a;
801
- var shortcuts = tab$2();
802
- var nav = tab$3();
803
- var plugins = tab$1(editor);
804
- var versions = tab();
805
- var tabs = __assign((_a = {}, _a[shortcuts.name] = shortcuts, _a[nav.name] = nav, _a[plugins.name] = plugins, _a[versions.name] = versions, _a), customTabs.get());
806
- return getHelpTabs(editor).fold(function () {
807
- return getNamesFromTabs(tabs);
808
- }, function (tabsFromSettings) {
809
- return parseHelpTabsSetting(tabsFromSettings, tabs);
810
- });
811
- };
812
- var init = function (editor, customTabs) {
813
- return function () {
814
- var _a = parseCustomTabs(editor, customTabs), tabs = _a.tabs, names = _a.names;
815
- var foundTabs = map(names, function (name) {
816
- return get(tabs, name);
817
- });
818
- var dialogTabs = cat(foundTabs);
819
- var body = {
851
+ tabs,
852
+ names
853
+ };
854
+ };
855
+ const pParseCustomTabs = async (editor, customTabs, pluginUrl) => {
856
+ const shortcuts = tab$2();
857
+ const nav = await pTab(pluginUrl);
858
+ const plugins = tab$1(editor);
859
+ const versions = tab();
860
+ const tabs = {
861
+ [shortcuts.name]: shortcuts,
862
+ [nav.name]: nav,
863
+ [plugins.name]: plugins,
864
+ [versions.name]: versions,
865
+ ...customTabs.get()
866
+ };
867
+ return Optional.from(getHelpTabs(editor)).fold(() => getNamesFromTabs(tabs), tabsFromSettings => parseHelpTabsSetting(tabsFromSettings, tabs));
868
+ };
869
+ const init = (editor, customTabs, pluginUrl) => () => {
870
+ pParseCustomTabs(editor, customTabs, pluginUrl).then(({tabs, names}) => {
871
+ const foundTabs = map(names, name => get(tabs, name));
872
+ const dialogTabs = cat(foundTabs);
873
+ const body = {
820
874
  type: 'tabpanel',
821
875
  tabs: dialogTabs
822
876
  };
823
877
  editor.windowManager.open({
824
878
  title: 'Help',
825
879
  size: 'medium',
826
- body: body,
880
+ body,
827
881
  buttons: [{
828
882
  type: 'cancel',
829
883
  name: 'close',
@@ -832,21 +886,23 @@
832
886
  }],
833
887
  initialData: {}
834
888
  });
835
- };
889
+ });
836
890
  };
837
891
 
838
- function Plugin () {
839
- global$3.add('help', function (editor) {
840
- var customTabs = Cell({});
841
- var api = get$1(customTabs);
842
- var dialogOpener = init(editor, customTabs);
892
+ var Plugin = () => {
893
+ global$4.add('help', (editor, pluginUrl) => {
894
+ const customTabs = Cell({});
895
+ const api = get$1(customTabs);
896
+ register$1(editor);
897
+ const dialogOpener = init(editor, customTabs, pluginUrl);
843
898
  register(editor, dialogOpener);
844
- register$1(editor, dialogOpener);
899
+ register$2(editor, dialogOpener);
845
900
  editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
901
+ initI18nLoad(editor, pluginUrl);
846
902
  return api;
847
903
  });
848
- }
904
+ };
849
905
 
850
906
  Plugin();
851
907
 
852
- }());
908
+ })();