@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.
- package/{esm2015/dangl-angular-material-shared.js → esm2020/dangl-angular-material-shared.mjs} +0 -0
- package/esm2020/lib/angular-material-shared.module.mjs +38 -0
- package/esm2020/lib/components/footer/footer.component.mjs +33 -0
- package/esm2020/lib/components/header/header.component.mjs +80 -0
- package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +104 -0
- package/{esm2015/lib/models/footer-options.js → esm2020/lib/models/footer-options.mjs} +0 -0
- package/{esm2015/lib/utils/guid-generator.js → esm2020/lib/utils/guid-generator.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/fesm2015/dangl-angular-material-shared.mjs +292 -0
- package/fesm2015/dangl-angular-material-shared.mjs.map +1 -0
- package/fesm2020/dangl-angular-material-shared.mjs +290 -0
- package/fesm2020/dangl-angular-material-shared.mjs.map +1 -0
- package/{dangl-angular-material-shared.d.ts → index.d.ts} +1 -0
- package/lib/angular-material-shared.module.d.ts +12 -0
- package/lib/components/footer/footer.component.d.ts +3 -0
- package/lib/components/header/header.component.d.ts +3 -0
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +3 -0
- package/package.json +28 -16
- package/styles/material-style.scss +1 -1
- package/styles/material-theme.scss +4 -3
- package/styles/material-variables.scss +9 -8
- package/tinymce-assets/icons/default/icons.js +11 -1
- package/tinymce-assets/icons/default/icons.min.js +1 -1
- package/tinymce-assets/langs/cs.js +118 -75
- package/tinymce-assets/langs/cy.js +61 -18
- package/tinymce-assets/langs/da.js +60 -17
- package/tinymce-assets/langs/de.js +60 -17
- package/tinymce-assets/langs/eo.js +334 -138
- package/tinymce-assets/langs/es_ES.js +32 -2
- package/tinymce-assets/langs/fa.js +60 -17
- package/tinymce-assets/langs/fa_IR.js +31 -1
- package/tinymce-assets/langs/fr_FR.js +60 -17
- package/tinymce-assets/langs/hu_HU.js +60 -17
- package/tinymce-assets/langs/ja.js +60 -17
- package/tinymce-assets/langs/ko_KR.js +3 -3
- package/tinymce-assets/langs/nb_NO.js +61 -18
- package/tinymce-assets/langs/nl.js +60 -17
- package/tinymce-assets/langs/pl.js +60 -17
- package/tinymce-assets/langs/pt_BR.js +60 -17
- package/tinymce-assets/langs/pt_PT.js +60 -17
- package/tinymce-assets/langs/ro.js +60 -17
- package/tinymce-assets/langs/ro_RO.js +32 -2
- package/tinymce-assets/langs/ru.js +60 -17
- package/tinymce-assets/langs/ru_RU.js +445 -0
- package/tinymce-assets/langs/sl.js +59 -14
- package/tinymce-assets/langs/ta.js +60 -17
- package/tinymce-assets/langs/ta_IN.js +60 -17
- package/tinymce-assets/langs/th_TH.js +60 -17
- package/tinymce-assets/langs/tr_TR.js +81 -8
- package/tinymce-assets/langs/vi.js +179 -21
- package/tinymce-assets/langs/zh_CN.js +60 -17
- package/tinymce-assets/plugins/advlist/plugin.js +29 -48
- package/tinymce-assets/plugins/advlist/plugin.min.js +2 -2
- package/tinymce-assets/plugins/anchor/plugin.js +8 -8
- package/tinymce-assets/plugins/anchor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autolink/plugin.js +58 -30
- package/tinymce-assets/plugins/autolink/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autoresize/plugin.js +25 -12
- package/tinymce-assets/plugins/autoresize/plugin.min.js +2 -2
- package/tinymce-assets/plugins/autosave/plugin.js +9 -9
- package/tinymce-assets/plugins/autosave/plugin.min.js +2 -2
- package/tinymce-assets/plugins/bbcode/plugin.js +6 -6
- package/tinymce-assets/plugins/bbcode/plugin.min.js +2 -2
- package/tinymce-assets/plugins/charmap/plugin.js +39 -49
- package/tinymce-assets/plugins/charmap/plugin.min.js +2 -2
- package/tinymce-assets/plugins/code/plugin.js +9 -10
- package/tinymce-assets/plugins/code/plugin.min.js +2 -2
- package/tinymce-assets/plugins/codesample/plugin.js +1921 -1914
- package/tinymce-assets/plugins/codesample/plugin.min.js +2 -2
- package/tinymce-assets/plugins/colorpicker/plugin.js +1 -2
- package/tinymce-assets/plugins/colorpicker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/contextmenu/plugin.js +1 -2
- package/tinymce-assets/plugins/contextmenu/plugin.min.js +2 -2
- package/tinymce-assets/plugins/directionality/plugin.js +186 -53
- package/tinymce-assets/plugins/directionality/plugin.min.js +2 -2
- package/tinymce-assets/plugins/emoticons/js/emojiimages.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/js/emojis.js +1572 -1572
- package/tinymce-assets/plugins/emoticons/js/emojis.min.js +1 -1
- package/tinymce-assets/plugins/emoticons/plugin.js +231 -200
- package/tinymce-assets/plugins/emoticons/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullpage/plugin.js +42 -42
- package/tinymce-assets/plugins/fullpage/plugin.min.js +2 -2
- package/tinymce-assets/plugins/fullscreen/plugin.js +496 -129
- package/tinymce-assets/plugins/fullscreen/plugin.min.js +2 -2
- package/tinymce-assets/plugins/help/plugin.js +101 -122
- package/tinymce-assets/plugins/help/plugin.min.js +2 -2
- package/tinymce-assets/plugins/hr/plugin.js +9 -10
- package/tinymce-assets/plugins/hr/plugin.min.js +2 -2
- package/tinymce-assets/plugins/image/plugin.js +78 -73
- package/tinymce-assets/plugins/image/plugin.min.js +2 -2
- package/tinymce-assets/plugins/imagetools/plugin.js +484 -307
- package/tinymce-assets/plugins/imagetools/plugin.min.js +2 -2
- package/tinymce-assets/plugins/importcss/plugin.js +50 -51
- package/tinymce-assets/plugins/importcss/plugin.min.js +2 -2
- package/tinymce-assets/plugins/insertdatetime/plugin.js +22 -17
- package/tinymce-assets/plugins/insertdatetime/plugin.min.js +2 -2
- package/tinymce-assets/plugins/legacyoutput/plugin.js +8 -8
- package/tinymce-assets/plugins/legacyoutput/plugin.min.js +2 -2
- package/tinymce-assets/plugins/link/plugin.js +131 -125
- package/tinymce-assets/plugins/link/plugin.min.js +2 -2
- package/tinymce-assets/plugins/lists/plugin.js +256 -229
- package/tinymce-assets/plugins/lists/plugin.min.js +2 -2
- package/tinymce-assets/plugins/media/plugin.js +124 -147
- package/tinymce-assets/plugins/media/plugin.min.js +2 -2
- package/tinymce-assets/plugins/nonbreaking/plugin.js +13 -14
- package/tinymce-assets/plugins/nonbreaking/plugin.min.js +2 -2
- package/tinymce-assets/plugins/noneditable/plugin.js +6 -6
- package/tinymce-assets/plugins/noneditable/plugin.min.js +2 -2
- package/tinymce-assets/plugins/pagebreak/plugin.js +16 -17
- package/tinymce-assets/plugins/pagebreak/plugin.min.js +2 -2
- package/tinymce-assets/plugins/paste/plugin.js +196 -157
- package/tinymce-assets/plugins/paste/plugin.min.js +2 -2
- package/tinymce-assets/plugins/preview/plugin.js +13 -14
- package/tinymce-assets/plugins/preview/plugin.min.js +2 -2
- package/tinymce-assets/plugins/print/plugin.js +13 -14
- package/tinymce-assets/plugins/print/plugin.min.js +2 -2
- package/tinymce-assets/plugins/quickbars/plugin.js +33 -48
- package/tinymce-assets/plugins/quickbars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/save/plugin.js +9 -8
- package/tinymce-assets/plugins/save/plugin.min.js +2 -2
- package/tinymce-assets/plugins/searchreplace/plugin.js +73 -70
- package/tinymce-assets/plugins/searchreplace/plugin.min.js +2 -2
- package/tinymce-assets/plugins/spellchecker/plugin.js +22 -23
- package/tinymce-assets/plugins/spellchecker/plugin.min.js +2 -2
- package/tinymce-assets/plugins/tabfocus/plugin.js +21 -20
- package/tinymce-assets/plugins/tabfocus/plugin.min.js +2 -2
- package/tinymce-assets/plugins/table/plugin.js +2831 -2264
- package/tinymce-assets/plugins/table/plugin.min.js +2 -2
- package/tinymce-assets/plugins/template/plugin.js +84 -70
- package/tinymce-assets/plugins/template/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textcolor/plugin.js +1 -2
- package/tinymce-assets/plugins/textcolor/plugin.min.js +2 -2
- package/tinymce-assets/plugins/textpattern/plugin.js +76 -96
- package/tinymce-assets/plugins/textpattern/plugin.min.js +2 -2
- package/tinymce-assets/plugins/toc/plugin.js +31 -29
- package/tinymce-assets/plugins/toc/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualblocks/plugin.js +10 -11
- package/tinymce-assets/plugins/visualblocks/plugin.min.js +2 -2
- package/tinymce-assets/plugins/visualchars/plugin.js +52 -67
- package/tinymce-assets/plugins/visualchars/plugin.min.js +2 -2
- package/tinymce-assets/plugins/wordcount/plugin.js +67 -58
- package/tinymce-assets/plugins/wordcount/plugin.min.js +2 -2
- package/tinymce-assets/skins/ui/oxide/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.inline.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/content.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.css +35 -22
- package/tinymce-assets/skins/ui/oxide-dark/skin.min.css +1 -1
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.css +7 -7
- package/tinymce-assets/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -1
- package/tinymce-assets/themes/mobile/theme.js +2798 -3255
- package/tinymce-assets/themes/mobile/theme.min.js +2 -2
- package/tinymce-assets/themes/silver/theme.js +25400 -25371
- package/tinymce-assets/themes/silver/theme.min.js +2 -2
- package/bundles/dangl-angular-material-shared.umd.js +0 -285
- package/bundles/dangl-angular-material-shared.umd.js.map +0 -1
- package/dangl-angular-material-shared.metadata.json +0 -1
- package/esm2015/lib/angular-material-shared.module.js +0 -25
- package/esm2015/lib/components/footer/footer.component.js +0 -27
- package/esm2015/lib/components/header/header.component.js +0 -67
- package/esm2015/lib/components/tiny-mce/tiny-mce.component.js +0 -100
- package/fesm2015/dangl-angular-material-shared.js +0 -259
- package/fesm2015/dangl-angular-material-shared.js.map +0 -1
|
@@ -4,12 +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.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
-
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
12
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
13
|
+
|
|
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;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var isType = function (type) {
|
|
27
|
+
return function (value) {
|
|
28
|
+
return typeOf(value) === type;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
var isSimpleType = function (type) {
|
|
32
|
+
return function (value) {
|
|
33
|
+
return typeof value === type;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
var isString = isType('string');
|
|
37
|
+
var isFunction = isSimpleType('function');
|
|
13
38
|
|
|
14
39
|
var noop = function () {
|
|
15
40
|
};
|
|
@@ -18,6 +43,9 @@
|
|
|
18
43
|
return value;
|
|
19
44
|
};
|
|
20
45
|
};
|
|
46
|
+
var identity = function (x) {
|
|
47
|
+
return x;
|
|
48
|
+
};
|
|
21
49
|
function curry(fn) {
|
|
22
50
|
var initialArgs = [];
|
|
23
51
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
@@ -35,7 +63,7 @@
|
|
|
35
63
|
var never = constant(false);
|
|
36
64
|
var always = constant(true);
|
|
37
65
|
|
|
38
|
-
var global$
|
|
66
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
39
67
|
|
|
40
68
|
var global$2 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
|
41
69
|
|
|
@@ -92,11 +120,13 @@
|
|
|
92
120
|
return value;
|
|
93
121
|
};
|
|
94
122
|
var getDateTime = function (editor, fmt, date) {
|
|
123
|
+
if (date === void 0) {
|
|
124
|
+
date = new Date();
|
|
125
|
+
}
|
|
95
126
|
var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
|
96
127
|
var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
|
97
128
|
var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
|
98
129
|
var monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
|
99
|
-
date = date || new Date();
|
|
100
130
|
fmt = fmt.replace('%D', '%m/%d/%Y');
|
|
101
131
|
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
|
102
132
|
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
|
@@ -119,11 +149,9 @@
|
|
|
119
149
|
var createTemplateList = function (editor, callback) {
|
|
120
150
|
return function () {
|
|
121
151
|
var templateList = getTemplates(editor);
|
|
122
|
-
if (
|
|
152
|
+
if (isFunction(templateList)) {
|
|
123
153
|
templateList(callback);
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
if (typeof templateList === 'string') {
|
|
154
|
+
} else if (isString(templateList)) {
|
|
127
155
|
global$2.send({
|
|
128
156
|
url: templateList,
|
|
129
157
|
success: function (text) {
|
|
@@ -136,21 +164,21 @@
|
|
|
136
164
|
};
|
|
137
165
|
};
|
|
138
166
|
var replaceTemplateValues = function (html, templateValues) {
|
|
139
|
-
global$
|
|
140
|
-
if (
|
|
167
|
+
global$3.each(templateValues, function (v, k) {
|
|
168
|
+
if (isFunction(v)) {
|
|
141
169
|
v = v(k);
|
|
142
170
|
}
|
|
143
171
|
html = html.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v);
|
|
144
172
|
});
|
|
145
173
|
return html;
|
|
146
174
|
};
|
|
147
|
-
var replaceVals = function (editor,
|
|
175
|
+
var replaceVals = function (editor, scope) {
|
|
148
176
|
var dom = editor.dom, vl = getTemplateReplaceValues(editor);
|
|
149
|
-
global$
|
|
150
|
-
global$
|
|
177
|
+
global$3.each(dom.select('*', scope), function (e) {
|
|
178
|
+
global$3.each(vl, function (v, k) {
|
|
151
179
|
if (dom.hasClass(e, k)) {
|
|
152
|
-
if (
|
|
153
|
-
|
|
180
|
+
if (isFunction(v)) {
|
|
181
|
+
v(e);
|
|
154
182
|
}
|
|
155
183
|
}
|
|
156
184
|
});
|
|
@@ -160,17 +188,16 @@
|
|
|
160
188
|
return new RegExp('\\b' + c + '\\b', 'g').test(n.className);
|
|
161
189
|
};
|
|
162
190
|
var insertTemplate = function (editor, _ui, html) {
|
|
163
|
-
var el;
|
|
164
191
|
var dom = editor.dom;
|
|
165
192
|
var sel = editor.selection.getContent();
|
|
166
193
|
html = replaceTemplateValues(html, getTemplateReplaceValues(editor));
|
|
167
|
-
el = dom.create('div', null, html);
|
|
194
|
+
var el = dom.create('div', null, html);
|
|
168
195
|
var n = dom.select('.mceTmpl', el);
|
|
169
196
|
if (n && n.length > 0) {
|
|
170
197
|
el = dom.create('div', null);
|
|
171
198
|
el.appendChild(n[0].cloneNode(true));
|
|
172
199
|
}
|
|
173
|
-
global$
|
|
200
|
+
global$3.each(dom.select('*', el), function (n) {
|
|
174
201
|
if (hasClass(n, getCreationDateClasses(editor).replace(/\s+/g, '|'))) {
|
|
175
202
|
n.innerHTML = getDateTime(editor, getCdateFormat(editor));
|
|
176
203
|
}
|
|
@@ -186,44 +213,18 @@
|
|
|
186
213
|
editor.addVisual();
|
|
187
214
|
};
|
|
188
215
|
|
|
189
|
-
var register = function (editor) {
|
|
190
|
-
editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor));
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
var setup = function (editor) {
|
|
194
|
-
editor.on('PreProcess', function (o) {
|
|
195
|
-
var dom = editor.dom, dateFormat = getMdateFormat(editor);
|
|
196
|
-
global$1.each(dom.select('div', o.node), function (e) {
|
|
197
|
-
if (dom.hasClass(e, 'mceTmpl')) {
|
|
198
|
-
global$1.each(dom.select('*', e), function (e) {
|
|
199
|
-
if (dom.hasClass(e, getModificationDateClasses(editor).replace(/\s+/g, '|'))) {
|
|
200
|
-
e.innerHTML = getDateTime(editor, dateFormat);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
replaceVals(editor, e);
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
|
|
209
216
|
var none = function () {
|
|
210
217
|
return NONE;
|
|
211
218
|
};
|
|
212
219
|
var NONE = function () {
|
|
213
|
-
var eq = function (o) {
|
|
214
|
-
return o.isNone();
|
|
215
|
-
};
|
|
216
220
|
var call = function (thunk) {
|
|
217
221
|
return thunk();
|
|
218
222
|
};
|
|
219
|
-
var id =
|
|
220
|
-
return n;
|
|
221
|
-
};
|
|
223
|
+
var id = identity;
|
|
222
224
|
var me = {
|
|
223
225
|
fold: function (n, _s) {
|
|
224
226
|
return n();
|
|
225
227
|
},
|
|
226
|
-
is: never,
|
|
227
228
|
isSome: never,
|
|
228
229
|
isNone: always,
|
|
229
230
|
getOr: id,
|
|
@@ -240,9 +241,9 @@
|
|
|
240
241
|
bind: none,
|
|
241
242
|
exists: never,
|
|
242
243
|
forall: always,
|
|
243
|
-
filter:
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
filter: function () {
|
|
245
|
+
return none();
|
|
246
|
+
},
|
|
246
247
|
toArray: function () {
|
|
247
248
|
return [];
|
|
248
249
|
},
|
|
@@ -262,9 +263,6 @@
|
|
|
262
263
|
fold: function (n, s) {
|
|
263
264
|
return s(a);
|
|
264
265
|
},
|
|
265
|
-
is: function (v) {
|
|
266
|
-
return a === v;
|
|
267
|
-
},
|
|
268
266
|
isSome: always,
|
|
269
267
|
isNone: never,
|
|
270
268
|
getOr: constant_a,
|
|
@@ -291,14 +289,6 @@
|
|
|
291
289
|
},
|
|
292
290
|
toString: function () {
|
|
293
291
|
return 'some(' + a + ')';
|
|
294
|
-
},
|
|
295
|
-
equals: function (o) {
|
|
296
|
-
return o.is(a);
|
|
297
|
-
},
|
|
298
|
-
equals_: function (o, elementEq) {
|
|
299
|
-
return o.fold(never, function (b) {
|
|
300
|
-
return elementEq(a, b);
|
|
301
|
-
});
|
|
302
292
|
}
|
|
303
293
|
};
|
|
304
294
|
return me;
|
|
@@ -336,9 +326,9 @@
|
|
|
336
326
|
return findUntil(xs, pred, never);
|
|
337
327
|
};
|
|
338
328
|
|
|
339
|
-
var global$
|
|
329
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
340
330
|
|
|
341
|
-
var global
|
|
331
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
|
342
332
|
|
|
343
333
|
var hasOwnProperty = Object.hasOwnProperty;
|
|
344
334
|
var get = function (obj, key) {
|
|
@@ -366,7 +356,7 @@
|
|
|
366
356
|
var contentCssEntries_1 = '';
|
|
367
357
|
var contentStyle = getContentStyle(editor);
|
|
368
358
|
var cors_1 = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
|
|
369
|
-
global$
|
|
359
|
+
global$3.each(editor.contentCSS, function (url) {
|
|
370
360
|
contentCssEntries_1 += '<link type="text/css" rel="stylesheet" href="' + editor.documentBaseURI.toAbsolute(url) + '"' + cors_1 + '>';
|
|
371
361
|
});
|
|
372
362
|
if (contentStyle) {
|
|
@@ -374,7 +364,7 @@
|
|
|
374
364
|
}
|
|
375
365
|
var bodyClass = getBodyClass(editor);
|
|
376
366
|
var encode = editor.dom.encode;
|
|
377
|
-
var isMetaKeyPressed = global$
|
|
367
|
+
var isMetaKeyPressed = global$1.mac ? 'e.metaKey' : 'e.ctrlKey && !e.altKey';
|
|
378
368
|
var preventClicksOnLinksScript = '<script>' + 'document.addEventListener && document.addEventListener("click", function(e) {' + 'for (var elm = e.target; elm; elm = elm.parentNode) {' + 'if (elm.nodeName === "A" && !(' + isMetaKeyPressed + ')) {' + 'e.preventDefault();' + '}' + '}' + '}, false);' + '</script> ';
|
|
379
369
|
var directionality = editor.getBody().dir;
|
|
380
370
|
var dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : '';
|
|
@@ -392,7 +382,7 @@
|
|
|
392
382
|
});
|
|
393
383
|
return Optional.none();
|
|
394
384
|
}
|
|
395
|
-
return Optional.from(global$
|
|
385
|
+
return Optional.from(global$3.map(templateList, function (template, index) {
|
|
396
386
|
var isUrlTemplate = function (t) {
|
|
397
387
|
return t.url !== undefined;
|
|
398
388
|
};
|
|
@@ -426,7 +416,7 @@
|
|
|
426
416
|
});
|
|
427
417
|
};
|
|
428
418
|
var getTemplateContent = function (t) {
|
|
429
|
-
return new global
|
|
419
|
+
return new global(function (resolve, reject) {
|
|
430
420
|
t.value.url.fold(function () {
|
|
431
421
|
return resolve(t.value.content.getOr(''));
|
|
432
422
|
}, function (url) {
|
|
@@ -464,7 +454,7 @@
|
|
|
464
454
|
var data = api.getData();
|
|
465
455
|
findTemplate(templates, data.template).each(function (t) {
|
|
466
456
|
getTemplateContent(t).then(function (previewHtml) {
|
|
467
|
-
|
|
457
|
+
editor.execCommand('mceInsertTemplate', false, previewHtml);
|
|
468
458
|
api.close();
|
|
469
459
|
}).catch(function () {
|
|
470
460
|
api.disable('save');
|
|
@@ -552,22 +542,46 @@
|
|
|
552
542
|
};
|
|
553
543
|
};
|
|
554
544
|
var register$1 = function (editor) {
|
|
545
|
+
editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor));
|
|
546
|
+
editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor)));
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
var setup = function (editor) {
|
|
550
|
+
editor.on('PreProcess', function (o) {
|
|
551
|
+
var dom = editor.dom, dateFormat = getMdateFormat(editor);
|
|
552
|
+
global$3.each(dom.select('div', o.node), function (e) {
|
|
553
|
+
if (dom.hasClass(e, 'mceTmpl')) {
|
|
554
|
+
global$3.each(dom.select('*', e), function (e) {
|
|
555
|
+
if (dom.hasClass(e, getModificationDateClasses(editor).replace(/\s+/g, '|'))) {
|
|
556
|
+
e.innerHTML = getDateTime(editor, dateFormat);
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
replaceVals(editor, e);
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
});
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
var register = function (editor) {
|
|
566
|
+
var onAction = function () {
|
|
567
|
+
return editor.execCommand('mceTemplate');
|
|
568
|
+
};
|
|
555
569
|
editor.ui.registry.addButton('template', {
|
|
556
570
|
icon: 'template',
|
|
557
571
|
tooltip: 'Insert template',
|
|
558
|
-
onAction:
|
|
572
|
+
onAction: onAction
|
|
559
573
|
});
|
|
560
574
|
editor.ui.registry.addMenuItem('template', {
|
|
561
575
|
icon: 'template',
|
|
562
576
|
text: 'Insert template...',
|
|
563
|
-
onAction:
|
|
577
|
+
onAction: onAction
|
|
564
578
|
});
|
|
565
579
|
};
|
|
566
580
|
|
|
567
581
|
function Plugin () {
|
|
568
|
-
global.add('template', function (editor) {
|
|
569
|
-
register$1(editor);
|
|
582
|
+
global$4.add('template', function (editor) {
|
|
570
583
|
register(editor);
|
|
584
|
+
register$1(editor);
|
|
571
585
|
setup(editor);
|
|
572
586
|
});
|
|
573
587
|
}
|
|
@@ -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
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";
|
|
9
|
+
!function(){"use strict";function o(e){return function(){return e}}function e(e){return e}function i(e){return n=typeof(t=e),"string"==(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n);var t,n}var t,n=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return typeof e===t};function s(e){return e.getParam("template_mdate_classes","mdate")}function l(e){return e.getParam("template_replace_values")}function m(e){return e.getParam("template_mdate_format",e.translate("%Y-%m-%d"))}function f(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}function p(e,t,n){void 0===n&&(n=new Date);var r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" ");return(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",f(n.getMonth()+1,2))).replace("%d",f(n.getDate(),2))).replace("%H",""+f(n.getHours(),2))).replace("%M",""+f(n.getMinutes(),2))).replace("%S",""+f(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[n.getMonth()]))).replace("%b",""+e.translate(o[n.getMonth()]))).replace("%A",""+e.translate(a[n.getDay()]))).replace("%a",""+e.translate(r[n.getDay()]))).replace("%%","%")}function x(n,e){return O.each(e,function(e,t){u(e)&&(e=e(t)),n=n.replace(new RegExp("\\{\\$"+t+"\\}","g"),e)}),n}function d(e,t){var r=e.dom,a=l(e);O.each(r.select("*",t),function(n){O.each(a,function(e,t){r.hasClass(n,t)&&u(e)&&e(n)})})}function g(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)}function y(t,e,n){var r=t.dom,a=t.selection.getContent();n=x(n,l(t));var o=r.create("div",null,n),c=r.select(".mceTmpl",o);c&&0<c.length&&(o=r.create("div",null)).appendChild(c[0].cloneNode(!0)),O.each(r.select("*",o),function(e){g(e,t.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(e.innerHTML=p(t,t.getParam("template_cdate_format",t.translate("%Y-%m-%d")))),g(e,s(t).replace(/\s+/g,"|"))&&(e.innerHTML=p(t,m(t))),g(e,t.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(e.innerHTML=a)}),d(t,o),t.execCommand("mceInsertContent",!1,o.innerHTML),t.addVisual()}function r(){return b}var c=o(!(t="function")),v=o(!0),O=tinymce.util.Tools.resolve("tinymce.util.Tools"),h=tinymce.util.Tools.resolve("tinymce.util.XHR"),b={fold:function(e,t){return e()},isSome:c,isNone:v,getOr:e,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:a,map:r,each:function(){},bind:r,exists:c,forall:v,filter:function(){return b},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function T(M,t){function l(e,t){return function(e,t,n){for(var r=0,a=e.length;r<a;r++){var o=e[r];if(t(o,r))return P.some(o);if(n(o,r))break}return P.none()}(e,function(e){return e.text===t},c)}function i(e){M.windowManager.alert("Could not load the specified template.",function(){return e.focus("template")})}function u(e){return new _(function(t,n){e.value.url.fold(function(){return t(e.value.content.getOr(""))},function(e){return h.send({url:e,success:function(e){t(e)},error:function(e){n(e)}})})})}!function(){if(t&&0!==t.length)return P.from(O.map(t,function(e,t){function n(e){return void 0!==e.url}return{selected:0===t,text:e.title,value:{url:n(e)?P.from(e.url):P.none(),content:n(e)?P.none():P.from(e.content),description:e.description}}}));var e=M.translate("No templates defined.");return M.notificationManager.open({text:e,type:"info"}),P.none()}().each(function(o){function b(e,t){return{title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:t,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(t){var e=t.getData();l(n,e.template).each(function(e){u(e).then(function(e){M.execCommand("mceInsertTemplate",!1,e),t.close()}).catch(function(){t.disable("save"),i(t)})})},onChange:(r=n=o,a=c,function(n,e){var t;"template"===e.name&&(t=n.getData().template,l(r,t).each(function(t){n.block("Loading..."),u(t).then(function(e){a(n,t,e)}).catch(function(){a(n,t,""),n.disable("save"),i(n)})}))})};var r,a,n}var T=function(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++){var a=e[r];n[r]={text:a.text,value:a.text}}return n}(o),c=function(e,t,n){var r,a,o,c,l,i,u,s,m,f,p,d,g,y=(r=M,-1===(a=n).indexOf("<html>")&&(o="",c=r.getParam("content_style","","string"),l=r.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"",O.each(r.contentCSS,function(e){o+='<link type="text/css" rel="stylesheet" href="'+r.documentBaseURI.toAbsolute(e)+'"'+l+">"}),c&&(o+='<style type="text/css">'+c+"</style>"),i=-1===(g=(p=r).getParam("body_class","","string")).indexOf("=")?g:(d=p).getParam("body_class","","hash")[d.id]||"",u=r.dom.encode,s='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(S.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",f=(m=r.getBody().dir)?' dir="'+u(m)+'"':"",a='<!DOCTYPE html><html><head><base href="'+u(r.documentBaseURI.getURI())+'">'+o+s+'</head><body class="'+u(i)+'"'+f+">"+a+"</body></html>"),x(a,r.getParam("template_preview_replace_values"))),v=[{type:"selectbox",name:"template",label:"Templates",items:T},{type:"htmlpanel",html:'<p aria-live="polite">'+t.value.description.replace(/["'<>&]/g,function(e){return(C(t=A,n=e)?P.from(t[n]):P.none()).getOr(e);var t,n})+"</p>"},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1}],h={template:t.text,preview:y};e.unblock(),e.redial(b(v,h)),e.focus("template")},t=M.windowManager.open(b([],{template:"",preview:""}));t.block("Loading..."),u(o[0]).then(function(e){c(t,o[0],e)}).catch(function(){c(t,o[0],""),t.disable("save"),i(t)})})}var M=function(n){function e(){return a}function t(e){return e(n)}var r=o(n),a={fold:function(e,t){return t(n)},isSome:v,isNone:c,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return M(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:b},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return a},P={some:M,none:r,from:function(e){return null==e?b:M(e)}},S=tinymce.util.Tools.resolve("tinymce.Env"),_=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=Object.hasOwnProperty,C=function(e,t){return w.call(e,t)},A={'"':""","<":"<",">":">","&":"&","'":"'"};n.add("template",function(e){function t(){return n.execCommand("mceTemplate")}var n,r,a,o,c,l;(n=e).ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:t}),n.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:t}),(a=e).addCommand("mceInsertTemplate",function(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}(y,a)),a.addCommand("mceTemplate",(l=o=a,c=function(e){T(l,e)},function(){var e=o.getParam("templates");u(e)?e(c):i(e)?h.send({url:e,success:function(e){c(JSON.parse(e))}}):c(e)})),(r=e).on("PreProcess",function(e){var t=r.dom,n=m(r);O.each(t.select("div",e.node),function(e){t.hasClass(e,"mceTmpl")&&(O.each(t.select("*",e),function(e){t.hasClass(e,s(r).replace(/\s+/g,"|"))&&(e.innerHTML=p(r,n))}),d(r,e))})})})}();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
|
6
6
|
*
|
|
7
|
-
* Version: 5.
|
|
7
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
9
|
(function () {
|
|
10
10
|
'use strict';
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
|
|
14
14
|
function Plugin () {
|
|
15
15
|
global.add('textcolor', function () {
|
|
16
|
-
console.warn('Text color plugin is now built in to the core editor, please remove it from your editor configuration');
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -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
|
+
* Version: 5.10.3 (2022-02-09)
|
|
8
8
|
*/
|
|
9
|
-
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",function(){
|
|
9
|
+
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("textcolor",function(){})}();
|