fx-platform-ui 0.0.13-alpha13 → 0.0.13-alpha15

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 (114) hide show
  1. package/lib/fx-platform-ui.mjs +30783 -62614
  2. package/lib/fx-platform-ui.umd.js +68 -112
  3. package/lib/packages/components/editor/src/index.vue.d.ts +16 -0
  4. package/lib/style.css +1 -1
  5. package/lib/tinymce/CHANGELOG.md +2957 -0
  6. package/lib/tinymce/README.md +71 -0
  7. package/lib/tinymce/bower.json +27 -0
  8. package/lib/tinymce/composer.json +52 -0
  9. package/lib/tinymce/icons/default/icons.js +182 -0
  10. package/lib/tinymce/icons/default/icons.min.js +1 -0
  11. package/lib/tinymce/icons/default/index.js +7 -0
  12. package/lib/tinymce/license.txt +21 -0
  13. package/lib/tinymce/models/dom/index.js +7 -0
  14. package/lib/tinymce/models/dom/model.js +7975 -0
  15. package/lib/tinymce/models/dom/model.min.js +4 -0
  16. package/lib/tinymce/package.json +32 -0
  17. package/lib/tinymce/plugins/advlist/index.js +7 -0
  18. package/lib/tinymce/plugins/advlist/plugin.js +246 -0
  19. package/lib/tinymce/plugins/advlist/plugin.min.js +4 -0
  20. package/lib/tinymce/plugins/anchor/index.js +7 -0
  21. package/lib/tinymce/plugins/anchor/plugin.js +195 -0
  22. package/lib/tinymce/plugins/anchor/plugin.min.js +4 -0
  23. package/lib/tinymce/plugins/autolink/index.js +7 -0
  24. package/lib/tinymce/plugins/autolink/plugin.js +232 -0
  25. package/lib/tinymce/plugins/autolink/plugin.min.js +4 -0
  26. package/lib/tinymce/plugins/autoresize/index.js +7 -0
  27. package/lib/tinymce/plugins/autoresize/plugin.js +156 -0
  28. package/lib/tinymce/plugins/autoresize/plugin.min.js +4 -0
  29. package/lib/tinymce/plugins/autosave/index.js +7 -0
  30. package/lib/tinymce/plugins/autosave/plugin.js +232 -0
  31. package/lib/tinymce/plugins/autosave/plugin.min.js +4 -0
  32. package/lib/tinymce/plugins/charmap/index.js +7 -0
  33. package/lib/tinymce/plugins/charmap/plugin.js +1636 -0
  34. package/lib/tinymce/plugins/charmap/plugin.min.js +4 -0
  35. package/lib/tinymce/plugins/code/index.js +7 -0
  36. package/lib/tinymce/plugins/code/plugin.js +85 -0
  37. package/lib/tinymce/plugins/code/plugin.min.js +4 -0
  38. package/lib/tinymce/plugins/codesample/index.js +7 -0
  39. package/lib/tinymce/plugins/codesample/plugin.js +2451 -0
  40. package/lib/tinymce/plugins/codesample/plugin.min.js +4 -0
  41. package/lib/tinymce/plugins/directionality/index.js +7 -0
  42. package/lib/tinymce/plugins/directionality/plugin.js +384 -0
  43. package/lib/tinymce/plugins/directionality/plugin.min.js +4 -0
  44. package/lib/tinymce/plugins/emoticons/index.js +7 -0
  45. package/lib/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
  46. package/lib/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  47. package/lib/tinymce/plugins/emoticons/js/emojis.js +1 -0
  48. package/lib/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  49. package/lib/tinymce/plugins/emoticons/plugin.js +577 -0
  50. package/lib/tinymce/plugins/emoticons/plugin.min.js +4 -0
  51. package/lib/tinymce/plugins/fullscreen/index.js +7 -0
  52. package/lib/tinymce/plugins/fullscreen/plugin.js +1190 -0
  53. package/lib/tinymce/plugins/fullscreen/plugin.min.js +4 -0
  54. package/lib/tinymce/plugins/help/index.js +7 -0
  55. package/lib/tinymce/plugins/help/plugin.js +848 -0
  56. package/lib/tinymce/plugins/help/plugin.min.js +4 -0
  57. package/lib/tinymce/plugins/image/index.js +7 -0
  58. package/lib/tinymce/plugins/image/plugin.js +1475 -0
  59. package/lib/tinymce/plugins/image/plugin.min.js +4 -0
  60. package/lib/tinymce/plugins/importcss/index.js +7 -0
  61. package/lib/tinymce/plugins/importcss/plugin.js +342 -0
  62. package/lib/tinymce/plugins/importcss/plugin.min.js +4 -0
  63. package/lib/tinymce/plugins/insertdatetime/index.js +7 -0
  64. package/lib/tinymce/plugins/insertdatetime/plugin.js +176 -0
  65. package/lib/tinymce/plugins/insertdatetime/plugin.min.js +4 -0
  66. package/lib/tinymce/plugins/link/index.js +7 -0
  67. package/lib/tinymce/plugins/link/plugin.js +1190 -0
  68. package/lib/tinymce/plugins/link/plugin.min.js +4 -0
  69. package/lib/tinymce/plugins/lists/index.js +7 -0
  70. package/lib/tinymce/plugins/lists/plugin.js +1820 -0
  71. package/lib/tinymce/plugins/lists/plugin.min.js +4 -0
  72. package/lib/tinymce/plugins/media/index.js +7 -0
  73. package/lib/tinymce/plugins/media/plugin.js +1157 -0
  74. package/lib/tinymce/plugins/media/plugin.min.js +4 -0
  75. package/lib/tinymce/plugins/nonbreaking/index.js +7 -0
  76. package/lib/tinymce/plugins/nonbreaking/plugin.js +111 -0
  77. package/lib/tinymce/plugins/nonbreaking/plugin.min.js +4 -0
  78. package/lib/tinymce/plugins/pagebreak/index.js +7 -0
  79. package/lib/tinymce/plugins/pagebreak/plugin.js +105 -0
  80. package/lib/tinymce/plugins/pagebreak/plugin.min.js +4 -0
  81. package/lib/tinymce/plugins/preview/index.js +7 -0
  82. package/lib/tinymce/plugins/preview/plugin.js +97 -0
  83. package/lib/tinymce/plugins/preview/plugin.min.js +4 -0
  84. package/lib/tinymce/plugins/quickbars/index.js +7 -0
  85. package/lib/tinymce/plugins/quickbars/plugin.js +421 -0
  86. package/lib/tinymce/plugins/quickbars/plugin.min.js +4 -0
  87. package/lib/tinymce/plugins/save/index.js +7 -0
  88. package/lib/tinymce/plugins/save/plugin.js +118 -0
  89. package/lib/tinymce/plugins/save/plugin.min.js +4 -0
  90. package/lib/tinymce/plugins/searchreplace/index.js +7 -0
  91. package/lib/tinymce/plugins/searchreplace/plugin.js +1079 -0
  92. package/lib/tinymce/plugins/searchreplace/plugin.min.js +4 -0
  93. package/lib/tinymce/plugins/table/index.js +7 -0
  94. package/lib/tinymce/plugins/table/plugin.js +3393 -0
  95. package/lib/tinymce/plugins/table/plugin.min.js +4 -0
  96. package/lib/tinymce/plugins/template/index.js +7 -0
  97. package/lib/tinymce/plugins/template/plugin.js +548 -0
  98. package/lib/tinymce/plugins/template/plugin.min.js +4 -0
  99. package/lib/tinymce/plugins/visualblocks/index.js +7 -0
  100. package/lib/tinymce/plugins/visualblocks/plugin.js +98 -0
  101. package/lib/tinymce/plugins/visualblocks/plugin.min.js +4 -0
  102. package/lib/tinymce/plugins/visualchars/index.js +7 -0
  103. package/lib/tinymce/plugins/visualchars/plugin.js +506 -0
  104. package/lib/tinymce/plugins/visualchars/plugin.min.js +4 -0
  105. package/lib/tinymce/plugins/wordcount/index.js +7 -0
  106. package/lib/tinymce/plugins/wordcount/plugin.js +404 -0
  107. package/lib/tinymce/plugins/wordcount/plugin.min.js +4 -0
  108. package/lib/tinymce/themes/silver/index.js +7 -0
  109. package/lib/tinymce/themes/silver/theme.js +26184 -0
  110. package/lib/tinymce/themes/silver/theme.min.js +4 -0
  111. package/lib/tinymce/tinymce.d.ts +2895 -0
  112. package/lib/tinymce/tinymce.js +29400 -0
  113. package/package.json +1 -1
  114. package/packages/components/editor/src/index.vue +24 -23
@@ -0,0 +1,232 @@
1
+ /**
2
+ * TinyMCE version 6.1.2 (2022-07-29)
3
+ */
4
+
5
+ (function () {
6
+ 'use strict';
7
+
8
+ var global$4 = 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 eq = t => a => t === a;
32
+ const isString = isType('string');
33
+ const isUndefined = eq(undefined);
34
+
35
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
36
+
37
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
38
+
39
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
40
+
41
+ const fireRestoreDraft = editor => editor.dispatch('RestoreDraft');
42
+ const fireStoreDraft = editor => editor.dispatch('StoreDraft');
43
+ const fireRemoveDraft = editor => editor.dispatch('RemoveDraft');
44
+
45
+ const parse = timeString => {
46
+ const multiples = {
47
+ s: 1000,
48
+ m: 60000
49
+ };
50
+ const parsedTime = /^(\d+)([ms]?)$/.exec(timeString);
51
+ return (parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10);
52
+ };
53
+
54
+ const option = name => editor => editor.options.get(name);
55
+ const register$1 = editor => {
56
+ const registerOption = editor.options.register;
57
+ const timeProcessor = value => {
58
+ const valid = isString(value);
59
+ if (valid) {
60
+ return {
61
+ value: parse(value),
62
+ valid
63
+ };
64
+ } else {
65
+ return {
66
+ valid: false,
67
+ message: 'Must be a string.'
68
+ };
69
+ }
70
+ };
71
+ registerOption('autosave_ask_before_unload', {
72
+ processor: 'boolean',
73
+ default: true
74
+ });
75
+ registerOption('autosave_prefix', {
76
+ processor: 'string',
77
+ default: 'tinymce-autosave-{path}{query}{hash}-{id}-'
78
+ });
79
+ registerOption('autosave_restore_when_empty', {
80
+ processor: 'boolean',
81
+ default: false
82
+ });
83
+ registerOption('autosave_interval', {
84
+ processor: timeProcessor,
85
+ default: '30s'
86
+ });
87
+ registerOption('autosave_retention', {
88
+ processor: timeProcessor,
89
+ default: '20m'
90
+ });
91
+ };
92
+ const shouldAskBeforeUnload = option('autosave_ask_before_unload');
93
+ const shouldRestoreWhenEmpty = option('autosave_restore_when_empty');
94
+ const getAutoSaveInterval = option('autosave_interval');
95
+ const getAutoSaveRetention = option('autosave_retention');
96
+ const getAutoSavePrefix = editor => {
97
+ const location = document.location;
98
+ return editor.options.get('autosave_prefix').replace(/{path}/g, location.pathname).replace(/{query}/g, location.search).replace(/{hash}/g, location.hash).replace(/{id}/g, editor.id);
99
+ };
100
+
101
+ const isEmpty = (editor, html) => {
102
+ if (isUndefined(html)) {
103
+ return editor.dom.isEmpty(editor.getBody());
104
+ } else {
105
+ const trimmedHtml = global$1.trim(html);
106
+ if (trimmedHtml === '') {
107
+ return true;
108
+ } else {
109
+ const fragment = new DOMParser().parseFromString(trimmedHtml, 'text/html');
110
+ return editor.dom.isEmpty(fragment);
111
+ }
112
+ }
113
+ };
114
+ const hasDraft = editor => {
115
+ const time = parseInt(global$2.getItem(getAutoSavePrefix(editor) + 'time'), 10) || 0;
116
+ if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
117
+ removeDraft(editor, false);
118
+ return false;
119
+ }
120
+ return true;
121
+ };
122
+ const removeDraft = (editor, fire) => {
123
+ const prefix = getAutoSavePrefix(editor);
124
+ global$2.removeItem(prefix + 'draft');
125
+ global$2.removeItem(prefix + 'time');
126
+ if (fire !== false) {
127
+ fireRemoveDraft(editor);
128
+ }
129
+ };
130
+ const storeDraft = editor => {
131
+ const prefix = getAutoSavePrefix(editor);
132
+ if (!isEmpty(editor) && editor.isDirty()) {
133
+ global$2.setItem(prefix + 'draft', editor.getContent({
134
+ format: 'raw',
135
+ no_events: true
136
+ }));
137
+ global$2.setItem(prefix + 'time', new Date().getTime().toString());
138
+ fireStoreDraft(editor);
139
+ }
140
+ };
141
+ const restoreDraft = editor => {
142
+ const prefix = getAutoSavePrefix(editor);
143
+ if (hasDraft(editor)) {
144
+ editor.setContent(global$2.getItem(prefix + 'draft'), { format: 'raw' });
145
+ fireRestoreDraft(editor);
146
+ }
147
+ };
148
+ const startStoreDraft = editor => {
149
+ const interval = getAutoSaveInterval(editor);
150
+ global$3.setEditorInterval(editor, () => {
151
+ storeDraft(editor);
152
+ }, interval);
153
+ };
154
+ const restoreLastDraft = editor => {
155
+ editor.undoManager.transact(() => {
156
+ restoreDraft(editor);
157
+ removeDraft(editor);
158
+ });
159
+ editor.focus();
160
+ };
161
+
162
+ const get = editor => ({
163
+ hasDraft: () => hasDraft(editor),
164
+ storeDraft: () => storeDraft(editor),
165
+ restoreDraft: () => restoreDraft(editor),
166
+ removeDraft: fire => removeDraft(editor, fire),
167
+ isEmpty: html => isEmpty(editor, html)
168
+ });
169
+
170
+ var global = tinymce.util.Tools.resolve('tinymce.EditorManager');
171
+
172
+ const setup = editor => {
173
+ editor.editorManager.on('BeforeUnload', e => {
174
+ let msg;
175
+ global$1.each(global.get(), editor => {
176
+ if (editor.plugins.autosave) {
177
+ editor.plugins.autosave.storeDraft();
178
+ }
179
+ if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {
180
+ msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
181
+ }
182
+ });
183
+ if (msg) {
184
+ e.preventDefault();
185
+ e.returnValue = msg;
186
+ }
187
+ });
188
+ };
189
+
190
+ const makeSetupHandler = editor => api => {
191
+ api.setEnabled(hasDraft(editor));
192
+ const editorEventCallback = () => api.setEnabled(hasDraft(editor));
193
+ editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
194
+ return () => editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
195
+ };
196
+ const register = editor => {
197
+ startStoreDraft(editor);
198
+ editor.ui.registry.addButton('restoredraft', {
199
+ tooltip: 'Restore last draft',
200
+ icon: 'restore-draft',
201
+ onAction: () => {
202
+ restoreLastDraft(editor);
203
+ },
204
+ onSetup: makeSetupHandler(editor)
205
+ });
206
+ editor.ui.registry.addMenuItem('restoredraft', {
207
+ text: 'Restore last draft',
208
+ icon: 'restore-draft',
209
+ onAction: () => {
210
+ restoreLastDraft(editor);
211
+ },
212
+ onSetup: makeSetupHandler(editor)
213
+ });
214
+ };
215
+
216
+ var Plugin = () => {
217
+ global$4.add('autosave', editor => {
218
+ register$1(editor);
219
+ setup(editor);
220
+ register(editor);
221
+ editor.on('init', () => {
222
+ if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
223
+ restoreDraft(editor);
224
+ }
225
+ });
226
+ return get(editor);
227
+ });
228
+ };
229
+
230
+ Plugin();
231
+
232
+ })();
@@ -0,0 +1,4 @@
1
+ /**
2
+ * TinyMCE version 6.1.2 (2022-07-29)
3
+ */
4
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t));const r=(void 0,t=>undefined===t);var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),m=i("autosave_retention"),d=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},f=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},v=t=>{const e=parseInt(a.getItem(d(t)+"time"),10)||0;return!((new Date).getTime()-e>m(t)&&(p(t,!1),1))},p=(t,e)=>{const r=d(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{const e=d(t);!f(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{const e=d(t);v(t)&&(t.setContent(a.getItem(e+"draft"),{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))},D=t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()};var h=tinymce.util.Tools.resolve("tinymce.EditorManager");const _=t=>e=>{e.setEnabled(v(t));const r=()=>e.setEnabled(v(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(h.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t),t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:()=>{D(t)},onSetup:_(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:()=>{D(t)},onSetup:_(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>v(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>f(t,e)}))(t))))}();
@@ -0,0 +1,7 @@
1
+ // Exports the "charmap" plugin for usage with module loaders
2
+ // Usage:
3
+ // CommonJS:
4
+ // require('tinymce/plugins/charmap')
5
+ // ES2015:
6
+ // import 'tinymce/plugins/charmap'
7
+ require('./plugin.js');