@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,44 +4,37 @@
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
12
  var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
13
13
 
14
- var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
15
-
16
- var setDir = function (editor, dir) {
17
- var dom = editor.dom;
18
- var curDir;
19
- var blocks = editor.selection.getSelectedBlocks();
20
- if (blocks.length) {
21
- curDir = dom.getAttrib(blocks[0], 'dir');
22
- global$1.each(blocks, function (block) {
23
- if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
24
- dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
25
- }
26
- });
27
- editor.nodeChanged();
14
+ var typeOf = function (x) {
15
+ var t = typeof x;
16
+ if (x === null) {
17
+ return 'null';
18
+ } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
19
+ return 'array';
20
+ } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
21
+ return 'string';
22
+ } else {
23
+ return t;
28
24
  }
29
25
  };
30
-
31
- var register = function (editor) {
32
- editor.addCommand('mceDirectionLTR', function () {
33
- setDir(editor, 'ltr');
34
- });
35
- editor.addCommand('mceDirectionRTL', function () {
36
- setDir(editor, 'rtl');
37
- });
26
+ var isType$1 = function (type) {
27
+ return function (value) {
28
+ return typeOf(value) === type;
29
+ };
38
30
  };
39
-
40
31
  var isSimpleType = function (type) {
41
32
  return function (value) {
42
33
  return typeof value === type;
43
34
  };
44
35
  };
36
+ var isString = isType$1('string');
37
+ var isBoolean = isSimpleType('boolean');
45
38
  var isNullable = function (a) {
46
39
  return a === null || a === undefined;
47
40
  };
@@ -49,6 +42,7 @@
49
42
  return !isNullable(a);
50
43
  };
51
44
  var isFunction = isSimpleType('function');
45
+ var isNumber = isSimpleType('number');
52
46
 
53
47
  var noop = function () {
54
48
  };
@@ -62,6 +56,9 @@
62
56
  return value;
63
57
  };
64
58
  };
59
+ var identity = function (x) {
60
+ return x;
61
+ };
65
62
  var never = constant(false);
66
63
  var always = constant(true);
67
64
 
@@ -69,20 +66,14 @@
69
66
  return NONE;
70
67
  };
71
68
  var NONE = function () {
72
- var eq = function (o) {
73
- return o.isNone();
74
- };
75
69
  var call = function (thunk) {
76
70
  return thunk();
77
71
  };
78
- var id = function (n) {
79
- return n;
80
- };
72
+ var id = identity;
81
73
  var me = {
82
74
  fold: function (n, _s) {
83
75
  return n();
84
76
  },
85
- is: never,
86
77
  isSome: never,
87
78
  isNone: always,
88
79
  getOr: id,
@@ -99,9 +90,9 @@
99
90
  bind: none,
100
91
  exists: never,
101
92
  forall: always,
102
- filter: none,
103
- equals: eq,
104
- equals_: eq,
93
+ filter: function () {
94
+ return none();
95
+ },
105
96
  toArray: function () {
106
97
  return [];
107
98
  },
@@ -121,9 +112,6 @@
121
112
  fold: function (n, s) {
122
113
  return s(a);
123
114
  },
124
- is: function (v) {
125
- return a === v;
126
- },
127
115
  isSome: always,
128
116
  isNone: never,
129
117
  getOr: constant_a,
@@ -150,14 +138,6 @@
150
138
  },
151
139
  toString: function () {
152
140
  return 'some(' + a + ')';
153
- },
154
- equals: function (o) {
155
- return o.is(a);
156
- },
157
- equals_: function (o, elementEq) {
158
- return o.fold(never, function (b) {
159
- return elementEq(a, b);
160
- });
161
141
  }
162
142
  };
163
143
  return me;
@@ -171,9 +151,36 @@
171
151
  from: from
172
152
  };
173
153
 
174
- var isSupported = function (dom) {
175
- return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
154
+ var map = function (xs, f) {
155
+ var len = xs.length;
156
+ var r = new Array(len);
157
+ for (var i = 0; i < len; i++) {
158
+ var x = xs[i];
159
+ r[i] = f(x, i);
160
+ }
161
+ return r;
176
162
  };
163
+ var each = function (xs, f) {
164
+ for (var i = 0, len = xs.length; i < len; i++) {
165
+ var x = xs[i];
166
+ f(x, i);
167
+ }
168
+ };
169
+ var filter = function (xs, pred) {
170
+ var r = [];
171
+ for (var i = 0, len = xs.length; i < len; i++) {
172
+ var x = xs[i];
173
+ if (pred(x, i)) {
174
+ r.push(x);
175
+ }
176
+ }
177
+ return r;
178
+ };
179
+
180
+ var DOCUMENT = 9;
181
+ var DOCUMENT_FRAGMENT = 11;
182
+ var ELEMENT = 1;
183
+ var TEXT = 3;
177
184
 
178
185
  var fromHtml = function (html, scope) {
179
186
  var doc = scope || document;
@@ -212,12 +219,32 @@
212
219
  fromPoint: fromPoint
213
220
  };
214
221
 
215
- var Global = typeof window !== 'undefined' ? window : Function('return this;')();
222
+ var is = function (element, selector) {
223
+ var dom = element.dom;
224
+ if (dom.nodeType !== ELEMENT) {
225
+ return false;
226
+ } else {
227
+ var elem = dom;
228
+ if (elem.matches !== undefined) {
229
+ return elem.matches(selector);
230
+ } else if (elem.msMatchesSelector !== undefined) {
231
+ return elem.msMatchesSelector(selector);
232
+ } else if (elem.webkitMatchesSelector !== undefined) {
233
+ return elem.webkitMatchesSelector(selector);
234
+ } else if (elem.mozMatchesSelector !== undefined) {
235
+ return elem.mozMatchesSelector(selector);
236
+ } else {
237
+ throw new Error('Browser lacks native selectors');
238
+ }
239
+ }
240
+ };
216
241
 
217
- var DOCUMENT = 9;
218
- var DOCUMENT_FRAGMENT = 11;
219
- var TEXT = 3;
242
+ typeof window !== 'undefined' ? window : Function('return this;')();
220
243
 
244
+ var name = function (element) {
245
+ var r = element.dom.nodeName;
246
+ return r.toLowerCase();
247
+ };
221
248
  var type = function (element) {
222
249
  return element.dom.nodeType;
223
250
  };
@@ -226,9 +253,15 @@
226
253
  return type(element) === t;
227
254
  };
228
255
  };
256
+ var isElement = isType(ELEMENT);
229
257
  var isText = isType(TEXT);
230
258
  var isDocument = isType(DOCUMENT);
231
259
  var isDocumentFragment = isType(DOCUMENT_FRAGMENT);
260
+ var isTag = function (tag) {
261
+ return function (e) {
262
+ return isElement(e) && name(e) === tag;
263
+ };
264
+ };
232
265
 
233
266
  var owner = function (element) {
234
267
  return SugarElement.fromDom(element.dom.ownerDocument);
@@ -236,6 +269,27 @@
236
269
  var documentOrOwner = function (dos) {
237
270
  return isDocument(dos) ? dos : owner(dos);
238
271
  };
272
+ var parent = function (element) {
273
+ return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
274
+ };
275
+ var children$2 = function (element) {
276
+ return map(element.dom.childNodes, SugarElement.fromDom);
277
+ };
278
+
279
+ var rawSet = function (dom, key, value) {
280
+ if (isString(value) || isBoolean(value) || isNumber(value)) {
281
+ dom.setAttribute(key, value + '');
282
+ } else {
283
+ console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);
284
+ throw new Error('Attribute value was not simple');
285
+ }
286
+ };
287
+ var set = function (element, key, value) {
288
+ rawSet(element.dom, key, value);
289
+ };
290
+ var remove = function (element, key) {
291
+ element.dom.removeAttribute(key);
292
+ };
239
293
 
240
294
  var isShadowRoot = function (dos) {
241
295
  return isDocumentFragment(dos) && isNonNullable(dos.dom.host);
@@ -263,6 +317,31 @@
263
317
  }, compose1(inBody, getShadowHost));
264
318
  };
265
319
 
320
+ var ancestor$1 = function (scope, predicate, isRoot) {
321
+ var element = scope.dom;
322
+ var stop = isFunction(isRoot) ? isRoot : never;
323
+ while (element.parentNode) {
324
+ element = element.parentNode;
325
+ var el = SugarElement.fromDom(element);
326
+ if (predicate(el)) {
327
+ return Optional.some(el);
328
+ } else if (stop(el)) {
329
+ break;
330
+ }
331
+ }
332
+ return Optional.none();
333
+ };
334
+
335
+ var ancestor = function (scope, selector, isRoot) {
336
+ return ancestor$1(scope, function (e) {
337
+ return is(e, selector);
338
+ }, isRoot);
339
+ };
340
+
341
+ var isSupported = function (dom) {
342
+ return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
343
+ };
344
+
266
345
  var get = function (element, property) {
267
346
  var dom = element.dom;
268
347
  var styles = window.getComputedStyle(dom);
@@ -277,6 +356,60 @@
277
356
  return get(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';
278
357
  };
279
358
 
359
+ var children$1 = function (scope, predicate) {
360
+ return filter(children$2(scope), predicate);
361
+ };
362
+
363
+ var children = function (scope, selector) {
364
+ return children$1(scope, function (e) {
365
+ return is(e, selector);
366
+ });
367
+ };
368
+
369
+ var getParentElement = function (element) {
370
+ return parent(element).filter(isElement);
371
+ };
372
+ var getNormalizedBlock = function (element, isListItem) {
373
+ var normalizedElement = isListItem ? ancestor(element, 'ol,ul') : Optional.some(element);
374
+ return normalizedElement.getOr(element);
375
+ };
376
+ var isListItem = isTag('li');
377
+ var setDir = function (editor, dir) {
378
+ var selectedBlocks = editor.selection.getSelectedBlocks();
379
+ if (selectedBlocks.length > 0) {
380
+ each(selectedBlocks, function (block) {
381
+ var blockElement = SugarElement.fromDom(block);
382
+ var isBlockElementListItem = isListItem(blockElement);
383
+ var normalizedBlock = getNormalizedBlock(blockElement, isBlockElementListItem);
384
+ var normalizedBlockParent = getParentElement(normalizedBlock);
385
+ normalizedBlockParent.each(function (parent) {
386
+ var parentDirection = getDirection(parent);
387
+ if (parentDirection !== dir) {
388
+ set(normalizedBlock, 'dir', dir);
389
+ } else if (getDirection(normalizedBlock) !== dir) {
390
+ remove(normalizedBlock, 'dir');
391
+ }
392
+ if (isBlockElementListItem) {
393
+ var listItems = children(normalizedBlock, 'li[dir]');
394
+ each(listItems, function (listItem) {
395
+ return remove(listItem, 'dir');
396
+ });
397
+ }
398
+ });
399
+ });
400
+ editor.nodeChanged();
401
+ }
402
+ };
403
+
404
+ var register$1 = function (editor) {
405
+ editor.addCommand('mceDirectionLTR', function () {
406
+ setDir(editor, 'ltr');
407
+ });
408
+ editor.addCommand('mceDirectionRTL', function () {
409
+ setDir(editor, 'rtl');
410
+ });
411
+ };
412
+
280
413
  var getNodeChangeHandler = function (editor, dir) {
281
414
  return function (api) {
282
415
  var nodeChangeHandler = function (e) {
@@ -289,7 +422,7 @@
289
422
  };
290
423
  };
291
424
  };
292
- var register$1 = function (editor) {
425
+ var register = function (editor) {
293
426
  editor.ui.registry.addToggleButton('ltr', {
294
427
  tooltip: 'Left to right',
295
428
  icon: 'ltr',
@@ -310,8 +443,8 @@
310
443
 
311
444
  function Plugin () {
312
445
  global.add('directionality', function (editor) {
313
- register(editor);
314
446
  register$1(editor);
447
+ register(editor);
315
448
  });
316
449
  }
317
450
 
@@ -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 t,n,e,o,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n,t){var e,o=n.dom,r=n.selection.getSelectedBlocks();r.length&&(e=o.getAttrib(r[0],"dir"),u.each(r,function(n){o.getParent(n.parentNode,'*[dir="'+t+'"]',o.getRoot())||o.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},c=function(n){return!(null===(t=n)||t===undefined);var t},f=function(n){return typeof n===t},d=function(n){return function(){return n}},l=d(!(t="function")),m=d(!0),a=function(){return s},s=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:l,isSome:l,isNone:m,getOr:o=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:d(null),getOrUndefined:d(undefined),or:o,orThunk:e,map:a,each:function(){},bind:a,exists:l,forall:m,filter:a,equals:n,equals_:n,toArray:function(){return[]},toString:d("none()")}),g=function(e){var n=d(e),t=function(){return r},o=function(n){return n(e)},r={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:m,isNone:l,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return g(n(e))},each:function(n){n(e)},bind:o,exists:o,forall:o,filter:function(n){return n(e)?r:s},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(l,function(n){return t(e,n)})}};return r},h={some:g,none:a,from:function(n){return null===n||n===undefined?s:g(n)}},v=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:n}},y={fromHtml:function(n,t){var e=(t||document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return v(e.childNodes[0])},fromTag:function(n,t){var e=(t||document).createElement(n);return v(e)},fromText:function(n,t){var e=(t||document).createTextNode(n);return v(e)},fromDom:v,fromPoint:function(n,t,e){return h.from(n.dom.elementFromPoint(t,e)).map(v)}},p=("undefined"!=typeof window||Function("return this;")(),function(t){return function(n){return n.dom.nodeType===t}}),T=p(3),N=p(9),D=p(11),w=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode)?function(n){return y.fromDom(n.dom.getRootNode())}:function(n){return N(n)?n:(t=n,y.fromDom(t.dom.ownerDocument));var t},O=function(n){var t,e=w(n);return D(t=e)&&c(t.dom.host)?h.some(e):h.none()},C=function(n){return y.fromDom(n.dom.host)},S=function(n){var t=T(n)?n.dom.parentNode:n.dom;if(t===undefined||null===t||null===t.ownerDocument)return!1;var e,o,r=t.ownerDocument;return O(y.fromDom(t)).fold(function(){return r.body.contains(t)},(e=S,o=C,function(n){return e(o(n))}))},L=function(n,t){return(e=n).style!==undefined&&f(e.style.getPropertyValue)?n.style.getPropertyValue(t):"";var e},R=function(n){return"rtl"===(e="direction",o=(t=n).dom,""!==(r=window.getComputedStyle(o).getPropertyValue(e))||S(t)?r:L(o,e))?"rtl":"ltr";var t,e,o,r},A=function(t,o){return function(e){var n=function(n){var t=y.fromDom(n.element);e.setActive(R(t)===o)};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}};r.add("directionality",function(n){var t,e;(t=n).addCommand("mceDirectionLTR",function(){i(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){i(t,"rtl")}),(e=n).ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return e.execCommand("mceDirectionLTR")},onSetup:A(e,"ltr")}),e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return e.execCommand("mceDirectionRTL")},onSetup:A(e,"rtl")})})}();
9
+ !function(){"use strict";function n(t){return function(n){return typeof n===t}}function u(n){return function(){return n}}function t(n){return n}function r(){return d}var o,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n){return r=typeof(t=n),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===o;var t,r},c=n("boolean"),f=n("function"),l=n("number"),a=u(!(o="string")),m=u(!0),d={fold:function(n,t){return n()},isSome:a,isNone:m,getOr:t,getOrThunk:s,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:u(null),getOrUndefined:u(void 0),or:t,orThunk:s,map:r,each:function(){},bind:r,exists:a,forall:m,filter:function(){return d},toArray:function(){return[]},toString:u("none()")};function s(n){return n()}function g(n,t){for(var r=0,o=n.length;r<o;r++)t(n[r],r)}function h(n,t){var r=n.dom;if(1!==r.nodeType)return!1;var o=r;if(void 0!==o.matches)return o.matches(t);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(t);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(t);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}function v(n){if(null==n)throw new Error("Node cannot be null or undefined");return{dom:n}}var p=function(r){function n(){return e}function t(n){return n(r)}var o=u(r),e={fold:function(n,t){return t(r)},isSome:m,isNone:a,getOr:o,getOrThunk:o,getOrDie:o,getOrNull:o,getOrUndefined:o,or:n,orThunk:n,map:function(n){return p(n(r))},each:function(n){n(r)},bind:t,exists:t,forall:t,filter:function(n){return n(r)?e:d},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return e},y={some:p,none:r,from:function(n){return null==n?d:p(n)}},w={fromHtml:function(n,t){var r=(t||document).createElement("div");if(r.innerHTML=n,!r.hasChildNodes()||1<r.childNodes.length)throw console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return v(r.childNodes[0])},fromTag:function(n,t){var r=(t||document).createElement(n);return v(r)},fromText:function(n,t){var r=(t||document).createTextNode(n);return v(r)},fromDom:v,fromPoint:function(n,t,r){return y.from(n.dom.elementFromPoint(t,r)).map(v)}};function D(t){return function(n){return n.dom.nodeType===t}}function N(n,t,r){!function(n,t,r){if(!(i(r)||c(r)||l(r)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",n),new Error("Attribute value was not simple");n.setAttribute(t,r+"")}(n.dom,t,r)}function T(n,t){n.dom.removeAttribute(t)}function S(n){return w.fromDom(n.dom.host)}function b(e,u,n){return function(n){for(var t=e.dom,r=f(n)?n:a;t.parentNode;){var t=t.parentNode,o=w.fromDom(t);if(h(o,u))return y.some(o);if(r(o))break}return y.none()}(n)}function O(n){return"rtl"===(r="direction",o=(t=n).dom,""!==(e=window.getComputedStyle(o).getPropertyValue(r))||B(t)?e:H(o,r))?"rtl":"ltr";var t,r,o,e}function A(n,t){return r=function(n){return h(n,t)},function(n,t){for(var r=[],o=0,e=n.length;o<e;o++){var u=n[o];t(u,o)&&r.push(u)}return r}(function(n,t){for(var r=n.length,o=new Array(r),e=0;e<r;e++){var u=n[e];o[e]=t(u,e)}return o}(n.dom.childNodes,w.fromDom),r);var r}function C(n,u){var t=n.selection.getSelectedBlocks();0<t.length&&(g(t,function(n){var t,r=w.fromDom(n),o=k(r),e=(t=r,(o?b(t,"ol,ul"):y.some(t)).getOr(t));y.from(e.dom.parentNode).map(w.fromDom).filter(E).each(function(n){O(n)!==u?N(e,"dir",u):O(e)!==u&&T(e,"dir"),o&&g(A(e,"li[dir]"),function(n){return T(n,"dir"),0})})}),n.nodeChanged())}function M(t,o){return function(r){function n(n){var t=w.fromDom(n.element);r.setActive(O(t)===o)}return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}}"undefined"!=typeof window||Function("return this;")();function k(n){return E(n)&&"li"===n.dom.nodeName.toLowerCase()}var E=D(1),L=D(3),P=D(9),R=D(11),x=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode)?function(n){return w.fromDom(n.dom.getRootNode())}:function(n){return P(n)?n:w.fromDom(n.dom.ownerDocument)},B=function(n){var t=L(n)?n.dom.parentNode:n.dom;if(null==t||null===t.ownerDocument)return!1;var r,o,e,u,i,c=t.ownerDocument;return e=w.fromDom(t),i=x(e),(R(u=i)&&null!=u.dom.host?y.some(i):y.none()).fold(function(){return c.body.contains(t)},(r=B,o=S,function(n){return r(o(n))}))},H=function(n,t){return void 0!==n.style&&f(n.style.getPropertyValue)?n.style.getPropertyValue(t):""};e.add("directionality",function(n){var t,r;(t=n).addCommand("mceDirectionLTR",function(){C(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){C(t,"rtl")}),(r=n).ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return r.execCommand("mceDirectionLTR")},onSetup:M(r,"ltr")}),r.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return r.execCommand("mceDirectionRTL")},onSetup:M(r,"rtl")})})}();