@dangl/angular-material-shared 2.9.0-beta0047 → 2.9.0-beta0048

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