@dangl/angular-material-shared 2.5.1-beta0012 → 2.5.1-beta0018
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.
- package/README.md +1 -7
- package/esm2022/lib/angular-material-shared.module.mjs +2 -2
- package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +16 -19
- package/fesm2022/dangl-angular-material-shared.mjs +16 -19
- package/fesm2022/dangl-angular-material-shared.mjs.map +1 -1
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +7 -8
- package/package.json +1 -1
- package/tinymce-assets/icons/default/icons.js +187 -171
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/it.js +1 -1
- package/tinymce-assets/plugins/accordion/index.js +7 -0
- package/tinymce-assets/plugins/accordion/plugin.js +1054 -0
- package/tinymce-assets/plugins/accordion/plugin.min.js +4 -0
- package/tinymce-assets/plugins/advlist/plugin.js +185 -187
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -7
- package/tinymce-assets/plugins/anchor/plugin.js +79 -81
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autolink/plugin.js +209 -194
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autoresize/plugin.js +110 -102
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -7
- package/tinymce-assets/plugins/autosave/plugin.js +125 -104
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -7
- package/tinymce-assets/plugins/charmap/plugin.js +275 -313
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -7
- package/tinymce-assets/plugins/code/plugin.js +18 -24
- package/tinymce-assets/plugins/code/plugin.min.js +2 -7
- package/tinymce-assets/plugins/codesample/plugin.js +2075 -2074
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -7
- package/tinymce-assets/plugins/directionality/plugin.js +247 -305
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -7
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1 -9424
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1 -9423
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +334 -374
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -7
- package/tinymce-assets/plugins/fullscreen/plugin.js +740 -837
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -7
- package/tinymce-assets/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/da.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/de.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/el.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/en.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/es.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/id.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/it.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/tinymce-assets/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/tinymce-assets/plugins/help/plugin.js +411 -355
- package/tinymce-assets/plugins/help/plugin.min.js +2 -7
- package/tinymce-assets/plugins/image/plugin.js +876 -1037
- package/tinymce-assets/plugins/image/plugin.min.js +2 -7
- package/tinymce-assets/plugins/importcss/plugin.js +146 -144
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -7
- package/tinymce-assets/plugins/insertdatetime/plugin.js +93 -88
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -7
- package/tinymce-assets/plugins/link/plugin.js +718 -768
- package/tinymce-assets/plugins/link/plugin.min.js +2 -7
- package/tinymce-assets/plugins/lists/plugin.js +1235 -1375
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -7
- package/tinymce-assets/plugins/media/plugin.js +614 -756
- package/tinymce-assets/plugins/media/plugin.min.js +2 -7
- package/tinymce-assets/plugins/nonbreaking/plugin.js +71 -48
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -7
- package/tinymce-assets/plugins/pagebreak/plugin.js +53 -40
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -7
- package/tinymce-assets/plugins/preview/plugin.js +36 -65
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -7
- package/tinymce-assets/plugins/quickbars/plugin.js +304 -331
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -7
- package/tinymce-assets/plugins/save/plugin.js +49 -50
- package/tinymce-assets/plugins/save/plugin.min.js +2 -7
- package/tinymce-assets/plugins/searchreplace/plugin.js +499 -571
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -7
- package/tinymce-assets/plugins/table/plugin.js +2572 -10617
- package/tinymce-assets/plugins/table/plugin.min.js +2 -7
- package/tinymce-assets/plugins/visualblocks/plugin.js +41 -46
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -7
- package/tinymce-assets/plugins/visualchars/plugin.js +346 -312
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -7
- package/tinymce-assets/plugins/wordcount/plugin.js +159 -179
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -7
- package/tinymce-assets/skins/content/dark/content.css +2 -8
- package/tinymce-assets/skins/content/dark/content.js +2 -0
- package/tinymce-assets/skins/content/dark/content.min.css +1 -7
- package/tinymce-assets/skins/content/default/content.css +0 -6
- package/tinymce-assets/skins/content/default/content.js +2 -0
- package/tinymce-assets/skins/content/default/content.min.css +0 -6
- package/tinymce-assets/skins/content/document/content.css +0 -6
- package/tinymce-assets/skins/content/document/content.js +2 -0
- package/tinymce-assets/skins/content/document/content.min.css +0 -6
- package/tinymce-assets/skins/content/tinymce-5/content.css +61 -0
- package/tinymce-assets/skins/content/tinymce-5/content.js +2 -0
- package/tinymce-assets/skins/content/tinymce-5/content.min.css +1 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.css +66 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.js +2 -0
- package/tinymce-assets/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/tinymce-assets/skins/content/writer/content.css +0 -6
- package/tinymce-assets/skins/content/writer/content.js +2 -0
- package/tinymce-assets/skins/content/writer/content.min.css +0 -6
- package/tinymce-assets/skins/ui/oxide/content.css +73 -20
- package/tinymce-assets/skins/ui/oxide/content.inline.css +73 -20
- package/tinymce-assets/skins/ui/oxide/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/content.js +2 -0
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/skin.css +1480 -435
- package/tinymce-assets/skins/ui/oxide/skin.js +2 -0
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +1 -8
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.css +71 -19
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +73 -20
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +1498 -450
- package/tinymce-assets/skins/ui/oxide-dark/skin.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +1 -8
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
- package/tinymce-assets/skins/ui/tinymce-5/content.css +785 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.css +779 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/content.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.css +4185 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.css +766 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.css +779 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.css +4185 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/tinymce-assets/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/tinymce-assets/themes/silver/theme.js +25226 -28188
- package/tinymce-assets/themes/silver/theme.min.js +2 -7
- package/tinymce-assets/plugins/bbcode/index.js +0 -7
- package/tinymce-assets/plugins/bbcode/plugin.js +0 -99
- package/tinymce-assets/plugins/bbcode/plugin.min.js +0 -9
- package/tinymce-assets/plugins/colorpicker/index.js +0 -7
- package/tinymce-assets/plugins/colorpicker/plugin.js +0 -21
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +0 -9
- package/tinymce-assets/plugins/contextmenu/index.js +0 -7
- package/tinymce-assets/plugins/contextmenu/plugin.js +0 -21
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +0 -9
- package/tinymce-assets/plugins/fullpage/index.js +0 -7
- package/tinymce-assets/plugins/fullpage/plugin.js +0 -544
- package/tinymce-assets/plugins/fullpage/plugin.min.js +0 -9
- package/tinymce-assets/plugins/hr/index.js +0 -7
- package/tinymce-assets/plugins/hr/plugin.js +0 -45
- package/tinymce-assets/plugins/hr/plugin.min.js +0 -9
- package/tinymce-assets/plugins/imagetools/index.js +0 -7
- package/tinymce-assets/plugins/imagetools/plugin.js +0 -1531
- package/tinymce-assets/plugins/imagetools/plugin.min.js +0 -9
- package/tinymce-assets/plugins/legacyoutput/index.js +0 -7
- package/tinymce-assets/plugins/legacyoutput/plugin.js +0 -199
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +0 -9
- package/tinymce-assets/plugins/noneditable/index.js +0 -7
- package/tinymce-assets/plugins/noneditable/plugin.js +0 -117
- package/tinymce-assets/plugins/noneditable/plugin.min.js +0 -9
- package/tinymce-assets/plugins/paste/index.js +0 -7
- package/tinymce-assets/plugins/paste/plugin.js +0 -1803
- package/tinymce-assets/plugins/paste/plugin.min.js +0 -9
- package/tinymce-assets/plugins/print/index.js +0 -7
- package/tinymce-assets/plugins/print/plugin.js +0 -52
- package/tinymce-assets/plugins/print/plugin.min.js +0 -9
- package/tinymce-assets/plugins/spellchecker/index.js +0 -7
- package/tinymce-assets/plugins/spellchecker/plugin.js +0 -730
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +0 -9
- package/tinymce-assets/plugins/tabfocus/index.js +0 -7
- package/tinymce-assets/plugins/tabfocus/plugin.js +0 -130
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +0 -9
- package/tinymce-assets/plugins/template/index.js +0 -7
- package/tinymce-assets/plugins/template/plugin.js +0 -591
- package/tinymce-assets/plugins/template/plugin.min.js +0 -9
- package/tinymce-assets/plugins/textcolor/index.js +0 -7
- package/tinymce-assets/plugins/textcolor/plugin.js +0 -21
- package/tinymce-assets/plugins/textcolor/plugin.min.js +0 -9
- package/tinymce-assets/plugins/textpattern/index.js +0 -7
- package/tinymce-assets/plugins/textpattern/plugin.js +0 -1374
- package/tinymce-assets/plugins/textpattern/plugin.min.js +0 -9
- package/tinymce-assets/plugins/toc/index.js +0 -7
- package/tinymce-assets/plugins/toc/plugin.js +0 -238
- package/tinymce-assets/plugins/toc/plugin.min.js +0 -9
- package/tinymce-assets/skins/ui/oxide/content.mobile.css +0 -29
- package/tinymce-assets/skins/ui/oxide/content.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/tinymce-assets/skins/ui/oxide/skin.mobile.css +0 -673
- package/tinymce-assets/skins/ui/oxide/skin.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/tinymce-assets/skins/ui/oxide-dark/content.mobile.min.css +0 -7
- package/tinymce-assets/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/tinymce-assets/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
- package/tinymce-assets/themes/mobile/index.js +0 -7
- package/tinymce-assets/themes/mobile/theme.js +0 -13130
- package/tinymce-assets/themes/mobile/theme.min.js +0 -9
|
@@ -1,171 +1,170 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Licensed under the LGPL or a commercial license.
|
|
4
|
-
* For LGPL see License.txt in the project root for license information.
|
|
5
|
-
* For commercial licenses see https://www.tiny.cloud/
|
|
6
|
-
*
|
|
7
|
-
* Version: 5.10.9 (2023-11-15)
|
|
2
|
+
* TinyMCE version 7.0.1 (2024-04-10)
|
|
8
3
|
*/
|
|
4
|
+
|
|
9
5
|
(function () {
|
|
10
6
|
'use strict';
|
|
11
7
|
|
|
12
|
-
var global$
|
|
8
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
return editor.
|
|
10
|
+
const fireInsertCustomChar = (editor, chr) => {
|
|
11
|
+
return editor.dispatch('insertCustomChar', { chr });
|
|
16
12
|
};
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const insertChar = (editor, chr) => {
|
|
15
|
+
const evtChr = fireInsertCustomChar(editor, chr).chr;
|
|
20
16
|
editor.execCommand('mceInsertContent', false, evtChr);
|
|
21
17
|
};
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
var
|
|
19
|
+
const hasProto = (v, constructor, predicate) => {
|
|
20
|
+
var _a;
|
|
21
|
+
if (predicate(v, constructor.prototype)) {
|
|
22
|
+
return true;
|
|
23
|
+
} else {
|
|
24
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const typeOf = x => {
|
|
28
|
+
const t = typeof x;
|
|
25
29
|
if (x === null) {
|
|
26
30
|
return 'null';
|
|
27
|
-
} else if (t === 'object' &&
|
|
31
|
+
} else if (t === 'object' && Array.isArray(x)) {
|
|
28
32
|
return 'array';
|
|
29
|
-
} else if (t === 'object' && (String
|
|
33
|
+
} else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
30
34
|
return 'string';
|
|
31
35
|
} else {
|
|
32
36
|
return t;
|
|
33
37
|
}
|
|
34
38
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
var isArray$1 = isType('array');
|
|
46
|
-
var isNull = eq(null);
|
|
39
|
+
const isType = type => value => typeOf(value) === type;
|
|
40
|
+
const isSimpleType = type => value => typeof value === type;
|
|
41
|
+
const eq = t => a => t === a;
|
|
42
|
+
const isArray$1 = isType('array');
|
|
43
|
+
const isNull = eq(null);
|
|
44
|
+
const isUndefined = eq(undefined);
|
|
45
|
+
const isNullable = a => a === null || a === undefined;
|
|
46
|
+
const isNonNullable = a => !isNullable(a);
|
|
47
|
+
const isFunction = isSimpleType('function');
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var constant = function (value) {
|
|
51
|
-
return function () {
|
|
49
|
+
const constant = value => {
|
|
50
|
+
return () => {
|
|
52
51
|
return value;
|
|
53
52
|
};
|
|
54
53
|
};
|
|
55
|
-
|
|
56
|
-
return x;
|
|
57
|
-
};
|
|
58
|
-
var never = constant(false);
|
|
59
|
-
var always = constant(true);
|
|
54
|
+
const never = constant(false);
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
getOrDie: function (msg) {
|
|
78
|
-
throw new Error(msg || 'error: getOrDie called on none.');
|
|
79
|
-
},
|
|
80
|
-
getOrNull: constant(null),
|
|
81
|
-
getOrUndefined: constant(undefined),
|
|
82
|
-
or: id,
|
|
83
|
-
orThunk: call,
|
|
84
|
-
map: none,
|
|
85
|
-
each: noop,
|
|
86
|
-
bind: none,
|
|
87
|
-
exists: never,
|
|
88
|
-
forall: always,
|
|
89
|
-
filter: function () {
|
|
90
|
-
return none();
|
|
91
|
-
},
|
|
92
|
-
toArray: function () {
|
|
93
|
-
return [];
|
|
94
|
-
},
|
|
95
|
-
toString: constant('none()')
|
|
96
|
-
};
|
|
97
|
-
return me;
|
|
98
|
-
}();
|
|
99
|
-
var some = function (a) {
|
|
100
|
-
var constant_a = constant(a);
|
|
101
|
-
var self = function () {
|
|
102
|
-
return me;
|
|
103
|
-
};
|
|
104
|
-
var bind = function (f) {
|
|
105
|
-
return f(a);
|
|
106
|
-
};
|
|
107
|
-
var me = {
|
|
108
|
-
fold: function (n, s) {
|
|
109
|
-
return s(a);
|
|
110
|
-
},
|
|
111
|
-
isSome: always,
|
|
112
|
-
isNone: never,
|
|
113
|
-
getOr: constant_a,
|
|
114
|
-
getOrThunk: constant_a,
|
|
115
|
-
getOrDie: constant_a,
|
|
116
|
-
getOrNull: constant_a,
|
|
117
|
-
getOrUndefined: constant_a,
|
|
118
|
-
or: self,
|
|
119
|
-
orThunk: self,
|
|
120
|
-
map: function (f) {
|
|
121
|
-
return some(f(a));
|
|
122
|
-
},
|
|
123
|
-
each: function (f) {
|
|
124
|
-
f(a);
|
|
125
|
-
},
|
|
126
|
-
bind: bind,
|
|
127
|
-
exists: bind,
|
|
128
|
-
forall: bind,
|
|
129
|
-
filter: function (f) {
|
|
130
|
-
return f(a) ? me : NONE;
|
|
131
|
-
},
|
|
132
|
-
toArray: function () {
|
|
133
|
-
return [a];
|
|
134
|
-
},
|
|
135
|
-
toString: function () {
|
|
136
|
-
return 'some(' + a + ')';
|
|
56
|
+
class Optional {
|
|
57
|
+
constructor(tag, value) {
|
|
58
|
+
this.tag = tag;
|
|
59
|
+
this.value = value;
|
|
60
|
+
}
|
|
61
|
+
static some(value) {
|
|
62
|
+
return new Optional(true, value);
|
|
63
|
+
}
|
|
64
|
+
static none() {
|
|
65
|
+
return Optional.singletonNone;
|
|
66
|
+
}
|
|
67
|
+
fold(onNone, onSome) {
|
|
68
|
+
if (this.tag) {
|
|
69
|
+
return onSome(this.value);
|
|
70
|
+
} else {
|
|
71
|
+
return onNone();
|
|
137
72
|
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
73
|
+
}
|
|
74
|
+
isSome() {
|
|
75
|
+
return this.tag;
|
|
76
|
+
}
|
|
77
|
+
isNone() {
|
|
78
|
+
return !this.tag;
|
|
79
|
+
}
|
|
80
|
+
map(mapper) {
|
|
81
|
+
if (this.tag) {
|
|
82
|
+
return Optional.some(mapper(this.value));
|
|
83
|
+
} else {
|
|
84
|
+
return Optional.none();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
bind(binder) {
|
|
88
|
+
if (this.tag) {
|
|
89
|
+
return binder(this.value);
|
|
90
|
+
} else {
|
|
91
|
+
return Optional.none();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exists(predicate) {
|
|
95
|
+
return this.tag && predicate(this.value);
|
|
96
|
+
}
|
|
97
|
+
forall(predicate) {
|
|
98
|
+
return !this.tag || predicate(this.value);
|
|
99
|
+
}
|
|
100
|
+
filter(predicate) {
|
|
101
|
+
if (!this.tag || predicate(this.value)) {
|
|
102
|
+
return this;
|
|
103
|
+
} else {
|
|
104
|
+
return Optional.none();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
getOr(replacement) {
|
|
108
|
+
return this.tag ? this.value : replacement;
|
|
109
|
+
}
|
|
110
|
+
or(replacement) {
|
|
111
|
+
return this.tag ? this : replacement;
|
|
112
|
+
}
|
|
113
|
+
getOrThunk(thunk) {
|
|
114
|
+
return this.tag ? this.value : thunk();
|
|
115
|
+
}
|
|
116
|
+
orThunk(thunk) {
|
|
117
|
+
return this.tag ? this : thunk();
|
|
118
|
+
}
|
|
119
|
+
getOrDie(message) {
|
|
120
|
+
if (!this.tag) {
|
|
121
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
122
|
+
} else {
|
|
123
|
+
return this.value;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
static from(value) {
|
|
127
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
128
|
+
}
|
|
129
|
+
getOrNull() {
|
|
130
|
+
return this.tag ? this.value : null;
|
|
131
|
+
}
|
|
132
|
+
getOrUndefined() {
|
|
133
|
+
return this.value;
|
|
134
|
+
}
|
|
135
|
+
each(worker) {
|
|
136
|
+
if (this.tag) {
|
|
137
|
+
worker(this.value);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
toArray() {
|
|
141
|
+
return this.tag ? [this.value] : [];
|
|
142
|
+
}
|
|
143
|
+
toString() {
|
|
144
|
+
return this.tag ? `some(${ this.value })` : 'none()';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
Optional.singletonNone = new Optional(false);
|
|
149
148
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
for (
|
|
155
|
-
|
|
149
|
+
const nativePush = Array.prototype.push;
|
|
150
|
+
const map = (xs, f) => {
|
|
151
|
+
const len = xs.length;
|
|
152
|
+
const r = new Array(len);
|
|
153
|
+
for (let i = 0; i < len; i++) {
|
|
154
|
+
const x = xs[i];
|
|
156
155
|
r[i] = f(x, i);
|
|
157
156
|
}
|
|
158
157
|
return r;
|
|
159
158
|
};
|
|
160
|
-
|
|
161
|
-
for (
|
|
162
|
-
|
|
159
|
+
const each = (xs, f) => {
|
|
160
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
161
|
+
const x = xs[i];
|
|
163
162
|
f(x, i);
|
|
164
163
|
}
|
|
165
164
|
};
|
|
166
|
-
|
|
167
|
-
for (
|
|
168
|
-
|
|
165
|
+
const findUntil = (xs, pred, until) => {
|
|
166
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
167
|
+
const x = xs[i];
|
|
169
168
|
if (pred(x, i)) {
|
|
170
169
|
return Optional.some(x);
|
|
171
170
|
} else if (until(x, i)) {
|
|
@@ -174,12 +173,12 @@
|
|
|
174
173
|
}
|
|
175
174
|
return Optional.none();
|
|
176
175
|
};
|
|
177
|
-
|
|
176
|
+
const find = (xs, pred) => {
|
|
178
177
|
return findUntil(xs, pred, never);
|
|
179
178
|
};
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
for (
|
|
179
|
+
const flatten = xs => {
|
|
180
|
+
const r = [];
|
|
181
|
+
for (let i = 0, len = xs.length; i < len; ++i) {
|
|
183
182
|
if (!isArray$1(xs[i])) {
|
|
184
183
|
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
|
185
184
|
}
|
|
@@ -187,22 +186,23 @@
|
|
|
187
186
|
}
|
|
188
187
|
return r;
|
|
189
188
|
};
|
|
190
|
-
|
|
191
|
-
return flatten(map(xs, f));
|
|
192
|
-
};
|
|
189
|
+
const bind = (xs, f) => flatten(map(xs, f));
|
|
193
190
|
|
|
194
|
-
var global
|
|
191
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
195
192
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
193
|
+
const option = name => editor => editor.options.get(name);
|
|
194
|
+
const register$2 = editor => {
|
|
195
|
+
const registerOption = editor.options.register;
|
|
196
|
+
const charMapProcessor = value => isFunction(value) || isArray$1(value);
|
|
197
|
+
registerOption('charmap', { processor: charMapProcessor });
|
|
198
|
+
registerOption('charmap_append', { processor: charMapProcessor });
|
|
201
199
|
};
|
|
200
|
+
const getCharMap$1 = option('charmap');
|
|
201
|
+
const getCharMapAppend = option('charmap_append');
|
|
202
202
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
const isArray = global.isArray;
|
|
204
|
+
const UserDefined = 'User Defined';
|
|
205
|
+
const getDefaultCharMap = () => {
|
|
206
206
|
return [
|
|
207
207
|
{
|
|
208
208
|
name: 'Currency',
|
|
@@ -1393,59 +1393,58 @@
|
|
|
1393
1393
|
}
|
|
1394
1394
|
];
|
|
1395
1395
|
};
|
|
1396
|
-
|
|
1397
|
-
return global
|
|
1396
|
+
const charmapFilter = charmap => {
|
|
1397
|
+
return global.grep(charmap, item => {
|
|
1398
1398
|
return isArray(item) && item.length === 2;
|
|
1399
1399
|
});
|
|
1400
1400
|
};
|
|
1401
|
-
|
|
1402
|
-
if (isArray(
|
|
1403
|
-
return charmapFilter(
|
|
1401
|
+
const getCharsFromOption = optionValue => {
|
|
1402
|
+
if (isArray(optionValue)) {
|
|
1403
|
+
return charmapFilter(optionValue);
|
|
1404
1404
|
}
|
|
1405
|
-
if (typeof
|
|
1406
|
-
return
|
|
1405
|
+
if (typeof optionValue === 'function') {
|
|
1406
|
+
return optionValue();
|
|
1407
1407
|
}
|
|
1408
1408
|
return [];
|
|
1409
1409
|
};
|
|
1410
|
-
|
|
1411
|
-
|
|
1410
|
+
const extendCharMap = (editor, charmap) => {
|
|
1411
|
+
const userCharMap = getCharMap$1(editor);
|
|
1412
1412
|
if (userCharMap) {
|
|
1413
1413
|
charmap = [{
|
|
1414
1414
|
name: UserDefined,
|
|
1415
|
-
characters:
|
|
1415
|
+
characters: getCharsFromOption(userCharMap)
|
|
1416
1416
|
}];
|
|
1417
1417
|
}
|
|
1418
|
-
|
|
1418
|
+
const userCharMapAppend = getCharMapAppend(editor);
|
|
1419
1419
|
if (userCharMapAppend) {
|
|
1420
|
-
|
|
1421
|
-
return cg.name === UserDefined;
|
|
1422
|
-
});
|
|
1420
|
+
const userDefinedGroup = global.grep(charmap, cg => cg.name === UserDefined);
|
|
1423
1421
|
if (userDefinedGroup.length) {
|
|
1424
|
-
userDefinedGroup[0].characters = [
|
|
1422
|
+
userDefinedGroup[0].characters = [
|
|
1423
|
+
...userDefinedGroup[0].characters,
|
|
1424
|
+
...getCharsFromOption(userCharMapAppend)
|
|
1425
|
+
];
|
|
1425
1426
|
return charmap;
|
|
1426
1427
|
}
|
|
1427
1428
|
return charmap.concat({
|
|
1428
1429
|
name: UserDefined,
|
|
1429
|
-
characters:
|
|
1430
|
+
characters: getCharsFromOption(userCharMapAppend)
|
|
1430
1431
|
});
|
|
1431
1432
|
}
|
|
1432
1433
|
return charmap;
|
|
1433
1434
|
};
|
|
1434
|
-
|
|
1435
|
-
|
|
1435
|
+
const getCharMap = editor => {
|
|
1436
|
+
const groups = extendCharMap(editor, getDefaultCharMap());
|
|
1436
1437
|
return groups.length > 1 ? [{
|
|
1437
1438
|
name: 'All',
|
|
1438
|
-
characters: bind(groups,
|
|
1439
|
-
return g.characters;
|
|
1440
|
-
})
|
|
1439
|
+
characters: bind(groups, g => g.characters)
|
|
1441
1440
|
}].concat(groups) : groups;
|
|
1442
1441
|
};
|
|
1443
1442
|
|
|
1444
|
-
|
|
1445
|
-
|
|
1443
|
+
const get = editor => {
|
|
1444
|
+
const getCharMap$1 = () => {
|
|
1446
1445
|
return getCharMap(editor);
|
|
1447
1446
|
};
|
|
1448
|
-
|
|
1447
|
+
const insertChar$1 = chr => {
|
|
1449
1448
|
insertChar(editor, chr);
|
|
1450
1449
|
};
|
|
1451
1450
|
return {
|
|
@@ -1454,209 +1453,162 @@
|
|
|
1454
1453
|
};
|
|
1455
1454
|
};
|
|
1456
1455
|
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1456
|
+
const Cell = initial => {
|
|
1457
|
+
let value = initial;
|
|
1458
|
+
const get = () => {
|
|
1460
1459
|
return value;
|
|
1461
1460
|
};
|
|
1462
|
-
|
|
1461
|
+
const set = v => {
|
|
1463
1462
|
value = v;
|
|
1464
1463
|
};
|
|
1465
1464
|
return {
|
|
1466
|
-
get
|
|
1467
|
-
set
|
|
1465
|
+
get,
|
|
1466
|
+
set
|
|
1468
1467
|
};
|
|
1469
1468
|
};
|
|
1470
1469
|
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1470
|
+
const last = (fn, rate) => {
|
|
1471
|
+
let timer = null;
|
|
1472
|
+
const cancel = () => {
|
|
1474
1473
|
if (!isNull(timer)) {
|
|
1475
1474
|
clearTimeout(timer);
|
|
1476
1475
|
timer = null;
|
|
1477
1476
|
}
|
|
1478
1477
|
};
|
|
1479
|
-
|
|
1480
|
-
var args = [];
|
|
1481
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1482
|
-
args[_i] = arguments[_i];
|
|
1483
|
-
}
|
|
1478
|
+
const throttle = (...args) => {
|
|
1484
1479
|
cancel();
|
|
1485
|
-
timer = setTimeout(
|
|
1480
|
+
timer = setTimeout(() => {
|
|
1486
1481
|
timer = null;
|
|
1487
1482
|
fn.apply(null, args);
|
|
1488
1483
|
}, rate);
|
|
1489
1484
|
};
|
|
1490
1485
|
return {
|
|
1491
|
-
cancel
|
|
1492
|
-
throttle
|
|
1486
|
+
cancel,
|
|
1487
|
+
throttle
|
|
1493
1488
|
};
|
|
1494
1489
|
};
|
|
1495
1490
|
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
var fromCodePoint = function () {
|
|
1501
|
-
var codePoints = [];
|
|
1502
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1503
|
-
codePoints[_i] = arguments[_i];
|
|
1504
|
-
}
|
|
1505
|
-
if (nativeFromCodePoint) {
|
|
1506
|
-
return nativeFromCodePoint.apply(void 0, codePoints);
|
|
1491
|
+
const contains = (str, substr, start = 0, end) => {
|
|
1492
|
+
const idx = str.indexOf(substr, start);
|
|
1493
|
+
if (idx !== -1) {
|
|
1494
|
+
return isUndefined(end) ? true : idx + substr.length <= end;
|
|
1507
1495
|
} else {
|
|
1508
|
-
|
|
1509
|
-
var codeLen = 0;
|
|
1510
|
-
var result = '';
|
|
1511
|
-
for (var index = 0, len = codePoints.length; index !== len; ++index) {
|
|
1512
|
-
var codePoint = +codePoints[index];
|
|
1513
|
-
if (!(codePoint < 1114111 && codePoint >>> 0 === codePoint)) {
|
|
1514
|
-
throw RangeError('Invalid code point: ' + codePoint);
|
|
1515
|
-
}
|
|
1516
|
-
if (codePoint <= 65535) {
|
|
1517
|
-
codeLen = codeUnits.push(codePoint);
|
|
1518
|
-
} else {
|
|
1519
|
-
codePoint -= 65536;
|
|
1520
|
-
codeLen = codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
|
|
1521
|
-
}
|
|
1522
|
-
if (codeLen >= 16383) {
|
|
1523
|
-
result += String.fromCharCode.apply(null, codeUnits);
|
|
1524
|
-
codeUnits.length = 0;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
return result + String.fromCharCode.apply(null, codeUnits);
|
|
1496
|
+
return false;
|
|
1528
1497
|
}
|
|
1529
1498
|
};
|
|
1499
|
+
const fromCodePoint = String.fromCodePoint;
|
|
1530
1500
|
|
|
1531
|
-
|
|
1501
|
+
const charMatches = (charCode, name, lowerCasePattern) => {
|
|
1532
1502
|
if (contains(fromCodePoint(charCode).toLowerCase(), lowerCasePattern)) {
|
|
1533
1503
|
return true;
|
|
1534
1504
|
} else {
|
|
1535
1505
|
return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\s+/g, ''), lowerCasePattern);
|
|
1536
1506
|
}
|
|
1537
1507
|
};
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
each(group.characters,
|
|
1508
|
+
const scan = (group, pattern) => {
|
|
1509
|
+
const matches = [];
|
|
1510
|
+
const lowerCasePattern = pattern.toLowerCase();
|
|
1511
|
+
each(group.characters, g => {
|
|
1542
1512
|
if (charMatches(g[0], g[1], lowerCasePattern)) {
|
|
1543
1513
|
matches.push(g);
|
|
1544
1514
|
}
|
|
1545
1515
|
});
|
|
1546
|
-
return map(matches,
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
};
|
|
1552
|
-
});
|
|
1516
|
+
return map(matches, m => ({
|
|
1517
|
+
text: m[1],
|
|
1518
|
+
value: fromCodePoint(m[0]),
|
|
1519
|
+
icon: fromCodePoint(m[0])
|
|
1520
|
+
}));
|
|
1553
1521
|
};
|
|
1554
1522
|
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
var makeTabPanel = function () {
|
|
1586
|
-
return {
|
|
1587
|
-
type: 'tabpanel',
|
|
1588
|
-
tabs: makeTabs()
|
|
1589
|
-
};
|
|
1590
|
-
};
|
|
1591
|
-
var currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');
|
|
1592
|
-
var scanAndSet = function (dialogApi, pattern) {
|
|
1593
|
-
find(charMap, function (group) {
|
|
1594
|
-
return group.name === currentTab.get();
|
|
1595
|
-
}).each(function (f) {
|
|
1596
|
-
var items = scan(f, pattern);
|
|
1523
|
+
const patternName = 'pattern';
|
|
1524
|
+
const open = (editor, charMap) => {
|
|
1525
|
+
const makeGroupItems = () => [
|
|
1526
|
+
{
|
|
1527
|
+
label: 'Search',
|
|
1528
|
+
type: 'input',
|
|
1529
|
+
name: patternName
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
type: 'collection',
|
|
1533
|
+
name: 'results'
|
|
1534
|
+
}
|
|
1535
|
+
];
|
|
1536
|
+
const makeTabs = () => map(charMap, charGroup => ({
|
|
1537
|
+
title: charGroup.name,
|
|
1538
|
+
name: charGroup.name,
|
|
1539
|
+
items: makeGroupItems()
|
|
1540
|
+
}));
|
|
1541
|
+
const makePanel = () => ({
|
|
1542
|
+
type: 'panel',
|
|
1543
|
+
items: makeGroupItems()
|
|
1544
|
+
});
|
|
1545
|
+
const makeTabPanel = () => ({
|
|
1546
|
+
type: 'tabpanel',
|
|
1547
|
+
tabs: makeTabs()
|
|
1548
|
+
});
|
|
1549
|
+
const currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');
|
|
1550
|
+
const scanAndSet = (dialogApi, pattern) => {
|
|
1551
|
+
find(charMap, group => group.name === currentTab.get()).each(f => {
|
|
1552
|
+
const items = scan(f, pattern);
|
|
1597
1553
|
dialogApi.setData({ results: items });
|
|
1598
1554
|
});
|
|
1599
1555
|
};
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1556
|
+
const SEARCH_DELAY = 40;
|
|
1557
|
+
const updateFilter = last(dialogApi => {
|
|
1558
|
+
const pattern = dialogApi.getData().pattern;
|
|
1603
1559
|
scanAndSet(dialogApi, pattern);
|
|
1604
1560
|
}, SEARCH_DELAY);
|
|
1605
|
-
|
|
1606
|
-
|
|
1561
|
+
const body = charMap.length === 1 ? makePanel() : makeTabPanel();
|
|
1562
|
+
const initialData = {
|
|
1607
1563
|
pattern: '',
|
|
1608
1564
|
results: scan(charMap[0], '')
|
|
1609
1565
|
};
|
|
1610
|
-
|
|
1566
|
+
const bridgeSpec = {
|
|
1611
1567
|
title: 'Special Character',
|
|
1612
1568
|
size: 'normal',
|
|
1613
|
-
body
|
|
1569
|
+
body,
|
|
1614
1570
|
buttons: [{
|
|
1615
1571
|
type: 'cancel',
|
|
1616
1572
|
name: 'close',
|
|
1617
1573
|
text: 'Close',
|
|
1618
1574
|
primary: true
|
|
1619
1575
|
}],
|
|
1620
|
-
initialData
|
|
1621
|
-
onAction:
|
|
1576
|
+
initialData,
|
|
1577
|
+
onAction: (api, details) => {
|
|
1622
1578
|
if (details.name === 'results') {
|
|
1623
1579
|
insertChar(editor, details.value);
|
|
1624
1580
|
api.close();
|
|
1625
1581
|
}
|
|
1626
1582
|
},
|
|
1627
|
-
onTabChange:
|
|
1583
|
+
onTabChange: (dialogApi, details) => {
|
|
1628
1584
|
currentTab.set(details.newTabName);
|
|
1629
1585
|
updateFilter.throttle(dialogApi);
|
|
1630
1586
|
},
|
|
1631
|
-
onChange:
|
|
1587
|
+
onChange: (dialogApi, changeData) => {
|
|
1632
1588
|
if (changeData.name === patternName) {
|
|
1633
1589
|
updateFilter.throttle(dialogApi);
|
|
1634
1590
|
}
|
|
1635
1591
|
}
|
|
1636
1592
|
};
|
|
1637
|
-
|
|
1593
|
+
const dialogApi = editor.windowManager.open(bridgeSpec);
|
|
1638
1594
|
dialogApi.focus(patternName);
|
|
1639
1595
|
};
|
|
1640
1596
|
|
|
1641
|
-
|
|
1642
|
-
editor.addCommand('mceShowCharmap',
|
|
1597
|
+
const register$1 = (editor, charMap) => {
|
|
1598
|
+
editor.addCommand('mceShowCharmap', () => {
|
|
1643
1599
|
open(editor, charMap);
|
|
1644
1600
|
});
|
|
1645
1601
|
};
|
|
1646
1602
|
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
var init = function (editor, all) {
|
|
1603
|
+
const init = (editor, all) => {
|
|
1650
1604
|
editor.ui.registry.addAutocompleter('charmap', {
|
|
1651
|
-
|
|
1605
|
+
trigger: ':',
|
|
1652
1606
|
columns: 'auto',
|
|
1653
1607
|
minChars: 2,
|
|
1654
|
-
fetch:
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
},
|
|
1659
|
-
onAction: function (autocompleteApi, rng, value) {
|
|
1608
|
+
fetch: (pattern, _maxResults) => new Promise((resolve, _reject) => {
|
|
1609
|
+
resolve(scan(all, pattern));
|
|
1610
|
+
}),
|
|
1611
|
+
onAction: (autocompleteApi, rng, value) => {
|
|
1660
1612
|
editor.selection.setRng(rng);
|
|
1661
1613
|
editor.insertContent(value);
|
|
1662
1614
|
autocompleteApi.hide();
|
|
@@ -1664,33 +1616,43 @@
|
|
|
1664
1616
|
});
|
|
1665
1617
|
};
|
|
1666
1618
|
|
|
1667
|
-
|
|
1619
|
+
const onSetupEditable = editor => api => {
|
|
1620
|
+
const nodeChanged = () => {
|
|
1621
|
+
api.setEnabled(editor.selection.isEditable());
|
|
1622
|
+
};
|
|
1623
|
+
editor.on('NodeChange', nodeChanged);
|
|
1624
|
+
nodeChanged();
|
|
1625
|
+
return () => {
|
|
1626
|
+
editor.off('NodeChange', nodeChanged);
|
|
1627
|
+
};
|
|
1628
|
+
};
|
|
1629
|
+
const register = editor => {
|
|
1630
|
+
const onAction = () => editor.execCommand('mceShowCharmap');
|
|
1668
1631
|
editor.ui.registry.addButton('charmap', {
|
|
1669
1632
|
icon: 'insert-character',
|
|
1670
1633
|
tooltip: 'Special character',
|
|
1671
|
-
onAction
|
|
1672
|
-
|
|
1673
|
-
}
|
|
1634
|
+
onAction,
|
|
1635
|
+
onSetup: onSetupEditable(editor)
|
|
1674
1636
|
});
|
|
1675
1637
|
editor.ui.registry.addMenuItem('charmap', {
|
|
1676
1638
|
icon: 'insert-character',
|
|
1677
1639
|
text: 'Special character...',
|
|
1678
|
-
onAction
|
|
1679
|
-
|
|
1680
|
-
}
|
|
1640
|
+
onAction,
|
|
1641
|
+
onSetup: onSetupEditable(editor)
|
|
1681
1642
|
});
|
|
1682
1643
|
};
|
|
1683
1644
|
|
|
1684
|
-
|
|
1685
|
-
global$
|
|
1686
|
-
|
|
1645
|
+
var Plugin = () => {
|
|
1646
|
+
global$1.add('charmap', editor => {
|
|
1647
|
+
register$2(editor);
|
|
1648
|
+
const charMap = getCharMap(editor);
|
|
1687
1649
|
register$1(editor, charMap);
|
|
1688
1650
|
register(editor);
|
|
1689
1651
|
init(editor, charMap[0]);
|
|
1690
1652
|
return get(editor);
|
|
1691
1653
|
});
|
|
1692
|
-
}
|
|
1654
|
+
};
|
|
1693
1655
|
|
|
1694
1656
|
Plugin();
|
|
1695
1657
|
|
|
1696
|
-
}()
|
|
1658
|
+
})();
|