@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,38 +4,45 @@
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 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
  };
31
+ var isSimpleType = function (type) {
32
+ return function (value) {
33
+ return typeof value === type;
34
+ };
35
+ };
36
+ var isString = isType$1('string');
37
+ var isBoolean = isSimpleType('boolean');
38
+ var isNullable = function (a) {
39
+ return a === null || a === undefined;
40
+ };
41
+ var isNonNullable = function (a) {
42
+ return !isNullable(a);
43
+ };
44
+ var isFunction = isSimpleType('function');
45
+ var isNumber = isSimpleType('number');
39
46
 
40
47
  var noop = function () {
41
48
  };
@@ -49,6 +56,9 @@
49
56
  return value;
50
57
  };
51
58
  };
59
+ var identity = function (x) {
60
+ return x;
61
+ };
52
62
  var never = constant(false);
53
63
  var always = constant(true);
54
64
 
@@ -56,20 +66,14 @@
56
66
  return NONE;
57
67
  };
58
68
  var NONE = function () {
59
- var eq = function (o) {
60
- return o.isNone();
61
- };
62
69
  var call = function (thunk) {
63
70
  return thunk();
64
71
  };
65
- var id = function (n) {
66
- return n;
67
- };
72
+ var id = identity;
68
73
  var me = {
69
74
  fold: function (n, _s) {
70
75
  return n();
71
76
  },
72
- is: never,
73
77
  isSome: never,
74
78
  isNone: always,
75
79
  getOr: id,
@@ -86,9 +90,9 @@
86
90
  bind: none,
87
91
  exists: never,
88
92
  forall: always,
89
- filter: none,
90
- equals: eq,
91
- equals_: eq,
93
+ filter: function () {
94
+ return none();
95
+ },
92
96
  toArray: function () {
93
97
  return [];
94
98
  },
@@ -108,9 +112,6 @@
108
112
  fold: function (n, s) {
109
113
  return s(a);
110
114
  },
111
- is: function (v) {
112
- return a === v;
113
- },
114
115
  isSome: always,
115
116
  isNone: never,
116
117
  getOr: constant_a,
@@ -137,14 +138,6 @@
137
138
  },
138
139
  toString: function () {
139
140
  return 'some(' + a + ')';
140
- },
141
- equals: function (o) {
142
- return o.is(a);
143
- },
144
- equals_: function (o, elementEq) {
145
- return o.fold(never, function (b) {
146
- return elementEq(a, b);
147
- });
148
141
  }
149
142
  };
150
143
  return me;
@@ -158,22 +151,36 @@
158
151
  from: from
159
152
  };
160
153
 
161
- var isSimpleType = function (type) {
162
- return function (value) {
163
- return typeof value === type;
164
- };
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;
165
162
  };
166
- var isNullable = function (a) {
167
- return a === null || a === undefined;
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
168
  };
169
- var isNonNullable = function (a) {
170
- return !isNullable(a);
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;
171
178
  };
172
- var isFunction = isSimpleType('function');
173
179
 
174
- var isSupported = function (dom) {
175
- return dom.style !== undefined && isFunction(dom.style.getPropertyValue);
176
- };
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.7.1 (2021-03-17)
7
+ * Version: 5.10.3 (2022-02-09)
8
8
  */
9
- !function(){"use strict";var n,t,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 function(){return n}},f=c(!1),d=c(!0),l=function(){return m},m=(n=function(n){return n.isNone()},{fold:function(n,t){return n()},is:f,isSome:f,isNone:d,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:c(null),getOrUndefined:c(undefined),or:e,orThunk:t,map:l,each:function(){},bind:l,exists:f,forall:d,filter:l,equals:n,equals_:n,toArray:function(){return[]},toString:c("none()")}),a=function(e){var n=c(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:d,isNone:f,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return a(n(e))},each:function(n){n(e)},bind:o,exists:o,forall:o,filter:function(n){return n(e)?r:m},toArray:function(){return[e]},toString:function(){return"some("+e+")"},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(f,function(n){return t(e,n)})}};return r},s={some:a,none:l,from:function(n){return null===n||n===undefined?m:a(n)}},g=function(n){return!(null===(t=n)||t===undefined);var t},h=(o="function",function(n){return typeof n===o}),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 s.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=h(Element.prototype.attachShadow)&&h(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)&&g(t.dom.host)?s.some(e):s.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&&h(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")})})}();