@dangl/angular-material-shared 2.2.0 → 2.3.0-beta0037

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 (172) hide show
  1. package/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
  2. package/esm2020/lib/angular-material-shared.module.mjs +38 -0
  3. package/esm2020/lib/components/footer/footer.component.mjs +33 -0
  4. package/esm2020/lib/components/header/header.component.mjs +80 -0
  5. package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
  6. package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
  7. package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
  8. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  9. package/fesm2015/dangl-angular-material-shared.mjs +292 -0
  10. package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
  11. package/fesm2020/dangl-angular-material-shared.mjs +290 -0
  12. package/fesm2020/dangl-angular-material-shared.mjs.map +1 -0
  13. package/{dangl-angular-material-shared.d.ts → index.d.ts} +1 -0
  14. package/lib/angular-material-shared.module.d.ts +12 -0
  15. package/lib/components/footer/footer.component.d.ts +3 -0
  16. package/lib/components/header/header.component.d.ts +3 -0
  17. package/lib/components/tiny-mce/tiny-mce.component.d.ts +3 -0
  18. package/package.json +28 -16
  19. package/styles/material-style.scss +1 -1
  20. package/styles/material-theme.scss +4 -3
  21. package/styles/material-variables.scss +9 -8
  22. package/tinymce-assets/icons/default/icons.js +11 -1
  23. package/tinymce-assets/icons/default/icons.min.js +1 -1
  24. package/tinymce-assets/langs/cs.js +118 -75
  25. package/tinymce-assets/langs/cy.js +61 -18
  26. package/tinymce-assets/langs/da.js +60 -17
  27. package/tinymce-assets/langs/de.js +60 -17
  28. package/tinymce-assets/langs/eo.js +334 -138
  29. package/tinymce-assets/langs/es_ES.js +32 -2
  30. package/tinymce-assets/langs/fa.js +60 -17
  31. package/tinymce-assets/langs/fa_IR.js +31 -1
  32. package/tinymce-assets/langs/fr_FR.js +60 -17
  33. package/tinymce-assets/langs/hu_HU.js +60 -17
  34. package/tinymce-assets/langs/ja.js +60 -17
  35. package/tinymce-assets/langs/ko_KR.js +3 -3
  36. package/tinymce-assets/langs/nb_NO.js +61 -18
  37. package/tinymce-assets/langs/nl.js +60 -17
  38. package/tinymce-assets/langs/pl.js +60 -17
  39. package/tinymce-assets/langs/pt_BR.js +60 -17
  40. package/tinymce-assets/langs/pt_PT.js +60 -17
  41. package/tinymce-assets/langs/ro.js +60 -17
  42. package/tinymce-assets/langs/ro_RO.js +32 -2
  43. package/tinymce-assets/langs/ru.js +60 -17
  44. package/tinymce-assets/langs/ru_RU.js +445 -0
  45. package/tinymce-assets/langs/sl.js +59 -14
  46. package/tinymce-assets/langs/ta.js +60 -17
  47. package/tinymce-assets/langs/ta_IN.js +60 -17
  48. package/tinymce-assets/langs/th_TH.js +60 -17
  49. package/tinymce-assets/langs/tr_TR.js +81 -8
  50. package/tinymce-assets/langs/vi.js +179 -21
  51. package/tinymce-assets/langs/zh_CN.js +60 -17
  52. package/tinymce-assets/plugins/advlist/plugin.js +29 -48
  53. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
  54. package/tinymce-assets/plugins/anchor/plugin.js +8 -8
  55. package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
  56. package/tinymce-assets/plugins/autolink/plugin.js +58 -30
  57. package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
  58. package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
  59. package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
  60. package/tinymce-assets/plugins/autosave/plugin.js +9 -9
  61. package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
  62. package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
  63. package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
  64. package/tinymce-assets/plugins/charmap/plugin.js +39 -49
  65. package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
  66. package/tinymce-assets/plugins/code/plugin.js +9 -10
  67. package/tinymce-assets/plugins/code/plugin.min.js +2 -2
  68. package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
  69. package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
  70. package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
  71. package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
  72. package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
  73. package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
  74. package/tinymce-assets/plugins/directionality/plugin.js +186 -53
  75. package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
  76. package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
  77. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
  78. package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
  79. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
  80. package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
  81. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
  82. package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
  83. package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
  84. package/tinymce-assets/plugins/fullscreen/plugin.js +496 -129
  85. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
  86. package/tinymce-assets/plugins/help/plugin.js +101 -122
  87. package/tinymce-assets/plugins/help/plugin.min.js +2 -2
  88. package/tinymce-assets/plugins/hr/plugin.js +9 -10
  89. package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
  90. package/tinymce-assets/plugins/image/plugin.js +78 -73
  91. package/tinymce-assets/plugins/image/plugin.min.js +2 -2
  92. package/tinymce-assets/plugins/imagetools/plugin.js +484 -307
  93. package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
  94. package/tinymce-assets/plugins/importcss/plugin.js +50 -51
  95. package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
  96. package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
  97. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
  98. package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
  99. package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
  100. package/tinymce-assets/plugins/link/plugin.js +131 -125
  101. package/tinymce-assets/plugins/link/plugin.min.js +2 -2
  102. package/tinymce-assets/plugins/lists/plugin.js +256 -229
  103. package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
  104. package/tinymce-assets/plugins/media/plugin.js +124 -147
  105. package/tinymce-assets/plugins/media/plugin.min.js +2 -2
  106. package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
  107. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
  108. package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
  109. package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
  110. package/tinymce-assets/plugins/pagebreak/plugin.js +16 -17
  111. package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
  112. package/tinymce-assets/plugins/paste/plugin.js +196 -157
  113. package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
  114. package/tinymce-assets/plugins/preview/plugin.js +13 -14
  115. package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
  116. package/tinymce-assets/plugins/print/plugin.js +13 -14
  117. package/tinymce-assets/plugins/print/plugin.min.js +2 -2
  118. package/tinymce-assets/plugins/quickbars/plugin.js +33 -48
  119. package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
  120. package/tinymce-assets/plugins/save/plugin.js +9 -8
  121. package/tinymce-assets/plugins/save/plugin.min.js +2 -2
  122. package/tinymce-assets/plugins/searchreplace/plugin.js +73 -70
  123. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
  124. package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
  125. package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
  126. package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
  127. package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
  128. package/tinymce-assets/plugins/table/plugin.js +2831 -2264
  129. package/tinymce-assets/plugins/table/plugin.min.js +2 -2
  130. package/tinymce-assets/plugins/template/plugin.js +84 -70
  131. package/tinymce-assets/plugins/template/plugin.min.js +2 -2
  132. package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
  133. package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
  134. package/tinymce-assets/plugins/textpattern/plugin.js +76 -96
  135. package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
  136. package/tinymce-assets/plugins/toc/plugin.js +31 -29
  137. package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
  138. package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
  139. package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
  140. package/tinymce-assets/plugins/visualchars/plugin.js +52 -67
  141. package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
  142. package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
  143. package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
  144. package/tinymce-assets/skins/ui/oxide/content.css +1 -1
  145. package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
  146. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
  147. package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
  148. package/tinymce-assets/skins/ui/oxide/skin.css +35 -22
  149. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  150. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
  151. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
  152. package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
  153. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
  154. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
  155. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
  156. package/tinymce-assets/skins/ui/oxide-dark/skin.css +35 -22
  157. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  158. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
  159. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
  160. package/tinymce-assets/themes/mobile/theme.js +2798 -3255
  161. package/tinymce-assets/themes/mobile/theme.min.js +2 -2
  162. package/tinymce-assets/themes/silver/theme.js +25400 -25371
  163. package/tinymce-assets/themes/silver/theme.min.js +2 -2
  164. package/bundles/dangl-angular-material-shared.umd.js +0 -285
  165. package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
  166. package/dangl-angular-material-shared.metadata.json +0 -1
  167. package/esm2015/lib/angular-material-shared.module.js +0 -25
  168. package/esm2015/lib/components/footer/footer.component.js +0 -27
  169. package/esm2015/lib/components/header/header.component.js +0 -67
  170. package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
  171. package/fesm2015/dangl-angular-material-shared.js +0 -259
  172. package/fesm2015/dangl-angular-material-shared.js.map +0 -1
@@ -4,19 +4,19 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
11
11
 
12
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
12
+ var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
13
 
14
14
  var applyListFormat = function (editor, listName, styleValue) {
15
15
  var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
16
16
  editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
17
17
  };
18
18
 
19
- var register = function (editor) {
19
+ var register$1 = function (editor) {
20
20
  editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
21
21
  applyListFormat(editor, 'UL', value['list-style-type']);
22
22
  });
@@ -25,7 +25,7 @@
25
25
  });
26
26
  };
27
27
 
28
- var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
28
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
29
29
 
30
30
  var getNumberStyles = function (editor) {
31
31
  var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman');
@@ -43,6 +43,9 @@
43
43
  return value;
44
44
  };
45
45
  };
46
+ var identity = function (x) {
47
+ return x;
48
+ };
46
49
  var never = constant(false);
47
50
  var always = constant(true);
48
51
 
@@ -50,20 +53,14 @@
50
53
  return NONE;
51
54
  };
52
55
  var NONE = function () {
53
- var eq = function (o) {
54
- return o.isNone();
55
- };
56
56
  var call = function (thunk) {
57
57
  return thunk();
58
58
  };
59
- var id = function (n) {
60
- return n;
61
- };
59
+ var id = identity;
62
60
  var me = {
63
61
  fold: function (n, _s) {
64
62
  return n();
65
63
  },
66
- is: never,
67
64
  isSome: never,
68
65
  isNone: always,
69
66
  getOr: id,
@@ -80,9 +77,9 @@
80
77
  bind: none,
81
78
  exists: never,
82
79
  forall: always,
83
- filter: none,
84
- equals: eq,
85
- equals_: eq,
80
+ filter: function () {
81
+ return none();
82
+ },
86
83
  toArray: function () {
87
84
  return [];
88
85
  },
@@ -102,9 +99,6 @@
102
99
  fold: function (n, s) {
103
100
  return s(a);
104
101
  },
105
- is: function (v) {
106
- return a === v;
107
- },
108
102
  isSome: always,
109
103
  isNone: never,
110
104
  getOr: constant_a,
@@ -131,14 +125,6 @@
131
125
  },
132
126
  toString: function () {
133
127
  return 'some(' + a + ')';
134
- },
135
- equals: function (o) {
136
- return o.is(a);
137
- },
138
- equals_: function (o, elementEq) {
139
- return o.fold(never, function (b) {
140
- return elementEq(a, b);
141
- });
142
128
  }
143
129
  };
144
130
  return me;
@@ -186,9 +172,20 @@
186
172
  var isWithinList = function (editor, e, nodeName) {
187
173
  var tableCellIndex = findIndex(e.parents, isTableCellNode);
188
174
  var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
189
- var lists = global$1.grep(parents, isListNode(editor));
175
+ var lists = global.grep(parents, isListNode(editor));
190
176
  return lists.length > 0 && lists[0].nodeName === nodeName;
191
177
  };
178
+ var makeSetupHandler = function (editor, nodeName) {
179
+ return function (api) {
180
+ var nodeChangeHandler = function (e) {
181
+ api.setActive(isWithinList(editor, e, nodeName));
182
+ };
183
+ editor.on('NodeChange', nodeChangeHandler);
184
+ return function () {
185
+ return editor.off('NodeChange', nodeChangeHandler);
186
+ };
187
+ };
188
+ };
192
189
  var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) {
193
190
  editor.ui.registry.addSplitButton(id, {
194
191
  tooltip: tooltip,
@@ -196,7 +193,7 @@
196
193
  presets: 'listpreview',
197
194
  columns: 3,
198
195
  fetch: function (callback) {
199
- var items = global$1.map(styles, function (styleValue) {
196
+ var items = global.map(styles, function (styleValue) {
200
197
  var iconStyle = nodeName === 'OL' ? 'num' : 'bull';
201
198
  var iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
202
199
  var itemValue = styleValue === 'default' ? '' : styleValue;
@@ -222,15 +219,7 @@
222
219
  return value === listStyle;
223
220
  }).getOr(false);
224
221
  },
225
- onSetup: function (api) {
226
- var nodeChangeHandler = function (e) {
227
- api.setActive(isWithinList(editor, e, nodeName));
228
- };
229
- editor.on('NodeChange', nodeChangeHandler);
230
- return function () {
231
- return editor.off('NodeChange', nodeChangeHandler);
232
- };
233
- }
222
+ onSetup: makeSetupHandler(editor, nodeName)
234
223
  });
235
224
  };
236
225
  var addButton = function (editor, id, tooltip, cmd, nodeName, _styles) {
@@ -238,15 +227,7 @@
238
227
  active: false,
239
228
  tooltip: tooltip,
240
229
  icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
241
- onSetup: function (api) {
242
- var nodeChangeHandler = function (e) {
243
- api.setActive(isWithinList(editor, e, nodeName));
244
- };
245
- editor.on('NodeChange', nodeChangeHandler);
246
- return function () {
247
- return editor.off('NodeChange', nodeChangeHandler);
248
- };
249
- },
230
+ onSetup: makeSetupHandler(editor, nodeName),
250
231
  onAction: function () {
251
232
  return editor.execCommand(cmd);
252
233
  }
@@ -259,16 +240,16 @@
259
240
  addButton(editor, id, tooltip, cmd, nodeName);
260
241
  }
261
242
  };
262
- var register$1 = function (editor) {
243
+ var register = function (editor) {
263
244
  addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));
264
245
  addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));
265
246
  };
266
247
 
267
248
  function Plugin () {
268
- global.add('advlist', function (editor) {
249
+ global$1.add('advlist', function (editor) {
269
250
  if (editor.hasPlugin('lists')) {
270
- register$1(editor);
271
251
  register(editor);
252
+ register$1(editor);
272
253
  } else {
273
254
  console.error('Please use the Lists plugin together with the Advanced List plugin.');
274
255
  }
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
- !function(){"use strict";var n,e,t,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(n,e,t){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===t?null:{"list-style-type":t})},l=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n){return function(){return n}},s=i(!1),c=i(!0),o=function(){return a},a=(n=function(n){return n.isNone()},{fold:function(n,e){return n()},is:s,isSome:s,isNone:c,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(undefined),or:t,orThunk:e,map:o,each:function(){},bind:o,exists:s,forall:c,filter:o,equals:n,equals_:n,toArray:function(){return[]},toString:i("none()")}),d=function(t){var n=i(t),e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:c,isNone:s,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return d(n(t))},each:function(n){n(t)},bind:r,exists:r,forall:r,filter:function(n){return n(t)?o:a},toArray:function(){return[t]},toString:function(){return"some("+t+")"},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(s,function(n){return e(t,n)})}};return o},f=function(n){return null===n||n===undefined?a:d(n)},g=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},m=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(t=n,(e=r).$.contains(e.getBody(),t));var e,t}},p=function(n,e,t){var r=function(n,e){for(var t=0;t<n.length;t++){if(e(n[t]))return t}return-1}(e.parents,g),o=-1!==r?e.parents.slice(0,r):e.parents,i=l.grep(o,m(n));return 0<i.length&&i[0].nodeName===t},y=function(o,n,e,t,r,i){o.ui.registry.addSplitButton(n,{tooltip:e,icon:"OL"===r?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(l.map(i,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===r?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}}))},onAction:function(){return o.execCommand(t)},onItemAction:function(n,e){u(o,r,e)},select:function(e){var n,t,r;return(t=(n=o).dom.getParent(n.selection.getNode(),"ol,ul"),r=n.dom.getStyle(t,"listStyleType"),f(r)).map(function(n){return e===n}).getOr(!1)},onSetup:function(e){var n=function(n){e.setActive(p(o,n,r))};return o.on("NodeChange",n),function(){return o.off("NodeChange",n)}}})},h=function(n,e,t,r,o,i){var u,l,s,c,a;1<i.length?y(n,e,t,r,o,i):(l=e,s=t,c=r,a=o,(u=n).ui.registry.addToggleButton(l,{active:!1,tooltip:s,icon:"OL"===a?"ordered-list":"unordered-list",onSetup:function(e){var n=function(n){e.setActive(p(u,n,a))};return u.on("NodeChange",n),function(){return u.off("NodeChange",n)}},onAction:function(){return u.execCommand(c)}}))};r.add("advlist",function(n){var t,e,r,o;n.hasPlugin("lists")?(h(e=n,"numlist","Numbered list","InsertOrderedList","OL",(r=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),h(e,"bullist","Bullet list","InsertUnorderedList","UL",(o=e.getParam("advlist_bullet_styles","default,circle,square"))?o.split(/[ ,]/):[]),(t=n).addCommand("ApplyUnorderedListStyle",function(n,e){u(t,"UL",e["list-style-type"])}),t.addCommand("ApplyOrderedListStyle",function(n,e){u(t,"OL",e["list-style-type"])})):console.error("Please use the Lists plugin together with the Advanced List plugin.")})}();
9
+ !function(){"use strict";function f(t,e,n){t.execCommand("UL"===e?"InsertUnorderedList":"InsertOrderedList",!1,!1===n?null:{"list-style-type":n})}function i(t){return function(){return t}}function t(t){return t}function e(){return s}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=i(!1),l=i(!0),s={fold:function(t,e){return t()},isSome:u,isNone:l,getOr:t,getOrThunk:r,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:t,orThunk:r,map:e,each:function(){},bind:e,exists:u,forall:l,filter:function(){return s},toArray:function(){return[]},toString:i("none()")};function r(t){return t()}function d(t){return t&&/^(TH|TD)$/.test(t.nodeName)}function m(c,a){return function(s){function t(t){var e,n,r,o,i,u,l;s.setActive((e=c,r=a,i=-1!==(o=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}((n=t).parents,d))?n.parents.slice(0,o):n.parents,0<(u=g.grep(i,(l=e,function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(e=t,l.$.contains(l.getBody(),e));var e}))).length&&u[0].nodeName===r))}return c.on("NodeChange",t),function(){return c.off("NodeChange",t)}}}function c(t,e,n,r,o,i){var u,l,s,c,a,d;1<i.length?(c=r,a=o,d=i,(s=t).ui.registry.addSplitButton(e,{tooltip:n,icon:"OL"===a?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(t){t(g.map(d,function(t){return{type:"choiceitem",value:"default"===t?"":t,icon:"list-"+("OL"===a?"num":"bull")+"-"+("disc"===t||"decimal"===t?"default":t),text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()})}}))},onAction:function(){return s.execCommand(c)},onItemAction:function(t,e){f(s,a,e)},select:function(e){var t,n=(t=s).dom.getParent(t.selection.getNode(),"ol,ul"),r=t.dom.getStyle(n,"listStyleType");return p(r).map(function(t){return e===t}).getOr(!1)},onSetup:m(s,a)})):(l=r,(u=t).ui.registry.addToggleButton(e,{active:!1,tooltip:n,icon:"OL"===o?"ordered-list":"unordered-list",onSetup:m(u,o),onAction:function(){return u.execCommand(l)}}))}var a=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},isSome:l,isNone:u,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return a(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:s},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},p=function(t){return null==t?s:a(t)};n.add("advlist",function(t){var n,e,r,o;t.hasPlugin("lists")?(c(e=t,"numlist","Numbered list","InsertOrderedList","OL",(r=e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"))?r.split(/[ ,]/):[]),c(e,"bullist","Bullet list","InsertUnorderedList","UL",(o=e.getParam("advlist_bullet_styles","default,circle,square"))?o.split(/[ ,]/):[]),(n=t).addCommand("ApplyUnorderedListStyle",function(t,e){f(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){f(n,"OL",e["list-style-type"])})):console.error("Please use the Lists plugin together with the Advanced List plugin.")})}();
@@ -4,16 +4,16 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
11
11
 
12
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
12
+ var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
13
 
14
14
  var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
15
15
 
16
- var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
16
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
17
17
 
18
18
  var allowHtmlInNamedAnchor = function (editor) {
19
19
  return editor.getParam('allow_html_in_named_anchor', false, 'boolean');
@@ -40,7 +40,7 @@
40
40
  var removeEmptyNamedAnchorsInSelection = function (editor) {
41
41
  var dom = editor.dom;
42
42
  global$1(dom).walk(editor.selection.getRng(), function (nodes) {
43
- global$2.each(nodes, function (node) {
43
+ global.each(nodes, function (node) {
44
44
  if (isEmptyNamedAnchor(node)) {
45
45
  dom.remove(node, false);
46
46
  }
@@ -137,7 +137,7 @@
137
137
  });
138
138
  };
139
139
 
140
- var register = function (editor) {
140
+ var register$1 = function (editor) {
141
141
  editor.addCommand('mceAnchor', function () {
142
142
  open(editor);
143
143
  });
@@ -180,7 +180,7 @@
180
180
  });
181
181
  };
182
182
 
183
- var register$1 = function (editor) {
183
+ var register = function (editor) {
184
184
  editor.ui.registry.addToggleButton('anchor', {
185
185
  icon: 'bookmark',
186
186
  tooltip: 'Anchor',
@@ -201,10 +201,10 @@
201
201
  };
202
202
 
203
203
  function Plugin () {
204
- global.add('anchor', function (editor) {
204
+ global$2.add('anchor', function (editor) {
205
205
  setup(editor);
206
- register(editor);
207
206
  register$1(editor);
207
+ register(editor);
208
208
  editor.on('PreInit', function () {
209
209
  registerFormats(editor);
210
210
  });
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),a="a:not([href])",n=function(e){return e.getAttribute("id")||e.getAttribute("name")||""},r=function(e){return(t=e)&&"a"===t.nodeName.toLowerCase()&&!e.getAttribute("href")&&""!==n(e);var t},c=function(e){var n=e.dom;t(n).walk(e.selection.getRng(),function(e){o.each(e,function(e){var t;r(t=e)&&!t.firstChild&&n.remove(e,!1)})})},u=function(e){return e.dom.getParent(e.selection.getStart(),a)},i=function(e,t){var n,o,a,r,i,l=u(e);l?(a=e,r=t,(i=l).removeAttribute("name"),i.id=r,a.addVisual(),a.undoManager.add()):(o=t,(n=e).undoManager.transact(function(){n.getParam("allow_html_in_named_anchor",!1,"boolean")||n.selection.collapse(!0),n.selection.isCollapsed()?n.insertContent(n.dom.createHTML("a",{id:o})):(c(n),n.formatter.remove("namedAnchor",null,null,!0),n.formatter.apply("namedAnchor",{value:o}),n.addVisual())})),e.focus()},l=function(o){var e,t=(e=u(o))?n(e):"";o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(e){var t,n;t=o,n=e.getData().id,(/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)?(i(t,n),1):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),0))&&e.close()}})},d=function(r){return function(e){for(var t,n,o=0;o<e.length;o++){var a=e[o];n=void 0,!(n=t=a)||n.attr("href")||!n.attr("id")&&!n.attr("name")||t.firstChild||a.attr("contenteditable",r)}}};e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",d("false")),t.serializer.addNodeFilter("a",d(null))}),(n=e).addCommand("mceAnchor",function(){l(n)}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}}),e.on("PreInit",function(){e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:function(e,t,n){return r(e)}})})})}();
9
+ !function(){"use strict";function a(e){return e.getAttribute("id")||e.getAttribute("name")||""}function c(e){return e&&"a"===e.nodeName.toLowerCase()&&!e.getAttribute("href")&&""!==a(e)}function d(e){return e.dom.getParent(e.selection.getStart(),l)}function r(e,t){var o,a,n,r,i,l=d(e);l?(n=e,r=t,(i=l).removeAttribute("name"),i.id=r,n.addVisual(),n.undoManager.add()):(a=t,(o=e).undoManager.transact(function(){var e,n;o.getParam("allow_html_in_named_anchor",!1,"boolean")||o.selection.collapse(!0),o.selection.isCollapsed()?o.insertContent(o.dom.createHTML("a",{id:a})):(n=(e=o).dom,u(n).walk(e.selection.getRng(),function(e){s.each(e,function(e){var t;c(t=e)&&!t.firstChild&&n.remove(e,!1)})}),o.formatter.remove("namedAnchor",null,null,!0),o.formatter.apply("namedAnchor",{value:a}),o.addVisual())})),e.focus()}function i(r){return function(e){for(var t,n=0;n<e.length;n++){var o=e[n],a=void 0;!(a=t=o)||a.attr("href")||!a.attr("id")&&!a.attr("name")||t.firstChild||o.attr("contenteditable",r)}}}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),s=tinymce.util.Tools.resolve("tinymce.util.Tools"),l="a:not([href])";e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",i("false")),t.serializer.addNodeFilter("a",i(null))}),(n=e).addCommand("mceAnchor",function(){var o,e,t;t=(e=d(o=n))?a(e):"",o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(e){var t=o,n=e.getData().id;(/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)?(r(t,n),0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))||e.close()}})}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}}),e.on("PreInit",function(){e.formatter.register("namedAnchor",{inline:"a",selector:l,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:c})})})}();
@@ -4,17 +4,32 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
11
11
 
12
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
12
+ var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
13
 
14
- var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
14
+ var checkRange = function (str, substr, start) {
15
+ return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
16
+ };
17
+ var contains = function (str, substr) {
18
+ return str.indexOf(substr) !== -1;
19
+ };
20
+ var startsWith = function (str, prefix) {
21
+ return checkRange(str, prefix, 0);
22
+ };
23
+
24
+ var global = tinymce.util.Tools.resolve('tinymce.Env');
25
+
26
+ var link = function () {
27
+ return /(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
28
+ };
15
29
 
30
+ var defaultLinkPattern = new RegExp('^' + link().source + '$', 'i');
16
31
  var getAutoLinkPattern = function (editor) {
17
- return editor.getParam('autolink_pattern', /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i);
32
+ return editor.getParam('autolink_pattern', defaultLinkPattern);
18
33
  };
19
34
  var getDefaultLinkTarget = function (editor) {
20
35
  return editor.getParam('default_link_target', false);
@@ -23,23 +38,29 @@
23
38
  return editor.getParam('link_default_protocol', 'http', 'string');
24
39
  };
25
40
 
26
- var rangeEqualsDelimiterOrSpace = function (rangeString, delimiter) {
27
- return rangeString === delimiter || rangeString === ' ' || rangeString.charCodeAt(0) === 160;
41
+ var rangeEqualsBracketOrSpace = function (rangeString) {
42
+ return /^[(\[{ \u00a0]$/.test(rangeString);
43
+ };
44
+ var isTextNode = function (node) {
45
+ return node.nodeType === 3;
46
+ };
47
+ var isElement = function (node) {
48
+ return node.nodeType === 1;
28
49
  };
29
- var handleEclipse = function (editor) {
30
- parseCurrentLine(editor, -1, '(');
50
+ var handleBracket = function (editor) {
51
+ return parseCurrentLine(editor, -1);
31
52
  };
32
53
  var handleSpacebar = function (editor) {
33
- parseCurrentLine(editor, 0, '');
54
+ return parseCurrentLine(editor, 0);
34
55
  };
35
56
  var handleEnter = function (editor) {
36
- parseCurrentLine(editor, -1, '');
57
+ return parseCurrentLine(editor, -1);
37
58
  };
38
59
  var scopeIndex = function (container, index) {
39
60
  if (index < 0) {
40
61
  index = 0;
41
62
  }
42
- if (container.nodeType === 3) {
63
+ if (isTextNode(container)) {
43
64
  var len = container.data.length;
44
65
  if (index > len) {
45
66
  index = len;
@@ -48,24 +69,30 @@
48
69
  return index;
49
70
  };
50
71
  var setStart = function (rng, container, offset) {
51
- if (container.nodeType !== 1 || container.hasChildNodes()) {
72
+ if (!isElement(container) || container.hasChildNodes()) {
52
73
  rng.setStart(container, scopeIndex(container, offset));
53
74
  } else {
54
75
  rng.setStartBefore(container);
55
76
  }
56
77
  };
57
78
  var setEnd = function (rng, container, offset) {
58
- if (container.nodeType !== 1 || container.hasChildNodes()) {
79
+ if (!isElement(container) || container.hasChildNodes()) {
59
80
  rng.setEnd(container, scopeIndex(container, offset));
60
81
  } else {
61
82
  rng.setEndAfter(container);
62
83
  }
63
84
  };
64
- var parseCurrentLine = function (editor, endOffset, delimiter) {
85
+ var hasProtocol = function (url) {
86
+ return /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(url);
87
+ };
88
+ var isPunctuation = function (char) {
89
+ return /[?!,.;:]/.test(char);
90
+ };
91
+ var parseCurrentLine = function (editor, endOffset) {
65
92
  var end, endContainer, bookmark, text, prev, len, rngText;
66
93
  var autoLinkPattern = getAutoLinkPattern(editor);
67
94
  var defaultLinkTarget = getDefaultLinkTarget(editor);
68
- if (editor.selection.getNode().tagName === 'A') {
95
+ if (editor.dom.getParent(editor.selection.getNode(), 'a[href]') !== null) {
69
96
  return;
70
97
  }
71
98
  var rng = editor.selection.getRng().cloneRange();
@@ -87,11 +114,11 @@
87
114
  endContainer = prev;
88
115
  } else {
89
116
  endContainer = rng.endContainer;
90
- if (endContainer.nodeType !== 3 && endContainer.firstChild) {
91
- while (endContainer.nodeType !== 3 && endContainer.firstChild) {
117
+ if (!isTextNode(endContainer) && endContainer.firstChild) {
118
+ while (!isTextNode(endContainer) && endContainer.firstChild) {
92
119
  endContainer = endContainer.firstChild;
93
120
  }
94
- if (endContainer.nodeType === 3) {
121
+ if (isTextNode(endContainer)) {
95
122
  setStart(rng, endContainer, 0);
96
123
  setEnd(rng, endContainer, endContainer.nodeValue.length);
97
124
  }
@@ -108,8 +135,8 @@
108
135
  setEnd(rng, endContainer, end >= 1 ? end - 1 : 0);
109
136
  end -= 1;
110
137
  rngText = rng.toString();
111
- } while (rngText !== ' ' && rngText !== '' && rngText.charCodeAt(0) !== 160 && end - 2 >= 0 && rngText !== delimiter);
112
- if (rangeEqualsDelimiterOrSpace(rng.toString(), delimiter)) {
138
+ } while (!rangeEqualsBracketOrSpace(rngText) && end - 2 >= 0);
139
+ if (rangeEqualsBracketOrSpace(rng.toString())) {
113
140
  setStart(rng, endContainer, end);
114
141
  setEnd(rng, endContainer, start);
115
142
  end += 1;
@@ -121,21 +148,22 @@
121
148
  setEnd(rng, endContainer, start);
122
149
  }
123
150
  text = rng.toString();
124
- if (text.charAt(text.length - 1) === '.') {
151
+ if (isPunctuation(text.charAt(text.length - 1))) {
125
152
  setEnd(rng, endContainer, start - 1);
126
153
  }
127
154
  text = rng.toString().trim();
128
155
  var matches = text.match(autoLinkPattern);
129
156
  var protocol = getDefaultLinkProtocol(editor);
130
157
  if (matches) {
131
- if (matches[1] === 'www.') {
132
- matches[1] = protocol + '://www.';
133
- } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
134
- matches[1] = 'mailto:' + matches[1];
158
+ var url = matches[0];
159
+ if (startsWith(url, 'www.')) {
160
+ url = protocol + '://' + url;
161
+ } else if (contains(url, '@') && !hasProtocol(url)) {
162
+ url = 'mailto:' + url;
135
163
  }
136
164
  bookmark = editor.selection.getBookmark();
137
165
  editor.selection.setRng(rng);
138
- editor.execCommand('createlink', false, matches[1] + matches[2]);
166
+ editor.execCommand('createlink', false, url);
139
167
  if (defaultLinkTarget !== false) {
140
168
  editor.dom.setAttrib(editor.selection.getNode(), 'target', defaultLinkTarget);
141
169
  }
@@ -150,7 +178,7 @@
150
178
  return handleEnter(editor);
151
179
  }
152
180
  });
153
- if (global$1.browser.isIE()) {
181
+ if (global.browser.isIE()) {
154
182
  editor.on('focus', function () {
155
183
  if (!autoUrlDetectState) {
156
184
  autoUrlDetectState = true;
@@ -163,8 +191,8 @@
163
191
  return;
164
192
  }
165
193
  editor.on('keypress', function (e) {
166
- if (e.keyCode === 41) {
167
- return handleEclipse(editor);
194
+ if (e.keyCode === 41 || e.keyCode === 93 || e.keyCode === 125) {
195
+ return handleBracket(editor);
168
196
  }
169
197
  });
170
198
  editor.on('keyup', function (e) {
@@ -175,7 +203,7 @@
175
203
  };
176
204
 
177
205
  function Plugin () {
178
- global.add('autolink', function (editor) {
206
+ global$1.add('autolink', function (editor) {
179
207
  setup(editor);
180
208
  });
181
209
  }
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e,t){var n;return t<0&&(t=0),3!==e.nodeType||(n=e.data.length)<t&&(t=n),t},y=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,i(t,n)):e.setStartBefore(t)},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,i(t,n)):e.setEndAfter(t)},r=function(e,t,n){var o,i,r,a,s,d,f,l=e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@(?!.*@))(.+)$/i),c=e.getParam("default_link_target",!1);if("A"!==e.selection.getNode().tagName){var g=e.selection.getRng().cloneRange();if(g.startOffset<5){if(!(s=g.endContainer.previousSibling)){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;s=g.endContainer.firstChild.nextSibling}if(d=s.length,y(g,s,d),k(g,s,d),g.endOffset<5)return;o=g.endOffset,i=s}else{if(3!==(i=g.endContainer).nodeType&&i.firstChild){for(;3!==i.nodeType&&i.firstChild;)i=i.firstChild;3===i.nodeType&&(y(g,i,0),k(g,i,i.nodeValue.length))}o=1===g.endOffset?2:g.endOffset-1-t}for(var u,h=o;y(g,i,2<=o?o-2:0),k(g,i,1<=o?o-1:0),--o," "!==(f=g.toString())&&""!==f&&160!==f.charCodeAt(0)&&0<=o-2&&f!==n;);(u=g.toString())===n||" "===u||160===u.charCodeAt(0)?(y(g,i,o),k(g,i,h),o+=1):(0===g.startOffset?y(g,i,0):y(g,i,o),k(g,i,h)),"."===(a=g.toString()).charAt(a.length-1)&&k(g,i,h-1);var m=(a=g.toString().trim()).match(l),C=e.getParam("link_default_protocol","http","string");m&&("www."===m[1]?m[1]=C+"://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),r=e.selection.getBookmark(),e.selection.setRng(g),e.execCommand("createlink",!1,m[1]+m[2]),!1!==c&&e.dom.setAttrib(e.selection.getNode(),"target",c),e.selection.moveToBookmark(r),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),o.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)})}();
9
+ !function(){"use strict";function k(e){return/^[(\[{ \u00a0]$/.test(e)}function w(e){return 3===e.nodeType}function i(e){return 1===e.nodeType}function o(e,t){var n;return t<0&&(t=0),!w(e)||(n=e.data.length)<t&&(t=n),t}function y(e,t,n){!i(t)||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)}function v(e,t,n){!i(t)||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)}function r(e,t){var n,i,o,r,a,f=e.getParam("autolink_pattern",A),s=e.getParam("default_link_target",!1);if(null===e.dom.getParent(e.selection.getNode(),"a[href]")){var d=e.selection.getRng().cloneRange();if(d.startOffset<5){if(!(r=d.endContainer.previousSibling)){if(!d.endContainer.firstChild||!d.endContainer.firstChild.nextSibling)return;r=d.endContainer.firstChild.nextSibling}if(y(d,r,a=r.length),v(d,r,a),d.endOffset<5)return;n=d.endOffset,i=r}else{if(!w(i=d.endContainer)&&i.firstChild){for(;!w(i)&&i.firstChild;)i=i.firstChild;w(i)&&(y(d,i,0),v(d,i,i.nodeValue.length))}n=1===d.endOffset?2:d.endOffset-1-t}for(var l=n;y(d,i,2<=n?n-2:0),v(d,i,1<=n?n-1:0),--n,!k(d.toString())&&0<=n-2;);k(d.toString())?(y(d,i,n),v(d,i,l),n+=1):(0===d.startOffset?y(d,i,0):y(d,i,n),v(d,i,l)),u=d.toString(),/[?!,.;:]/.test(u.charAt(u.length-1))&&v(d,i,l-1);var u,c,g,h,C=(u=d.toString().trim()).match(f),m=e.getParam("link_default_protocol","http","string");C&&((g=c=C[0]).length>=(h="www.").length&&g.substr(0,0+h.length)===h?c=m+"://"+c:-1===c.indexOf("@")||/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(c)||(c="mailto:"+c),o=e.selection.getBookmark(),e.selection.setRng(d),e.execCommand("createlink",!1,c),!1!==s&&e.dom.setAttrib(e.selection.getNode(),"target",s),e.selection.moveToBookmark(o),e.nodeChanged())}}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),A=new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-+~=.,%()\/\w]*[-+~=%()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i");e.add("autolink",function(e){var t,n;(t=e).on("keydown",function(e){if(13===e.keyCode)return r(t,-1)}),a.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){if(41===e.keyCode||93===e.keyCode||125===e.keyCode)return r(t,-1)}),t.on("keyup",function(e){if(32===e.keyCode)return r(t,0)}))})}();
@@ -4,7 +4,7 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
@@ -23,11 +23,16 @@
23
23
  };
24
24
  };
25
25
 
26
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
26
+ var hasOwnProperty = Object.hasOwnProperty;
27
+ var has = function (obj, key) {
28
+ return hasOwnProperty.call(obj, key);
29
+ };
30
+
31
+ var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
27
32
 
28
33
  var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
29
34
 
30
- var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
35
+ var global = tinymce.util.Tools.resolve('tinymce.util.Delay');
31
36
 
32
37
  var fireResizeEditor = function (editor) {
33
38
  return editor.fire('ResizeEditor');
@@ -53,7 +58,7 @@
53
58
  return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
54
59
  };
55
60
  var wait = function (editor, oldSize, times, interval, callback) {
56
- global$2.setEditorTimeout(editor, function () {
61
+ global.setEditorTimeout(editor, function () {
57
62
  resize(editor, oldSize);
58
63
  if (times--) {
59
64
  wait(editor, oldSize, times, interval, callback);
@@ -75,7 +80,15 @@
75
80
  var value = parseInt(dom.getStyle(elm, name, computed), 10);
76
81
  return isNaN(value) ? 0 : value;
77
82
  };
78
- var resize = function (editor, oldSize) {
83
+ var shouldScrollIntoView = function (trigger) {
84
+ if ((trigger === null || trigger === void 0 ? void 0 : trigger.type.toLowerCase()) === 'setcontent') {
85
+ var setContentEvent = trigger;
86
+ return setContentEvent.selection === true || setContentEvent.paste === true;
87
+ } else {
88
+ return false;
89
+ }
90
+ };
91
+ var resize = function (editor, oldSize, trigger) {
79
92
  var dom = editor.dom;
80
93
  var doc = editor.getDoc();
81
94
  if (!doc) {
@@ -116,11 +129,11 @@
116
129
  var win = editor.getWin();
117
130
  win.scrollTo(win.pageXOffset, win.pageYOffset);
118
131
  }
119
- if (editor.hasFocus()) {
120
- editor.selection.scrollIntoView(editor.selection.getNode());
132
+ if (editor.hasFocus() && shouldScrollIntoView(trigger)) {
133
+ editor.selection.scrollIntoView();
121
134
  }
122
135
  if (global$1.webkit && deltaSize < 0) {
123
- resize(editor, oldSize);
136
+ resize(editor, oldSize, trigger);
124
137
  }
125
138
  }
126
139
  };
@@ -135,8 +148,8 @@
135
148
  'min-height': 0
136
149
  });
137
150
  });
138
- editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', function () {
139
- resize(editor, oldSize);
151
+ editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', function (e) {
152
+ resize(editor, oldSize, e);
140
153
  });
141
154
  if (shouldAutoResizeOnInit(editor)) {
142
155
  editor.on('init', function () {
@@ -154,8 +167,8 @@
154
167
  };
155
168
 
156
169
  function Plugin () {
157
- global.add('autoresize', function (editor) {
158
- if (!editor.settings.hasOwnProperty('resize')) {
170
+ global$2.add('autoresize', function (editor) {
171
+ if (!has(editor.settings, 'resize')) {
159
172
  editor.settings.resize = false;
160
173
  }
161
174
  if (!editor.inline) {
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.8.2 (2021-06-23)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),y=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},a=function(e,t,n,i,o){r.setEditorTimeout(e,function(){b(e,t),n--?a(e,t,n,i,o):o&&o()},i)},p=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},v=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},b=function(e,t){var n,i,o,r,s,a,g,u,l,c,m,f=e.dom,d=e.getDoc();d&&((n=e).plugins.fullscreen&&n.plugins.fullscreen.isFullscreen()?p(e,!0):(i=d.documentElement,o=e.getParam("autoresize_bottom_margin",50,"number"),r=y(e),s=v(f,i,"margin-top",!0),a=v(f,i,"margin-bottom",!0),(g=i.offsetHeight+s+a+o)<0&&(g=0),g+(u=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight)>y(e)&&(r=g+u),(l=e.getParam("max_height",0,"number"))&&l<r?(r=l,p(e,!0)):p(e,!1),r!==t.get()&&(c=r-t.get(),f.setStyle(e.getContainer(),"height",r+"px"),t.set(r),e.fire("ResizeEditor"),h.browser.isSafari()&&h.mac&&(m=e.getWin()).scrollTo(m.pageXOffset,m.pageYOffset),e.hasFocus()&&e.selection.scrollIntoView(e.selection.getNode()),h.webkit&&c<0&&b(e,t))))};e.add("autoresize",function(e){var t,n,i,o,r,s;e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),e.inline||(s=0,r=t={get:function(){return s},set:function(e){s=e}},(o=e).addCommand("mceAutoResize",function(){b(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(){b(n,i)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){a(n,i,20,100,function(){a(n,i,5,1e3)})}))})}();
9
+ !function(){"use strict";function y(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")}function p(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))}function v(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o}var l=Object.hasOwnProperty,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),b=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),u=function(e,t,n,i,o){r.setEditorTimeout(e,function(){C(e,t),n--?u(e,t,n,i,o):o&&o()},i)},C=function(e,t,n){var i,o,r,s,a,l,u,g,c,m,f,d=e.dom,h=e.getDoc();h&&(e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()?p(e,!0):(i=h.documentElement,o=e.getParam("autoresize_bottom_margin",50,"number"),r=y(e),s=v(d,i,"margin-top",!0),a=v(d,i,"margin-bottom",!0),(l=(l=i.offsetHeight+s+a+o)<0?0:l)+(u=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight)>y(e)&&(r=l+u),(g=e.getParam("max_height",0,"number"))&&g<r?(r=g,p(e,!0)):p(e,!1),r!==t.get()&&(c=r-t.get(),d.setStyle(e.getContainer(),"height",r+"px"),t.set(r),e.fire("ResizeEditor"),b.browser.isSafari()&&b.mac&&(m=e.getWin()).scrollTo(m.pageXOffset,m.pageYOffset),!e.hasFocus()||"setcontent"!==(null==(f=n)?void 0:f.type.toLowerCase())||!0!==f.selection&&!0!==f.paste||e.selection.scrollIntoView(),b.webkit&&c<0&&C(e,t,n))))};e.add("autoresize",function(e){var t,n,i,o,r,s,a=e.settings;l.call(a,"resize")||(e.settings.resize=!1),e.inline||(s=0,r=t={get:function(){return s},set:function(e){s=e}},(o=e).addCommand("mceAutoResize",function(){C(o,r)}),i=t,(n=e).on("init",function(){var e=n.getParam("autoresize_overflow_padding",1,"number"),t=n.dom;t.setStyles(n.getDoc().documentElement,{height:"auto"}),t.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),n.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(e){C(n,i,e)}),n.getParam("autoresize_on_init",!0,"boolean")&&n.on("init",function(){u(n,i,20,100,function(){u(n,i,5,1e3)})}))})}();