fx-platform-ui 0.0.13-alpha15 → 0.0.13-alpha16

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 (127) hide show
  1. package/lib/fx-platform-ui.mjs +21119 -19921
  2. package/lib/fx-platform-ui.umd.js +51 -51
  3. package/lib/packages/components/area/src/index.vue.d.ts +2 -2
  4. package/lib/packages/components/confirm/index.d.ts +2 -0
  5. package/lib/packages/components/confirm/src/confirm.vue.d.ts +2 -0
  6. package/lib/packages/components/confirm/src/index.d.ts +2 -0
  7. package/lib/style.css +1 -1
  8. package/package.json +1 -1
  9. package/packages/.DS_Store +0 -0
  10. package/packages/component.ts +3 -2
  11. package/packages/components/confirm/index.ts +9 -0
  12. package/packages/components/confirm/src/confirm.vue +75 -0
  13. package/packages/components/confirm/src/index.module.less +61 -0
  14. package/packages/components/confirm/src/index.tsx +91 -0
  15. package/packages/components/confirm/src/plat-confirm-props.ts +40 -0
  16. package/packages/components/editor/src/index.vue +1 -0
  17. package/packages/components/table/src/hook/useTableMethods.tsx +1 -1
  18. package/packages/components/table/src/plat-table-emits.ts +1 -1
  19. package/CHANGELOG.md +0 -46
  20. package/lib/tinymce/CHANGELOG.md +0 -2957
  21. package/lib/tinymce/README.md +0 -71
  22. package/lib/tinymce/bower.json +0 -27
  23. package/lib/tinymce/composer.json +0 -52
  24. package/lib/tinymce/icons/default/icons.js +0 -182
  25. package/lib/tinymce/icons/default/icons.min.js +0 -1
  26. package/lib/tinymce/icons/default/index.js +0 -7
  27. package/lib/tinymce/license.txt +0 -21
  28. package/lib/tinymce/models/dom/index.js +0 -7
  29. package/lib/tinymce/models/dom/model.js +0 -7975
  30. package/lib/tinymce/models/dom/model.min.js +0 -4
  31. package/lib/tinymce/package.json +0 -32
  32. package/lib/tinymce/plugins/advlist/index.js +0 -7
  33. package/lib/tinymce/plugins/advlist/plugin.js +0 -246
  34. package/lib/tinymce/plugins/advlist/plugin.min.js +0 -4
  35. package/lib/tinymce/plugins/anchor/index.js +0 -7
  36. package/lib/tinymce/plugins/anchor/plugin.js +0 -195
  37. package/lib/tinymce/plugins/anchor/plugin.min.js +0 -4
  38. package/lib/tinymce/plugins/autolink/index.js +0 -7
  39. package/lib/tinymce/plugins/autolink/plugin.js +0 -232
  40. package/lib/tinymce/plugins/autolink/plugin.min.js +0 -4
  41. package/lib/tinymce/plugins/autoresize/index.js +0 -7
  42. package/lib/tinymce/plugins/autoresize/plugin.js +0 -156
  43. package/lib/tinymce/plugins/autoresize/plugin.min.js +0 -4
  44. package/lib/tinymce/plugins/autosave/index.js +0 -7
  45. package/lib/tinymce/plugins/autosave/plugin.js +0 -232
  46. package/lib/tinymce/plugins/autosave/plugin.min.js +0 -4
  47. package/lib/tinymce/plugins/charmap/index.js +0 -7
  48. package/lib/tinymce/plugins/charmap/plugin.js +0 -1636
  49. package/lib/tinymce/plugins/charmap/plugin.min.js +0 -4
  50. package/lib/tinymce/plugins/code/index.js +0 -7
  51. package/lib/tinymce/plugins/code/plugin.js +0 -85
  52. package/lib/tinymce/plugins/code/plugin.min.js +0 -4
  53. package/lib/tinymce/plugins/codesample/index.js +0 -7
  54. package/lib/tinymce/plugins/codesample/plugin.js +0 -2451
  55. package/lib/tinymce/plugins/codesample/plugin.min.js +0 -4
  56. package/lib/tinymce/plugins/directionality/index.js +0 -7
  57. package/lib/tinymce/plugins/directionality/plugin.js +0 -384
  58. package/lib/tinymce/plugins/directionality/plugin.min.js +0 -4
  59. package/lib/tinymce/plugins/emoticons/index.js +0 -7
  60. package/lib/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
  61. package/lib/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -3
  62. package/lib/tinymce/plugins/emoticons/js/emojis.js +0 -1
  63. package/lib/tinymce/plugins/emoticons/js/emojis.min.js +0 -2
  64. package/lib/tinymce/plugins/emoticons/plugin.js +0 -577
  65. package/lib/tinymce/plugins/emoticons/plugin.min.js +0 -4
  66. package/lib/tinymce/plugins/fullscreen/index.js +0 -7
  67. package/lib/tinymce/plugins/fullscreen/plugin.js +0 -1190
  68. package/lib/tinymce/plugins/fullscreen/plugin.min.js +0 -4
  69. package/lib/tinymce/plugins/help/index.js +0 -7
  70. package/lib/tinymce/plugins/help/plugin.js +0 -848
  71. package/lib/tinymce/plugins/help/plugin.min.js +0 -4
  72. package/lib/tinymce/plugins/image/index.js +0 -7
  73. package/lib/tinymce/plugins/image/plugin.js +0 -1475
  74. package/lib/tinymce/plugins/image/plugin.min.js +0 -4
  75. package/lib/tinymce/plugins/importcss/index.js +0 -7
  76. package/lib/tinymce/plugins/importcss/plugin.js +0 -342
  77. package/lib/tinymce/plugins/importcss/plugin.min.js +0 -4
  78. package/lib/tinymce/plugins/insertdatetime/index.js +0 -7
  79. package/lib/tinymce/plugins/insertdatetime/plugin.js +0 -176
  80. package/lib/tinymce/plugins/insertdatetime/plugin.min.js +0 -4
  81. package/lib/tinymce/plugins/link/index.js +0 -7
  82. package/lib/tinymce/plugins/link/plugin.js +0 -1190
  83. package/lib/tinymce/plugins/link/plugin.min.js +0 -4
  84. package/lib/tinymce/plugins/lists/index.js +0 -7
  85. package/lib/tinymce/plugins/lists/plugin.js +0 -1820
  86. package/lib/tinymce/plugins/lists/plugin.min.js +0 -4
  87. package/lib/tinymce/plugins/media/index.js +0 -7
  88. package/lib/tinymce/plugins/media/plugin.js +0 -1157
  89. package/lib/tinymce/plugins/media/plugin.min.js +0 -4
  90. package/lib/tinymce/plugins/nonbreaking/index.js +0 -7
  91. package/lib/tinymce/plugins/nonbreaking/plugin.js +0 -111
  92. package/lib/tinymce/plugins/nonbreaking/plugin.min.js +0 -4
  93. package/lib/tinymce/plugins/pagebreak/index.js +0 -7
  94. package/lib/tinymce/plugins/pagebreak/plugin.js +0 -105
  95. package/lib/tinymce/plugins/pagebreak/plugin.min.js +0 -4
  96. package/lib/tinymce/plugins/preview/index.js +0 -7
  97. package/lib/tinymce/plugins/preview/plugin.js +0 -97
  98. package/lib/tinymce/plugins/preview/plugin.min.js +0 -4
  99. package/lib/tinymce/plugins/quickbars/index.js +0 -7
  100. package/lib/tinymce/plugins/quickbars/plugin.js +0 -421
  101. package/lib/tinymce/plugins/quickbars/plugin.min.js +0 -4
  102. package/lib/tinymce/plugins/save/index.js +0 -7
  103. package/lib/tinymce/plugins/save/plugin.js +0 -118
  104. package/lib/tinymce/plugins/save/plugin.min.js +0 -4
  105. package/lib/tinymce/plugins/searchreplace/index.js +0 -7
  106. package/lib/tinymce/plugins/searchreplace/plugin.js +0 -1079
  107. package/lib/tinymce/plugins/searchreplace/plugin.min.js +0 -4
  108. package/lib/tinymce/plugins/table/index.js +0 -7
  109. package/lib/tinymce/plugins/table/plugin.js +0 -3393
  110. package/lib/tinymce/plugins/table/plugin.min.js +0 -4
  111. package/lib/tinymce/plugins/template/index.js +0 -7
  112. package/lib/tinymce/plugins/template/plugin.js +0 -548
  113. package/lib/tinymce/plugins/template/plugin.min.js +0 -4
  114. package/lib/tinymce/plugins/visualblocks/index.js +0 -7
  115. package/lib/tinymce/plugins/visualblocks/plugin.js +0 -98
  116. package/lib/tinymce/plugins/visualblocks/plugin.min.js +0 -4
  117. package/lib/tinymce/plugins/visualchars/index.js +0 -7
  118. package/lib/tinymce/plugins/visualchars/plugin.js +0 -506
  119. package/lib/tinymce/plugins/visualchars/plugin.min.js +0 -4
  120. package/lib/tinymce/plugins/wordcount/index.js +0 -7
  121. package/lib/tinymce/plugins/wordcount/plugin.js +0 -404
  122. package/lib/tinymce/plugins/wordcount/plugin.min.js +0 -4
  123. package/lib/tinymce/themes/silver/index.js +0 -7
  124. package/lib/tinymce/themes/silver/theme.js +0 -26184
  125. package/lib/tinymce/themes/silver/theme.min.js +0 -4
  126. package/lib/tinymce/tinymce.d.ts +0 -2895
  127. package/lib/tinymce/tinymce.js +0 -29400
@@ -1,421 +0,0 @@
1
- /**
2
- * TinyMCE version 6.1.2 (2022-07-29)
3
- */
4
-
5
- (function () {
6
- 'use strict';
7
-
8
- var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
-
10
- const hasProto = (v, constructor, predicate) => {
11
- var _a;
12
- if (predicate(v, constructor.prototype)) {
13
- return true;
14
- } else {
15
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
16
- }
17
- };
18
- const typeOf = x => {
19
- const t = typeof x;
20
- if (x === null) {
21
- return 'null';
22
- } else if (t === 'object' && Array.isArray(x)) {
23
- return 'array';
24
- } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
25
- return 'string';
26
- } else {
27
- return t;
28
- }
29
- };
30
- const isType = type => value => typeOf(value) === type;
31
- const isSimpleType = type => value => typeof value === type;
32
- const isString = isType('string');
33
- const isBoolean = isSimpleType('boolean');
34
- const isNullable = a => a === null || a === undefined;
35
- const isNonNullable = a => !isNullable(a);
36
- const isFunction = isSimpleType('function');
37
-
38
- const option = name => editor => editor.options.get(name);
39
- const register = editor => {
40
- const registerOption = editor.options.register;
41
- const toolbarProcessor = defaultValue => value => {
42
- const valid = isBoolean(value) || isString(value);
43
- if (valid) {
44
- if (isBoolean(value)) {
45
- return {
46
- value: value ? defaultValue : '',
47
- valid
48
- };
49
- } else {
50
- return {
51
- value: value.trim(),
52
- valid
53
- };
54
- }
55
- } else {
56
- return {
57
- valid: false,
58
- message: 'Must be a boolean or string.'
59
- };
60
- }
61
- };
62
- const defaultSelectionToolbar = 'bold italic | quicklink h2 h3 blockquote';
63
- registerOption('quickbars_selection_toolbar', {
64
- processor: toolbarProcessor(defaultSelectionToolbar),
65
- default: defaultSelectionToolbar
66
- });
67
- const defaultInsertToolbar = 'quickimage quicktable';
68
- registerOption('quickbars_insert_toolbar', {
69
- processor: toolbarProcessor(defaultInsertToolbar),
70
- default: defaultInsertToolbar
71
- });
72
- const defaultImageToolbar = 'alignleft aligncenter alignright';
73
- registerOption('quickbars_image_toolbar', {
74
- processor: toolbarProcessor(defaultImageToolbar),
75
- default: defaultImageToolbar
76
- });
77
- };
78
- const getTextSelectionToolbarItems = option('quickbars_selection_toolbar');
79
- const getInsertToolbarItems = option('quickbars_insert_toolbar');
80
- const getImageToolbarItems = option('quickbars_image_toolbar');
81
-
82
- let unique = 0;
83
- const generate = prefix => {
84
- const date = new Date();
85
- const time = date.getTime();
86
- const random = Math.floor(Math.random() * 1000000000);
87
- unique++;
88
- return prefix + '_' + random + unique + String(time);
89
- };
90
-
91
- const insertTable = (editor, columns, rows) => {
92
- editor.execCommand('mceInsertTable', false, {
93
- rows,
94
- columns
95
- });
96
- };
97
- const insertBlob = (editor, base64, blob) => {
98
- const blobCache = editor.editorUpload.blobCache;
99
- const blobInfo = blobCache.create(generate('mceu'), blob, base64);
100
- blobCache.add(blobInfo);
101
- editor.insertContent(editor.dom.createHTML('img', { src: blobInfo.blobUri() }));
102
- };
103
-
104
- const blobToBase64 = blob => {
105
- return new Promise(resolve => {
106
- const reader = new FileReader();
107
- reader.onloadend = () => {
108
- resolve(reader.result.split(',')[1]);
109
- };
110
- reader.readAsDataURL(blob);
111
- });
112
- };
113
-
114
- var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
115
-
116
- var global = tinymce.util.Tools.resolve('tinymce.util.Delay');
117
-
118
- const pickFile = editor => new Promise(resolve => {
119
- const fileInput = document.createElement('input');
120
- fileInput.type = 'file';
121
- fileInput.accept = 'image/*';
122
- fileInput.style.position = 'fixed';
123
- fileInput.style.left = '0';
124
- fileInput.style.top = '0';
125
- fileInput.style.opacity = '0.001';
126
- document.body.appendChild(fileInput);
127
- const changeHandler = e => {
128
- resolve(Array.prototype.slice.call(e.target.files));
129
- };
130
- fileInput.addEventListener('change', changeHandler);
131
- const cancelHandler = e => {
132
- const cleanup = () => {
133
- resolve([]);
134
- fileInput.parentNode.removeChild(fileInput);
135
- };
136
- if (global$1.os.isAndroid() && e.type !== 'remove') {
137
- global.setEditorTimeout(editor, cleanup, 0);
138
- } else {
139
- cleanup();
140
- }
141
- editor.off('focusin remove', cancelHandler);
142
- };
143
- editor.on('focusin remove', cancelHandler);
144
- fileInput.click();
145
- });
146
-
147
- const setupButtons = editor => {
148
- editor.ui.registry.addButton('quickimage', {
149
- icon: 'image',
150
- tooltip: 'Insert image',
151
- onAction: () => {
152
- pickFile(editor).then(files => {
153
- if (files.length > 0) {
154
- const blob = files[0];
155
- blobToBase64(blob).then(base64 => {
156
- insertBlob(editor, base64, blob);
157
- });
158
- }
159
- });
160
- }
161
- });
162
- editor.ui.registry.addButton('quicktable', {
163
- icon: 'table',
164
- tooltip: 'Insert table',
165
- onAction: () => {
166
- insertTable(editor, 2, 2);
167
- }
168
- });
169
- };
170
-
171
- const constant = value => {
172
- return () => {
173
- return value;
174
- };
175
- };
176
- const never = constant(false);
177
-
178
- class Optional {
179
- constructor(tag, value) {
180
- this.tag = tag;
181
- this.value = value;
182
- }
183
- static some(value) {
184
- return new Optional(true, value);
185
- }
186
- static none() {
187
- return Optional.singletonNone;
188
- }
189
- fold(onNone, onSome) {
190
- if (this.tag) {
191
- return onSome(this.value);
192
- } else {
193
- return onNone();
194
- }
195
- }
196
- isSome() {
197
- return this.tag;
198
- }
199
- isNone() {
200
- return !this.tag;
201
- }
202
- map(mapper) {
203
- if (this.tag) {
204
- return Optional.some(mapper(this.value));
205
- } else {
206
- return Optional.none();
207
- }
208
- }
209
- bind(binder) {
210
- if (this.tag) {
211
- return binder(this.value);
212
- } else {
213
- return Optional.none();
214
- }
215
- }
216
- exists(predicate) {
217
- return this.tag && predicate(this.value);
218
- }
219
- forall(predicate) {
220
- return !this.tag || predicate(this.value);
221
- }
222
- filter(predicate) {
223
- if (!this.tag || predicate(this.value)) {
224
- return this;
225
- } else {
226
- return Optional.none();
227
- }
228
- }
229
- getOr(replacement) {
230
- return this.tag ? this.value : replacement;
231
- }
232
- or(replacement) {
233
- return this.tag ? this : replacement;
234
- }
235
- getOrThunk(thunk) {
236
- return this.tag ? this.value : thunk();
237
- }
238
- orThunk(thunk) {
239
- return this.tag ? this : thunk();
240
- }
241
- getOrDie(message) {
242
- if (!this.tag) {
243
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
244
- } else {
245
- return this.value;
246
- }
247
- }
248
- static from(value) {
249
- return isNonNullable(value) ? Optional.some(value) : Optional.none();
250
- }
251
- getOrNull() {
252
- return this.tag ? this.value : null;
253
- }
254
- getOrUndefined() {
255
- return this.value;
256
- }
257
- each(worker) {
258
- if (this.tag) {
259
- worker(this.value);
260
- }
261
- }
262
- toArray() {
263
- return this.tag ? [this.value] : [];
264
- }
265
- toString() {
266
- return this.tag ? `some(${ this.value })` : 'none()';
267
- }
268
- }
269
- Optional.singletonNone = new Optional(false);
270
-
271
- var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {
272
- if (is(scope, a)) {
273
- return Optional.some(scope);
274
- } else if (isFunction(isRoot) && isRoot(scope)) {
275
- return Optional.none();
276
- } else {
277
- return ancestor(scope, a, isRoot);
278
- }
279
- };
280
-
281
- const ELEMENT = 1;
282
-
283
- const fromHtml = (html, scope) => {
284
- const doc = scope || document;
285
- const div = doc.createElement('div');
286
- div.innerHTML = html;
287
- if (!div.hasChildNodes() || div.childNodes.length > 1) {
288
- const message = 'HTML does not have a single root node';
289
- console.error(message, html);
290
- throw new Error(message);
291
- }
292
- return fromDom(div.childNodes[0]);
293
- };
294
- const fromTag = (tag, scope) => {
295
- const doc = scope || document;
296
- const node = doc.createElement(tag);
297
- return fromDom(node);
298
- };
299
- const fromText = (text, scope) => {
300
- const doc = scope || document;
301
- const node = doc.createTextNode(text);
302
- return fromDom(node);
303
- };
304
- const fromDom = node => {
305
- if (node === null || node === undefined) {
306
- throw new Error('Node cannot be null or undefined');
307
- }
308
- return { dom: node };
309
- };
310
- const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
311
- const SugarElement = {
312
- fromHtml,
313
- fromTag,
314
- fromText,
315
- fromDom,
316
- fromPoint
317
- };
318
-
319
- const is = (element, selector) => {
320
- const dom = element.dom;
321
- if (dom.nodeType !== ELEMENT) {
322
- return false;
323
- } else {
324
- const elem = dom;
325
- if (elem.matches !== undefined) {
326
- return elem.matches(selector);
327
- } else if (elem.msMatchesSelector !== undefined) {
328
- return elem.msMatchesSelector(selector);
329
- } else if (elem.webkitMatchesSelector !== undefined) {
330
- return elem.webkitMatchesSelector(selector);
331
- } else if (elem.mozMatchesSelector !== undefined) {
332
- return elem.mozMatchesSelector(selector);
333
- } else {
334
- throw new Error('Browser lacks native selectors');
335
- }
336
- }
337
- };
338
-
339
- typeof window !== 'undefined' ? window : Function('return this;')();
340
-
341
- const name = element => {
342
- const r = element.dom.nodeName;
343
- return r.toLowerCase();
344
- };
345
-
346
- const ancestor$1 = (scope, predicate, isRoot) => {
347
- let element = scope.dom;
348
- const stop = isFunction(isRoot) ? isRoot : never;
349
- while (element.parentNode) {
350
- element = element.parentNode;
351
- const el = SugarElement.fromDom(element);
352
- if (predicate(el)) {
353
- return Optional.some(el);
354
- } else if (stop(el)) {
355
- break;
356
- }
357
- }
358
- return Optional.none();
359
- };
360
- const closest$1 = (scope, predicate, isRoot) => {
361
- const is = (s, test) => test(s);
362
- return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);
363
- };
364
-
365
- const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is(e, selector), isRoot);
366
- const closest = (scope, selector, isRoot) => {
367
- const is$1 = (element, selector) => is(element, selector);
368
- return ClosestOrAncestor(is$1, ancestor, scope, selector, isRoot);
369
- };
370
-
371
- const addToEditor$1 = editor => {
372
- const insertToolbarItems = getInsertToolbarItems(editor);
373
- if (insertToolbarItems.length > 0) {
374
- editor.ui.registry.addContextToolbar('quickblock', {
375
- predicate: node => {
376
- const sugarNode = SugarElement.fromDom(node);
377
- const textBlockElementsMap = editor.schema.getTextBlockElements();
378
- const isRoot = elem => elem.dom === editor.getBody();
379
- return closest(sugarNode, 'table', isRoot).fold(() => closest$1(sugarNode, elem => name(elem) in textBlockElementsMap && editor.dom.isEmpty(elem.dom), isRoot).isSome(), never);
380
- },
381
- items: insertToolbarItems,
382
- position: 'line',
383
- scope: 'editor'
384
- });
385
- }
386
- };
387
-
388
- const addToEditor = editor => {
389
- const isEditable = node => editor.dom.getContentEditableParent(node) !== 'false';
390
- const isImage = node => node.nodeName === 'IMG' || node.nodeName === 'FIGURE' && /image/i.test(node.className);
391
- const imageToolbarItems = getImageToolbarItems(editor);
392
- if (imageToolbarItems.length > 0) {
393
- editor.ui.registry.addContextToolbar('imageselection', {
394
- predicate: isImage,
395
- items: imageToolbarItems,
396
- position: 'node'
397
- });
398
- }
399
- const textToolbarItems = getTextSelectionToolbarItems(editor);
400
- if (textToolbarItems.length > 0) {
401
- editor.ui.registry.addContextToolbar('textselection', {
402
- predicate: node => !isImage(node) && !editor.selection.isCollapsed() && isEditable(node),
403
- items: textToolbarItems,
404
- position: 'selection',
405
- scope: 'editor'
406
- });
407
- }
408
- };
409
-
410
- var Plugin = () => {
411
- global$2.add('quickbars', editor => {
412
- register(editor);
413
- setupButtons(editor);
414
- addToEditor$1(editor);
415
- addToEditor(editor);
416
- });
417
- };
418
-
419
- Plugin();
420
-
421
- })();
@@ -1,4 +0,0 @@
1
- /**
2
- * TinyMCE version 6.1.2 (2022-07-29)
3
- */
4
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(i=n.constructor)||void 0===i?void 0:i.name)===r.name)?"string":t;var o,n,r,i})(e));const n=t("boolean"),r=t("function"),i=e=>t=>t.options.get(e),s=i("quickbars_selection_toolbar"),a=i("quickbars_insert_toolbar"),l=i("quickbars_image_toolbar");let c=0;var u=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Delay");const m=e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{(e=>new Promise((t=>{const o=document.createElement("input");o.type="file",o.accept="image/*",o.style.position="fixed",o.style.left="0",o.style.top="0",o.style.opacity="0.001",document.body.appendChild(o),o.addEventListener("change",(e=>{t(Array.prototype.slice.call(e.target.files))}));const n=r=>{const i=()=>{t([]),o.parentNode.removeChild(o)};u.os.isAndroid()&&"remove"!==r.type?d.setEditorTimeout(e,i,0):i(),e.off("focusin remove",n)};e.on("focusin remove",n),o.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{((e,t,o)=>{const n=e.editorUpload.blobCache,r=n.create((e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return c++,"mceu_"+o+c+String(t)})(),o,t);n.add(r),e.insertContent(e.dom.createHTML("img",{src:r.blobUri()}))})(e,t,o)}))}}))}}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{((e,t,o)=>{e.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(e)}})},g=(!1,()=>false);class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?h.none():h.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);var b=(e,t,o,n,i)=>e(o,n)?h.some(o):r(i)&&i(o)?h.none():t(o,n,i);const p=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=p,v=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const y=(e,t,o)=>{let n=e.dom;const i=r(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=f(n);if(t(e))return h.some(e);if(i(e))break}return h.none()},k=(e,t,o)=>y(e,(e=>v(e,t)),o),w=e=>{const t=a(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=f(t),n=e.schema.getTextBlockElements(),r=t=>t.dom===e.getBody();return((e,t,o)=>b(((e,t)=>v(e,t)),k,e,"table",o))(o,0,r).fold((()=>((t,o,r)=>b(((e,t)=>t(e)),y,t,(t=>t.dom.nodeName.toLowerCase()in n&&e.dom.isEmpty(t.dom)),r))(o,0,r).isSome()),g)},items:t,position:"line",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,r=e=>t=>{const r=n(t)||o(t);return r?n(t)?{value:t?e:"",valid:r}:{value:t.trim(),valid:r}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:r(i),default:i});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:r(s),default:s});const a="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:r(a),default:a})})(e),m(e),w(e),(e=>{const t=e=>"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className),o=l(e);o.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:t,items:o,position:"node"});const n=s(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:o=>!t(o)&&!e.selection.isCollapsed()&&(t=>"false"!==e.dom.getContentEditableParent(t))(o),items:n,position:"selection",scope:"editor"})})(e)}))}();
@@ -1,7 +0,0 @@
1
- // Exports the "save" plugin for usage with module loaders
2
- // Usage:
3
- // CommonJS:
4
- // require('tinymce/plugins/save')
5
- // ES2015:
6
- // import 'tinymce/plugins/save'
7
- require('./plugin.js');
@@ -1,118 +0,0 @@
1
- /**
2
- * TinyMCE version 6.1.2 (2022-07-29)
3
- */
4
-
5
- (function () {
6
- 'use strict';
7
-
8
- var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
-
10
- const isSimpleType = type => value => typeof value === type;
11
- const isFunction = isSimpleType('function');
12
-
13
- var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
14
-
15
- var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
16
-
17
- const option = name => editor => editor.options.get(name);
18
- const register$2 = editor => {
19
- const registerOption = editor.options.register;
20
- registerOption('save_enablewhendirty', {
21
- processor: 'boolean',
22
- default: true
23
- });
24
- registerOption('save_onsavecallback', { processor: 'function' });
25
- registerOption('save_oncancelcallback', { processor: 'function' });
26
- };
27
- const enableWhenDirty = option('save_enablewhendirty');
28
- const getOnSaveCallback = option('save_onsavecallback');
29
- const getOnCancelCallback = option('save_oncancelcallback');
30
-
31
- const displayErrorMessage = (editor, message) => {
32
- editor.notificationManager.open({
33
- text: message,
34
- type: 'error'
35
- });
36
- };
37
- const save = editor => {
38
- const formObj = global$1.DOM.getParent(editor.id, 'form');
39
- if (enableWhenDirty(editor) && !editor.isDirty()) {
40
- return;
41
- }
42
- editor.save();
43
- const onSaveCallback = getOnSaveCallback(editor);
44
- if (isFunction(onSaveCallback)) {
45
- onSaveCallback.call(editor, editor);
46
- editor.nodeChanged();
47
- return;
48
- }
49
- if (formObj) {
50
- editor.setDirty(false);
51
- if (!formObj.onsubmit || formObj.onsubmit()) {
52
- if (typeof formObj.submit === 'function') {
53
- formObj.submit();
54
- } else {
55
- displayErrorMessage(editor, 'Error: Form submit field collision.');
56
- }
57
- }
58
- editor.nodeChanged();
59
- } else {
60
- displayErrorMessage(editor, 'Error: No form element found.');
61
- }
62
- };
63
- const cancel = editor => {
64
- const h = global.trim(editor.startContent);
65
- const onCancelCallback = getOnCancelCallback(editor);
66
- if (isFunction(onCancelCallback)) {
67
- onCancelCallback.call(editor, editor);
68
- return;
69
- }
70
- editor.resetContent(h);
71
- };
72
-
73
- const register$1 = editor => {
74
- editor.addCommand('mceSave', () => {
75
- save(editor);
76
- });
77
- editor.addCommand('mceCancel', () => {
78
- cancel(editor);
79
- });
80
- };
81
-
82
- const stateToggle = editor => api => {
83
- const handler = () => {
84
- api.setEnabled(!enableWhenDirty(editor) || editor.isDirty());
85
- };
86
- handler();
87
- editor.on('NodeChange dirty', handler);
88
- return () => editor.off('NodeChange dirty', handler);
89
- };
90
- const register = editor => {
91
- editor.ui.registry.addButton('save', {
92
- icon: 'save',
93
- tooltip: 'Save',
94
- enabled: false,
95
- onAction: () => editor.execCommand('mceSave'),
96
- onSetup: stateToggle(editor)
97
- });
98
- editor.ui.registry.addButton('cancel', {
99
- icon: 'cancel',
100
- tooltip: 'Cancel',
101
- enabled: false,
102
- onAction: () => editor.execCommand('mceCancel'),
103
- onSetup: stateToggle(editor)
104
- });
105
- editor.addShortcut('Meta+S', '', 'mceSave');
106
- };
107
-
108
- var Plugin = () => {
109
- global$2.add('save', editor => {
110
- register$2(editor);
111
- register(editor);
112
- register$1(editor);
113
- });
114
- };
115
-
116
- Plugin();
117
-
118
- })();
@@ -1,4 +0,0 @@
1
- /**
2
- * TinyMCE version 6.1.2 (2022-07-29)
3
- */
4
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const n=("function",e=>"function"==typeof e);var o=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t=tinymce.util.Tools.resolve("tinymce.util.Tools");const a=e=>n=>n.options.get(e),c=a("save_enablewhendirty"),i=a("save_onsavecallback"),s=a("save_oncancelcallback"),r=(e,n)=>{e.notificationManager.open({text:n,type:"error"})},l=e=>n=>{const o=()=>{n.setEnabled(!c(e)||e.isDirty())};return o(),e.on("NodeChange dirty",o),()=>e.off("NodeChange dirty",o)};e.add("save",(e=>{(e=>{const n=e.options.register;n("save_enablewhendirty",{processor:"boolean",default:!0}),n("save_onsavecallback",{processor:"function"}),n("save_oncancelcallback",{processor:"function"})})(e),(e=>{e.ui.registry.addButton("save",{icon:"save",tooltip:"Save",enabled:!1,onAction:()=>e.execCommand("mceSave"),onSetup:l(e)}),e.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",enabled:!1,onAction:()=>e.execCommand("mceCancel"),onSetup:l(e)}),e.addShortcut("Meta+S","","mceSave")})(e),(e=>{e.addCommand("mceSave",(()=>{(e=>{const t=o.DOM.getParent(e.id,"form");if(c(e)&&!e.isDirty())return;e.save();const a=i(e);if(n(a))return a.call(e,e),void e.nodeChanged();t?(e.setDirty(!1),t.onsubmit&&!t.onsubmit()||("function"==typeof t.submit?t.submit():r(e,"Error: Form submit field collision.")),e.nodeChanged()):r(e,"Error: No form element found.")})(e)})),e.addCommand("mceCancel",(()=>{(e=>{const o=t.trim(e.startContent),a=s(e);n(a)?a.call(e,e):e.resetContent(o)})(e)}))})(e)}))}();
@@ -1,7 +0,0 @@
1
- // Exports the "searchreplace" plugin for usage with module loaders
2
- // Usage:
3
- // CommonJS:
4
- // require('tinymce/plugins/searchreplace')
5
- // ES2015:
6
- // import 'tinymce/plugins/searchreplace'
7
- require('./plugin.js');