@dangl/angular-material-shared 2.1.1-beta0024 → 2.2.1-beta0031

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 (179) hide show
  1. package/dangl-angular-material-shared.d.ts +1 -0
  2. package/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
  3. package/esm2020/lib/angular-material-shared.module.mjs +40 -0
  4. package/esm2020/lib/components/footer/footer.component.mjs +33 -0
  5. package/esm2020/lib/components/header/header.component.mjs +80 -0
  6. package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
  7. package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
  8. package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
  9. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  10. package/fesm2015/dangl-angular-material-shared.mjs +294 -0
  11. package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
  12. package/fesm2020/dangl-angular-material-shared.mjs +292 -0
  13. package/fesm2020/dangl-angular-material-shared.mjs.map +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/bn_BD.js +419 -0
  25. package/tinymce-assets/langs/cs.js +118 -75
  26. package/tinymce-assets/langs/cy.js +61 -18
  27. package/tinymce-assets/langs/da.js +60 -17
  28. package/tinymce-assets/langs/de.js +60 -17
  29. package/tinymce-assets/langs/eo.js +334 -138
  30. package/tinymce-assets/langs/es_ES.js +32 -2
  31. package/tinymce-assets/langs/et.js +419 -0
  32. package/tinymce-assets/langs/fa.js +60 -17
  33. package/tinymce-assets/langs/fa_IR.js +31 -1
  34. package/tinymce-assets/langs/fr_FR.js +60 -17
  35. package/tinymce-assets/langs/hu_HU.js +60 -17
  36. package/tinymce-assets/langs/hy.js +419 -0
  37. package/tinymce-assets/langs/ja.js +60 -17
  38. package/tinymce-assets/langs/kab.js +419 -0
  39. package/tinymce-assets/langs/ko_KR.js +3 -3
  40. package/tinymce-assets/langs/ku.js +415 -0
  41. package/tinymce-assets/langs/nb_NO.js +61 -18
  42. package/tinymce-assets/langs/nl.js +60 -17
  43. package/tinymce-assets/langs/pl.js +60 -17
  44. package/tinymce-assets/langs/pt_BR.js +60 -17
  45. package/tinymce-assets/langs/pt_PT.js +60 -17
  46. package/tinymce-assets/langs/ro.js +60 -17
  47. package/tinymce-assets/langs/ro_RO.js +32 -2
  48. package/tinymce-assets/langs/ru.js +60 -17
  49. package/tinymce-assets/langs/ru_RU.js +445 -0
  50. package/tinymce-assets/langs/sl.js +59 -14
  51. package/tinymce-assets/langs/ta.js +60 -17
  52. package/tinymce-assets/langs/ta_IN.js +60 -17
  53. package/tinymce-assets/langs/th_TH.js +60 -17
  54. package/tinymce-assets/langs/tr_TR.js +81 -8
  55. package/tinymce-assets/langs/vi.js +179 -21
  56. package/tinymce-assets/langs/zh_CN.js +60 -17
  57. package/tinymce-assets/plugins/advlist/plugin.js +29 -48
  58. package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
  59. package/tinymce-assets/plugins/anchor/plugin.js +8 -8
  60. package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
  61. package/tinymce-assets/plugins/autolink/plugin.js +58 -30
  62. package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
  63. package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
  64. package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
  65. package/tinymce-assets/plugins/autosave/plugin.js +9 -9
  66. package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
  67. package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
  68. package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
  69. package/tinymce-assets/plugins/charmap/plugin.js +57 -67
  70. package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
  71. package/tinymce-assets/plugins/code/plugin.js +9 -10
  72. package/tinymce-assets/plugins/code/plugin.min.js +2 -2
  73. package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
  74. package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
  75. package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
  76. package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
  77. package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
  78. package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
  79. package/tinymce-assets/plugins/directionality/plugin.js +195 -62
  80. package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
  81. package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
  82. package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
  83. package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
  84. package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
  85. package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
  86. package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
  87. package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
  88. package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
  89. package/tinymce-assets/plugins/fullscreen/plugin.js +527 -160
  90. package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
  91. package/tinymce-assets/plugins/help/plugin.js +102 -123
  92. package/tinymce-assets/plugins/help/plugin.min.js +2 -2
  93. package/tinymce-assets/plugins/hr/plugin.js +9 -10
  94. package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
  95. package/tinymce-assets/plugins/image/plugin.js +126 -117
  96. package/tinymce-assets/plugins/image/plugin.min.js +2 -2
  97. package/tinymce-assets/plugins/imagetools/plugin.js +515 -334
  98. package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
  99. package/tinymce-assets/plugins/importcss/plugin.js +50 -51
  100. package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
  101. package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
  102. package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
  103. package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
  104. package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
  105. package/tinymce-assets/plugins/link/plugin.js +131 -125
  106. package/tinymce-assets/plugins/link/plugin.min.js +2 -2
  107. package/tinymce-assets/plugins/lists/plugin.js +401 -252
  108. package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
  109. package/tinymce-assets/plugins/media/plugin.js +151 -174
  110. package/tinymce-assets/plugins/media/plugin.min.js +2 -2
  111. package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
  112. package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
  113. package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
  114. package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
  115. package/tinymce-assets/plugins/pagebreak/plugin.js +27 -30
  116. package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
  117. package/tinymce-assets/plugins/paste/plugin.js +213 -174
  118. package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
  119. package/tinymce-assets/plugins/preview/plugin.js +13 -14
  120. package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
  121. package/tinymce-assets/plugins/print/plugin.js +13 -14
  122. package/tinymce-assets/plugins/print/plugin.min.js +2 -2
  123. package/tinymce-assets/plugins/quickbars/plugin.js +67 -82
  124. package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
  125. package/tinymce-assets/plugins/save/plugin.js +9 -8
  126. package/tinymce-assets/plugins/save/plugin.min.js +2 -2
  127. package/tinymce-assets/plugins/searchreplace/plugin.js +98 -95
  128. package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
  129. package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
  130. package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
  131. package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
  132. package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
  133. package/tinymce-assets/plugins/table/plugin.js +2889 -2320
  134. package/tinymce-assets/plugins/table/plugin.min.js +2 -2
  135. package/tinymce-assets/plugins/template/plugin.js +84 -70
  136. package/tinymce-assets/plugins/template/plugin.min.js +2 -2
  137. package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
  138. package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
  139. package/tinymce-assets/plugins/textpattern/plugin.js +97 -117
  140. package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
  141. package/tinymce-assets/plugins/toc/plugin.js +31 -29
  142. package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
  143. package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
  144. package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
  145. package/tinymce-assets/plugins/visualchars/plugin.js +76 -91
  146. package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
  147. package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
  148. package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
  149. package/tinymce-assets/skins/ui/oxide/content.css +1 -1
  150. package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
  151. package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
  152. package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
  153. package/tinymce-assets/skins/ui/oxide/skin.css +42 -24
  154. package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
  155. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
  156. package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
  157. package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
  158. package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
  159. package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
  160. package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
  161. package/tinymce-assets/skins/ui/oxide-dark/skin.css +42 -24
  162. package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
  163. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
  164. package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
  165. package/tinymce-assets/themes/mobile/theme.js +2836 -3286
  166. package/tinymce-assets/themes/mobile/theme.min.js +2 -2
  167. package/tinymce-assets/themes/silver/theme.js +25505 -25418
  168. package/tinymce-assets/themes/silver/theme.min.js +2 -2
  169. package/bundles/dangl-angular-material-shared.umd.js +0 -285
  170. package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
  171. package/bundles/dangl-angular-material-shared.umd.min.js +0 -2
  172. package/bundles/dangl-angular-material-shared.umd.min.js.map +0 -1
  173. package/dangl-angular-material-shared.metadata.json +0 -1
  174. package/esm2015/lib/angular-material-shared.module.js +0 -25
  175. package/esm2015/lib/components/footer/footer.component.js +0 -27
  176. package/esm2015/lib/components/header/header.component.js +0 -67
  177. package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
  178. package/fesm2015/dangl-angular-material-shared.js +0 -259
  179. package/fesm2015/dangl-angular-material-shared.js.map +0 -1
@@ -4,40 +4,39 @@
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.7.1 (2021-03-17)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
9
  (function () {
10
10
  'use strict';
11
11
 
12
12
  var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
13
 
14
- var register = function (editor) {
14
+ var register$1 = function (editor) {
15
15
  editor.addCommand('InsertHorizontalRule', function () {
16
16
  editor.execCommand('mceInsertContent', false, '<hr />');
17
17
  });
18
18
  };
19
19
 
20
- var register$1 = function (editor) {
20
+ var register = function (editor) {
21
+ var onAction = function () {
22
+ return editor.execCommand('InsertHorizontalRule');
23
+ };
21
24
  editor.ui.registry.addButton('hr', {
22
25
  icon: 'horizontal-rule',
23
26
  tooltip: 'Horizontal line',
24
- onAction: function () {
25
- return editor.execCommand('InsertHorizontalRule');
26
- }
27
+ onAction: onAction
27
28
  });
28
29
  editor.ui.registry.addMenuItem('hr', {
29
30
  icon: 'horizontal-rule',
30
31
  text: 'Horizontal line',
31
- onAction: function () {
32
- return editor.execCommand('InsertHorizontalRule');
33
- }
32
+ onAction: onAction
34
33
  });
35
34
  };
36
35
 
37
36
  function Plugin () {
38
37
  global.add('hr', function (editor) {
39
- register(editor);
40
38
  register$1(editor);
39
+ register(editor);
41
40
  });
42
41
  }
43
42
 
@@ -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.7.1 (2021-03-17)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
- !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");n.add("hr",function(n){var o,t;(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"<hr />")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})})}();
9
+ !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(n){var o,t;function e(){return t.execCommand("InsertHorizontalRule")}(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"<hr />")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:e}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:e})})}();
@@ -4,12 +4,12 @@
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.7.1 (2021-03-17)
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$6 = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
13
 
14
14
  var __assign = function () {
15
15
  __assign = Object.assign || function __assign(t) {
@@ -24,6 +24,47 @@
24
24
  return __assign.apply(this, arguments);
25
25
  };
26
26
 
27
+ var typeOf = function (x) {
28
+ var t = typeof x;
29
+ if (x === null) {
30
+ return 'null';
31
+ } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
32
+ return 'array';
33
+ } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
34
+ return 'string';
35
+ } else {
36
+ return t;
37
+ }
38
+ };
39
+ var isType = function (type) {
40
+ return function (value) {
41
+ return typeOf(value) === type;
42
+ };
43
+ };
44
+ var isSimpleType = function (type) {
45
+ return function (value) {
46
+ return typeof value === type;
47
+ };
48
+ };
49
+ var eq = function (t) {
50
+ return function (a) {
51
+ return t === a;
52
+ };
53
+ };
54
+ var isString = isType('string');
55
+ var isObject = isType('object');
56
+ var isArray = isType('array');
57
+ var isNull = eq(null);
58
+ var isBoolean = isSimpleType('boolean');
59
+ var isNullable = function (a) {
60
+ return a === null || a === undefined;
61
+ };
62
+ var isNonNullable = function (a) {
63
+ return !isNullable(a);
64
+ };
65
+ var isFunction = isSimpleType('function');
66
+ var isNumber = isSimpleType('number');
67
+
27
68
  var noop = function () {
28
69
  };
29
70
  var constant = function (value) {
@@ -31,6 +72,9 @@
31
72
  return value;
32
73
  };
33
74
  };
75
+ var identity = function (x) {
76
+ return x;
77
+ };
34
78
  var never = constant(false);
35
79
  var always = constant(true);
36
80
 
@@ -38,20 +82,14 @@
38
82
  return NONE;
39
83
  };
40
84
  var NONE = function () {
41
- var eq = function (o) {
42
- return o.isNone();
43
- };
44
85
  var call = function (thunk) {
45
86
  return thunk();
46
87
  };
47
- var id = function (n) {
48
- return n;
49
- };
88
+ var id = identity;
50
89
  var me = {
51
90
  fold: function (n, _s) {
52
91
  return n();
53
92
  },
54
- is: never,
55
93
  isSome: never,
56
94
  isNone: always,
57
95
  getOr: id,
@@ -68,9 +106,9 @@
68
106
  bind: none,
69
107
  exists: never,
70
108
  forall: always,
71
- filter: none,
72
- equals: eq,
73
- equals_: eq,
109
+ filter: function () {
110
+ return none();
111
+ },
74
112
  toArray: function () {
75
113
  return [];
76
114
  },
@@ -90,9 +128,6 @@
90
128
  fold: function (n, s) {
91
129
  return s(a);
92
130
  },
93
- is: function (v) {
94
- return a === v;
95
- },
96
131
  isSome: always,
97
132
  isNone: never,
98
133
  getOr: constant_a,
@@ -119,14 +154,6 @@
119
154
  },
120
155
  toString: function () {
121
156
  return 'some(' + a + ')';
122
- },
123
- equals: function (o) {
124
- return o.is(a);
125
- },
126
- equals_: function (o, elementEq) {
127
- return o.fold(never, function (b) {
128
- return elementEq(a, b);
129
- });
130
157
  }
131
158
  };
132
159
  return me;
@@ -174,46 +201,6 @@
174
201
  return has(obj, key) && obj[key] !== undefined && obj[key] !== null;
175
202
  };
176
203
 
177
- var typeOf = function (x) {
178
- var t = typeof x;
179
- if (x === null) {
180
- return 'null';
181
- } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
182
- return 'array';
183
- } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
184
- return 'string';
185
- } else {
186
- return t;
187
- }
188
- };
189
- var isType = function (type) {
190
- return function (value) {
191
- return typeOf(value) === type;
192
- };
193
- };
194
- var isSimpleType = function (type) {
195
- return function (value) {
196
- return typeof value === type;
197
- };
198
- };
199
- var eq = function (t) {
200
- return function (a) {
201
- return t === a;
202
- };
203
- };
204
- var isString = isType('string');
205
- var isObject = isType('object');
206
- var isArray = isType('array');
207
- var isNull = eq(null);
208
- var isBoolean = isSimpleType('boolean');
209
- var isNullable = function (a) {
210
- return a === null || a === undefined;
211
- };
212
- var isNonNullable = function (a) {
213
- return !isNullable(a);
214
- };
215
- var isNumber = isSimpleType('number');
216
-
217
204
  var nativePush = Array.prototype.push;
218
205
  var flatten = function (xs) {
219
206
  var r = [];
@@ -241,7 +228,7 @@
241
228
  return Optional.none();
242
229
  };
243
230
 
244
- var Global = typeof window !== 'undefined' ? window : Function('return this;')();
231
+ typeof window !== 'undefined' ? window : Function('return this;')();
245
232
 
246
233
  var rawSet = function (dom, key, value) {
247
234
  if (isString(value) || isBoolean(value) || isNumber(value)) {
@@ -295,11 +282,13 @@
295
282
  fromPoint: fromPoint
296
283
  };
297
284
 
298
- var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
285
+ var global$5 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
299
286
 
300
- var global$2 = tinymce.util.Tools.resolve('tinymce.util.Promise');
287
+ var global$4 = tinymce.util.Tools.resolve('tinymce.util.Promise');
301
288
 
302
- var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');
289
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.URI');
290
+
291
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.XHR');
303
292
 
304
293
  var hasDimensions = function (editor) {
305
294
  return editor.getParam('image_dimensions', true, 'boolean');
@@ -345,9 +334,10 @@
345
334
  return Math.max(parseInt(val1, 10), parseInt(val2, 10));
346
335
  };
347
336
  var getImageSize = function (url) {
348
- return new global$2(function (callback) {
337
+ return new global$4(function (callback) {
349
338
  var img = document.createElement('img');
350
339
  var done = function (dimensions) {
340
+ img.onload = img.onerror = null;
351
341
  if (img.parentNode) {
352
342
  img.parentNode.removeChild(img);
353
343
  }
@@ -360,10 +350,10 @@
360
350
  width: width,
361
351
  height: height
362
352
  };
363
- done(global$2.resolve(dimensions));
353
+ done(global$4.resolve(dimensions));
364
354
  };
365
355
  img.onerror = function () {
366
- done(global$2.reject('Failed to get image dimensions for: ' + url));
356
+ done(global$4.reject('Failed to get image dimensions for: ' + url));
367
357
  };
368
358
  var style = img.style;
369
359
  style.visibility = 'hidden';
@@ -420,14 +410,14 @@
420
410
  };
421
411
  var createImageList = function (editor, callback) {
422
412
  var imageList = getImageList(editor);
423
- if (typeof imageList === 'string') {
424
- global$3.send({
413
+ if (isString(imageList)) {
414
+ global$2.send({
425
415
  url: imageList,
426
416
  success: function (text) {
427
417
  callback(JSON.parse(text));
428
418
  }
429
419
  });
430
- } else if (typeof imageList === 'function') {
420
+ } else if (isFunction(imageList)) {
431
421
  imageList(callback);
432
422
  } else {
433
423
  callback(imageList);
@@ -453,7 +443,7 @@
453
443
  imgElm.onerror = selectImage;
454
444
  };
455
445
  var blobToDataUri = function (blob) {
456
- return new global$2(function (resolve, reject) {
446
+ return new global$4(function (resolve, reject) {
457
447
  var reader = new FileReader();
458
448
  reader.onload = function () {
459
449
  resolve(reader.result);
@@ -467,8 +457,11 @@
467
457
  var isPlaceholderImage = function (imgElm) {
468
458
  return imgElm.nodeName === 'IMG' && (imgElm.hasAttribute('data-mce-object') || imgElm.hasAttribute('data-mce-placeholder'));
469
459
  };
460
+ var isSafeImageUrl = function (editor, src) {
461
+ return global$3.isDomSafe(src, 'img', editor.settings);
462
+ };
470
463
 
471
- var DOM = global$1.DOM;
464
+ var DOM = global$5.DOM;
472
465
  var getHspace = function (image) {
473
466
  if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) {
474
467
  return removePixelSuffix(image.style.marginLeft);
@@ -711,7 +704,7 @@
711
704
  updateAlt(image, oldData, newData);
712
705
  };
713
706
 
714
- var normalizeCss = function (editor, cssText) {
707
+ var normalizeCss$1 = function (editor, cssText) {
715
708
  var css = editor.dom.styles.parse(cssText);
716
709
  var mergedCss = mergeMargins(css);
717
710
  var compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss));
@@ -745,12 +738,12 @@
745
738
  var readImageDataFromSelection = function (editor) {
746
739
  var image = getSelectedImage(editor);
747
740
  return image ? read(function (css) {
748
- return normalizeCss(editor, css);
741
+ return normalizeCss$1(editor, css);
749
742
  }, image) : defaultData();
750
743
  };
751
744
  var insertImageAtCaret = function (editor, data) {
752
745
  var elm = create(function (css) {
753
- return normalizeCss(editor, css);
746
+ return normalizeCss$1(editor, css);
754
747
  }, data);
755
748
  editor.dom.setAttrib(elm, 'data-mce-id', '__mcenew');
756
749
  editor.focus();
@@ -782,7 +775,7 @@
782
775
  var writeImageDataToSelection = function (editor, data) {
783
776
  var image = getSelectedImage(editor);
784
777
  write(function (css) {
785
- return normalizeCss(editor, css);
778
+ return normalizeCss$1(editor, css);
786
779
  }, data, image);
787
780
  syncSrcAttr(editor, image);
788
781
  if (isFigure(image.parentNode)) {
@@ -794,15 +787,20 @@
794
787
  waitLoadImage(editor, data, image);
795
788
  }
796
789
  };
790
+ var sanitizeImageData = function (editor, data) {
791
+ var src = data.src;
792
+ return __assign(__assign({}, data), { src: isSafeImageUrl(editor, src) ? src : '' });
793
+ };
797
794
  var insertOrUpdateImage = function (editor, partialData) {
798
795
  var image = getSelectedImage(editor);
799
796
  if (image) {
800
797
  var selectedImageData = read(function (css) {
801
- return normalizeCss(editor, css);
798
+ return normalizeCss$1(editor, css);
802
799
  }, image);
803
800
  var data = __assign(__assign({}, selectedImageData), partialData);
801
+ var sanitizedData = sanitizeImageData(editor, data);
804
802
  if (data.src) {
805
- writeImageDataToSelection(editor, data);
803
+ writeImageDataToSelection(editor, sanitizedData);
806
804
  } else {
807
805
  deleteImage(editor, image);
808
806
  }
@@ -811,7 +809,6 @@
811
809
  }
812
810
  };
813
811
 
814
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
815
812
  var deep = function (old, nu) {
816
813
  var bothObjects = isObject(old) && isObject(nu);
817
814
  return bothObjects ? deepMerge(old, nu) : nu;
@@ -829,7 +826,7 @@
829
826
  for (var j = 0; j < objects.length; j++) {
830
827
  var curObject = objects[j];
831
828
  for (var key in curObject) {
832
- if (hasOwnProperty$1.call(curObject, key)) {
829
+ if (has(curObject, key)) {
833
830
  ret[key] = merger(ret[key], curObject[key]);
834
831
  }
835
832
  }
@@ -843,9 +840,9 @@
843
840
  return s.length > 0;
844
841
  };
845
842
 
846
- var global$4 = tinymce.util.Tools.resolve('tinymce.util.ImageUploader');
843
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.ImageUploader');
847
844
 
848
- var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
845
+ var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
849
846
 
850
847
  var getValue = function (item) {
851
848
  return isString(item.value) ? item.value : '';
@@ -861,7 +858,7 @@
861
858
  };
862
859
  var sanitizeList = function (list, extractValue) {
863
860
  var out = [];
864
- global$5.each(list, function (item) {
861
+ global.each(list, function (item) {
865
862
  var text = getText(item);
866
863
  if (item.menu !== undefined) {
867
864
  var items = sanitizeList(item.menu, extractValue);
@@ -879,14 +876,14 @@
879
876
  });
880
877
  return out;
881
878
  };
882
- var sanitizer = function (extracter) {
883
- if (extracter === void 0) {
884
- extracter = getValue;
879
+ var sanitizer = function (extractor) {
880
+ if (extractor === void 0) {
881
+ extractor = getValue;
885
882
  }
886
883
  return function (list) {
887
884
  if (list) {
888
885
  return Optional.from(list).map(function (list) {
889
- return sanitizeList(list, extracter);
886
+ return sanitizeList(list, extractor);
890
887
  });
891
888
  } else {
892
889
  return Optional.none();
@@ -897,7 +894,7 @@
897
894
  return sanitizer(getValue)(list);
898
895
  };
899
896
  var isGroup = function (item) {
900
- return Object.prototype.hasOwnProperty.call(item, 'items');
897
+ return has(item, 'items');
901
898
  };
902
899
  var findEntryDelegate = function (list, value) {
903
900
  return findMap(list, function (item) {
@@ -921,7 +918,7 @@
921
918
  findEntry: findEntry
922
919
  };
923
920
 
924
- var makeTab = function (_info) {
921
+ var makeTab$2 = function (_info) {
925
922
  return {
926
923
  title: 'Advanced',
927
924
  name: 'advanced',
@@ -1009,13 +1006,13 @@
1009
1006
  ]
1010
1007
  };
1011
1008
  };
1012
- var AdvTab = { makeTab: makeTab };
1009
+ var AdvTab = { makeTab: makeTab$2 };
1013
1010
 
1014
1011
  var collect = function (editor) {
1015
1012
  var urlListSanitizer = ListUtils.sanitizer(function (item) {
1016
1013
  return editor.convertURL(item.value || item.url, 'src');
1017
1014
  });
1018
- var futureImageList = new global$2(function (completer) {
1015
+ var futureImageList = new global$4(function (completer) {
1019
1016
  createImageList(editor, function (imageList) {
1020
1017
  completer(urlListSanitizer(imageList).map(function (items) {
1021
1018
  return flatten([
@@ -1119,6 +1116,12 @@
1119
1116
  label: 'Show caption'
1120
1117
  }]
1121
1118
  };
1119
+ var getDialogContainerType = function (useColumns) {
1120
+ return useColumns ? {
1121
+ type: 'grid',
1122
+ columns: 2
1123
+ } : { type: 'panel' };
1124
+ };
1122
1125
  return flatten([
1123
1126
  [imageUrl],
1124
1127
  imageList.toArray(),
@@ -1126,14 +1129,12 @@
1126
1129
  info.hasDescription ? [imageDescription] : [],
1127
1130
  info.hasImageTitle ? [imageTitle] : [],
1128
1131
  info.hasDimensions ? [imageDimensions] : [],
1129
- [{
1130
- type: 'grid',
1131
- columns: 2,
1132
+ [__assign(__assign({}, getDialogContainerType(info.classList.isSome() && info.hasImageCaption)), {
1132
1133
  items: flatten([
1133
1134
  classList.toArray(),
1134
1135
  info.hasImageCaption ? [caption] : []
1135
1136
  ])
1136
- }]
1137
+ })]
1137
1138
  ]);
1138
1139
  };
1139
1140
  var makeTab$1 = function (info) {
@@ -1148,7 +1149,7 @@
1148
1149
  makeItems: makeItems
1149
1150
  };
1150
1151
 
1151
- var makeTab$2 = function (_info) {
1152
+ var makeTab = function (_info) {
1152
1153
  var items = [{
1153
1154
  type: 'dropzone',
1154
1155
  name: 'fileinput'
@@ -1159,7 +1160,7 @@
1159
1160
  items: items
1160
1161
  };
1161
1162
  };
1162
- var UploadTab = { makeTab: makeTab$2 };
1163
+ var UploadTab = { makeTab: makeTab };
1163
1164
 
1164
1165
  var createState = function (info) {
1165
1166
  return {
@@ -1513,12 +1514,19 @@
1513
1514
  };
1514
1515
  var imageSize = function (editor) {
1515
1516
  return function (url) {
1516
- return getImageSize(editor.documentBaseURI.toAbsolute(url)).then(function (dimensions) {
1517
- return {
1518
- width: String(dimensions.width),
1519
- height: String(dimensions.height)
1520
- };
1521
- });
1517
+ if (!isSafeImageUrl(editor, url)) {
1518
+ return global$4.resolve({
1519
+ width: '',
1520
+ height: ''
1521
+ });
1522
+ } else {
1523
+ return getImageSize(editor.documentBaseURI.toAbsolute(url)).then(function (dimensions) {
1524
+ return {
1525
+ width: String(dimensions.width),
1526
+ height: String(dimensions.height)
1527
+ };
1528
+ });
1529
+ }
1522
1530
  };
1523
1531
  };
1524
1532
  var createBlobCache = function (editor) {
@@ -1542,9 +1550,9 @@
1542
1550
  editor.windowManager.alert(message);
1543
1551
  };
1544
1552
  };
1545
- var normalizeCss$1 = function (editor) {
1553
+ var normalizeCss = function (editor) {
1546
1554
  return function (cssText) {
1547
- return normalizeCss(editor, cssText);
1555
+ return normalizeCss$1(editor, cssText);
1548
1556
  };
1549
1557
  };
1550
1558
  var parseStyle = function (editor) {
@@ -1559,11 +1567,11 @@
1559
1567
  };
1560
1568
  var uploadImage = function (editor) {
1561
1569
  return function (blobInfo) {
1562
- return global$4(editor).upload([blobInfo], false).then(function (results) {
1570
+ return global$1(editor).upload([blobInfo], false).then(function (results) {
1563
1571
  if (results.length === 0) {
1564
- return global$2.reject('Failed to upload image');
1572
+ return global$4.reject('Failed to upload image');
1565
1573
  } else if (results[0].status === false) {
1566
- return global$2.reject(results[0].error.message);
1574
+ return global$4.reject(results[0].error.message);
1567
1575
  } else {
1568
1576
  return results[0];
1569
1577
  }
@@ -1577,7 +1585,7 @@
1577
1585
  addToBlobCache: addToBlobCache(editor),
1578
1586
  createBlobCache: createBlobCache(editor),
1579
1587
  alertErr: alertErr(editor),
1580
- normalizeCss: normalizeCss$1(editor),
1588
+ normalizeCss: normalizeCss(editor),
1581
1589
  parseStyle: parseStyle(editor),
1582
1590
  serializeStyle: serializeStyle(editor),
1583
1591
  uploadImage: uploadImage(editor)
@@ -1588,7 +1596,7 @@
1588
1596
  return { open: open };
1589
1597
  };
1590
1598
 
1591
- var register = function (editor) {
1599
+ var register$1 = function (editor) {
1592
1600
  editor.addCommand('mceImage', Dialog(editor).open);
1593
1601
  editor.addCommand('mceUpdateImage', function (_ui, data) {
1594
1602
  editor.undoManager.transact(function () {
@@ -1611,7 +1619,7 @@
1611
1619
  var node = nodes[i];
1612
1620
  if (hasImageClass(node)) {
1613
1621
  node.attr('contenteditable', state ? 'false' : null);
1614
- global$5.each(node.getAll('figcaption'), toggleContentEditable);
1622
+ global.each(node.getAll('figcaption'), toggleContentEditable);
1615
1623
  }
1616
1624
  }
1617
1625
  };
@@ -1623,12 +1631,13 @@
1623
1631
  });
1624
1632
  };
1625
1633
 
1626
- var register$1 = function (editor) {
1634
+ var register = function (editor) {
1627
1635
  editor.ui.registry.addToggleButton('image', {
1628
1636
  icon: 'image',
1629
1637
  tooltip: 'Insert/edit image',
1630
1638
  onAction: Dialog(editor).open,
1631
1639
  onSetup: function (buttonApi) {
1640
+ buttonApi.setActive(isNonNullable(getSelectedImage(editor)));
1632
1641
  return editor.selection.selectorChangedWithUnbind('img:not([data-mce-object],[data-mce-placeholder]),figure.image', buttonApi.setActive).unbind;
1633
1642
  }
1634
1643
  });
@@ -1645,10 +1654,10 @@
1645
1654
  };
1646
1655
 
1647
1656
  function Plugin () {
1648
- global.add('image', function (editor) {
1657
+ global$6.add('image', function (editor) {
1649
1658
  setup(editor);
1650
- register$1(editor);
1651
1659
  register(editor);
1660
+ register$1(editor);
1652
1661
  });
1653
1662
  }
1654
1663