@pie-lib/editable-html 7.22.5 → 8.1.0
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/CHANGELOG.md +37 -0
- package/lib/editor.js +214 -102
- package/lib/editor.js.map +1 -1
- package/lib/plugins/characters/custom-popover.js +73 -0
- package/lib/plugins/characters/custom-popover.js.map +1 -0
- package/lib/plugins/characters/index.js +271 -0
- package/lib/plugins/characters/index.js.map +1 -0
- package/lib/plugins/characters/utils.js +362 -0
- package/lib/plugins/characters/utils.js.map +1 -0
- package/lib/plugins/image/component.js +190 -29
- package/lib/plugins/image/component.js.map +1 -1
- package/lib/plugins/image/image-toolbar.js +4 -58
- package/lib/plugins/image/image-toolbar.js.map +1 -1
- package/lib/plugins/image/index.js +3 -1
- package/lib/plugins/image/index.js.map +1 -1
- package/lib/plugins/index.js +19 -4
- package/lib/plugins/index.js.map +1 -1
- package/lib/serialization.js +18 -1
- package/lib/serialization.js.map +1 -1
- package/package.json +5 -5
- package/src/editor.jsx +93 -17
- package/src/plugins/characters/custom-popover.js +45 -0
- package/src/plugins/characters/index.jsx +237 -0
- package/src/plugins/characters/utils.js +444 -0
- package/src/plugins/image/component.jsx +171 -19
- package/src/plugins/image/image-toolbar.jsx +2 -32
- package/src/plugins/image/index.jsx +3 -1
- package/src/plugins/index.jsx +3 -0
- package/src/serialization.jsx +9 -0
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.specialConfig = exports.spanishConfig = exports.characterIcons = void 0;
|
|
7
|
+
var spanishConfig = {
|
|
8
|
+
characters: [['á', 'é', 'í', 'ó', 'ú'], ['Á', 'É', 'Í', 'Ó', 'Ú'], ['—', '«', '»', 'ñ', 'ü'], ['-', '¿', '¡', 'Ñ', 'Ü']],
|
|
9
|
+
autoClose: true
|
|
10
|
+
};
|
|
11
|
+
exports.spanishConfig = spanishConfig;
|
|
12
|
+
var specialConfig = {
|
|
13
|
+
hasPreview: true,
|
|
14
|
+
characters: [[{
|
|
15
|
+
unicode: 'U+00A2',
|
|
16
|
+
description: 'CENT SIGN',
|
|
17
|
+
write: '¢',
|
|
18
|
+
label: '¢'
|
|
19
|
+
}, {
|
|
20
|
+
unicode: 'U+00BF',
|
|
21
|
+
description: 'INVERTED QUESTION MARK',
|
|
22
|
+
write: '¿',
|
|
23
|
+
label: '¿'
|
|
24
|
+
}, {
|
|
25
|
+
unicode: 'U+00B4',
|
|
26
|
+
description: 'ACUTE ACCENT',
|
|
27
|
+
write: '´',
|
|
28
|
+
label: '´'
|
|
29
|
+
}, {
|
|
30
|
+
unicode: 'U+00E1',
|
|
31
|
+
description: 'LATIN SMALL LETTER A WITH ACUTE',
|
|
32
|
+
write: 'á',
|
|
33
|
+
label: 'á'
|
|
34
|
+
}, {
|
|
35
|
+
unicode: 'U+00E9',
|
|
36
|
+
description: 'LATIN SMALL LETTER E WITH ACUTE',
|
|
37
|
+
write: 'é',
|
|
38
|
+
label: 'é'
|
|
39
|
+
}, {
|
|
40
|
+
unicode: 'U+00ED',
|
|
41
|
+
description: 'LATIN SMALL LETTER I WITH ACUTE',
|
|
42
|
+
write: 'í',
|
|
43
|
+
label: 'í'
|
|
44
|
+
}, {
|
|
45
|
+
unicode: 'U+00F3',
|
|
46
|
+
description: 'LATIN SMALL LETTER O WITH ACUTE',
|
|
47
|
+
write: 'ó',
|
|
48
|
+
label: 'ó'
|
|
49
|
+
}, {
|
|
50
|
+
unicode: 'U+00FA',
|
|
51
|
+
description: 'LATIN SMALL LETTER U WITH ACUTE',
|
|
52
|
+
write: 'ú',
|
|
53
|
+
label: 'ú'
|
|
54
|
+
}, {
|
|
55
|
+
unicode: 'U+00F1',
|
|
56
|
+
description: 'LATIN SMALL LETTER N WITH TILDE',
|
|
57
|
+
write: 'ñ',
|
|
58
|
+
label: 'ñ'
|
|
59
|
+
}], [{
|
|
60
|
+
unicode: 'U+20AC',
|
|
61
|
+
description: 'EURO SIGN',
|
|
62
|
+
write: '€',
|
|
63
|
+
label: '€'
|
|
64
|
+
}, {
|
|
65
|
+
unicode: 'U+00A1',
|
|
66
|
+
description: 'INVERTED EXCLAMATION MARK',
|
|
67
|
+
write: '¡',
|
|
68
|
+
label: '¡'
|
|
69
|
+
}, {
|
|
70
|
+
unicode: 'U+00C1',
|
|
71
|
+
description: 'LATIN CAPITAL LETTER A WITH ACUTE',
|
|
72
|
+
write: 'Á',
|
|
73
|
+
label: 'Á'
|
|
74
|
+
}, {
|
|
75
|
+
unicode: 'U+00C9',
|
|
76
|
+
description: 'LATIN CAPITAL LETTER E WITH ACUTE',
|
|
77
|
+
write: 'É',
|
|
78
|
+
label: 'É'
|
|
79
|
+
}, {
|
|
80
|
+
unicode: 'U+00CD',
|
|
81
|
+
description: 'LATIN CAPITAL LETTER I WITH ACUTE',
|
|
82
|
+
write: 'Í',
|
|
83
|
+
label: 'Í'
|
|
84
|
+
}, {
|
|
85
|
+
unicode: 'U+00D3',
|
|
86
|
+
description: 'LATIN CAPITAL LETTER O WITH ACUTE',
|
|
87
|
+
write: 'Ó',
|
|
88
|
+
label: 'Ó'
|
|
89
|
+
}, {
|
|
90
|
+
unicode: 'U+00DA',
|
|
91
|
+
description: 'LATIN CAPITAL LETTER U WITH ACUTE',
|
|
92
|
+
write: 'Ú',
|
|
93
|
+
label: 'Ú'
|
|
94
|
+
}, {
|
|
95
|
+
unicode: 'U+00D1',
|
|
96
|
+
description: 'LATIN CAPITAL LETTER N WITH TILDE',
|
|
97
|
+
write: 'Ñ',
|
|
98
|
+
label: 'Ñ'
|
|
99
|
+
}], [{
|
|
100
|
+
unicode: 'U+00A3',
|
|
101
|
+
description: 'POUND SIGN',
|
|
102
|
+
write: '£',
|
|
103
|
+
label: '£'
|
|
104
|
+
}, {
|
|
105
|
+
unicode: 'U+00AB',
|
|
106
|
+
description: 'LEFT-POINTING DOUBLE ANGLE QUOTATION MARK',
|
|
107
|
+
write: '«',
|
|
108
|
+
label: '«'
|
|
109
|
+
}, {
|
|
110
|
+
unicode: 'U+005E',
|
|
111
|
+
description: 'CIRCUMFLEX ACCENT',
|
|
112
|
+
write: '^',
|
|
113
|
+
label: '^'
|
|
114
|
+
}, {
|
|
115
|
+
unicode: 'U+00E2',
|
|
116
|
+
description: 'LATIN SMALL LETTER A WITH CIRCUMFLEX',
|
|
117
|
+
write: 'â',
|
|
118
|
+
label: 'â'
|
|
119
|
+
}, {
|
|
120
|
+
unicode: 'U+00EA',
|
|
121
|
+
description: 'LATIN SMALL LETTER E WITH CIRCUMFLEX',
|
|
122
|
+
write: 'ê',
|
|
123
|
+
label: 'ê'
|
|
124
|
+
}, {
|
|
125
|
+
unicode: 'U+00EE',
|
|
126
|
+
description: 'LATIN SMALL LETTER I WITH CIRCUMFLEX',
|
|
127
|
+
write: 'î',
|
|
128
|
+
label: 'î'
|
|
129
|
+
}, {
|
|
130
|
+
unicode: 'U+00F4',
|
|
131
|
+
description: 'LATIN SMALL LETTER O WITH CIRCUMFLEX',
|
|
132
|
+
write: 'ô',
|
|
133
|
+
label: 'ô'
|
|
134
|
+
}, {
|
|
135
|
+
unicode: 'U+00FB',
|
|
136
|
+
description: 'LATIN SMALL LETTER U WITH CIRCUMFLEX',
|
|
137
|
+
write: 'û',
|
|
138
|
+
label: 'û'
|
|
139
|
+
}, {
|
|
140
|
+
unicode: 'U+00E7',
|
|
141
|
+
description: 'LATIN SMALL LETTER C WITH CEDILLA',
|
|
142
|
+
write: 'ç',
|
|
143
|
+
label: 'ç'
|
|
144
|
+
}], [{
|
|
145
|
+
unicode: 'U+00A5',
|
|
146
|
+
description: 'YEN SIGN',
|
|
147
|
+
write: '¥',
|
|
148
|
+
label: '¥'
|
|
149
|
+
}, {
|
|
150
|
+
unicode: 'U+00BB',
|
|
151
|
+
description: 'RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK',
|
|
152
|
+
write: '»',
|
|
153
|
+
label: '»'
|
|
154
|
+
}, {
|
|
155
|
+
unicode: 'U+00C2',
|
|
156
|
+
description: 'LATIN CAPITAL LETTER A WITH CIRCUMFLEX',
|
|
157
|
+
write: 'Â',
|
|
158
|
+
label: 'Â'
|
|
159
|
+
}, {
|
|
160
|
+
unicode: 'U+00CA',
|
|
161
|
+
description: 'LATIN CAPITAL LETTER E WITH CIRCUMFLEX',
|
|
162
|
+
write: 'Ê',
|
|
163
|
+
label: 'Ê'
|
|
164
|
+
}, {
|
|
165
|
+
unicode: 'U+00CE',
|
|
166
|
+
description: 'LATIN CAPITAL LETTER I WITH CIRCUMFLEX',
|
|
167
|
+
write: 'Î',
|
|
168
|
+
label: 'Î'
|
|
169
|
+
}, {
|
|
170
|
+
unicode: 'U+00D4',
|
|
171
|
+
description: 'LATIN CAPITAL LETTER O WITH CIRCUMFLEX',
|
|
172
|
+
write: 'Ô',
|
|
173
|
+
label: 'Ô'
|
|
174
|
+
}, {
|
|
175
|
+
unicode: 'U+00DB',
|
|
176
|
+
description: 'LATIN CAPITAL LETTER U WITH CIRCUMFLEX',
|
|
177
|
+
write: 'Û',
|
|
178
|
+
label: 'Û'
|
|
179
|
+
}, {
|
|
180
|
+
unicode: 'U+00C7',
|
|
181
|
+
description: 'LATIN CAPITAL LETTER C WITH CEDILLA',
|
|
182
|
+
write: 'Ç',
|
|
183
|
+
label: 'Ç'
|
|
184
|
+
}], [{
|
|
185
|
+
unicode: 'U+00A0',
|
|
186
|
+
description: 'NO-BREAK SPACE',
|
|
187
|
+
write: String.fromCodePoint('0x00A0'),
|
|
188
|
+
label: ' '
|
|
189
|
+
}, {
|
|
190
|
+
unicode: 'U+00A7',
|
|
191
|
+
description: 'SECTION SIGN',
|
|
192
|
+
write: '§',
|
|
193
|
+
label: '§'
|
|
194
|
+
}, {
|
|
195
|
+
unicode: 'U+00A8',
|
|
196
|
+
description: 'DIAERESIS',
|
|
197
|
+
write: '¨',
|
|
198
|
+
label: '¨'
|
|
199
|
+
}, {
|
|
200
|
+
unicode: 'U+00E4',
|
|
201
|
+
description: 'LATIN SMALL LETTER A WITH DIAERESIS',
|
|
202
|
+
write: 'ä',
|
|
203
|
+
label: 'ä'
|
|
204
|
+
}, {
|
|
205
|
+
unicode: 'U+00EB',
|
|
206
|
+
description: 'LATIN SMALL LETTER E WITH DIAERESIS',
|
|
207
|
+
write: 'ë',
|
|
208
|
+
label: 'ë'
|
|
209
|
+
}, {
|
|
210
|
+
unicode: 'U+00EF',
|
|
211
|
+
description: 'LATIN SMALL LETTER I WITH DIAERESIS',
|
|
212
|
+
write: 'ï',
|
|
213
|
+
label: 'ï'
|
|
214
|
+
}, {
|
|
215
|
+
unicode: 'U+00F6',
|
|
216
|
+
description: 'LATIN SMALL LETTER O WITH DIAERESIS',
|
|
217
|
+
write: 'ö',
|
|
218
|
+
label: 'ö'
|
|
219
|
+
}, {
|
|
220
|
+
unicode: 'U+00FC',
|
|
221
|
+
description: 'LATIN SMALL LETTER U WITH DIAERESIS',
|
|
222
|
+
write: 'ü',
|
|
223
|
+
label: 'ü'
|
|
224
|
+
}, {
|
|
225
|
+
unicode: 'U+00DF',
|
|
226
|
+
description: 'LATIN SMALL LETTER SHARP S',
|
|
227
|
+
write: 'ß',
|
|
228
|
+
label: 'ß'
|
|
229
|
+
}], [{
|
|
230
|
+
unicode: 'U+2009',
|
|
231
|
+
description: 'THIN SPACE',
|
|
232
|
+
write: String.fromCodePoint('0x2009'),
|
|
233
|
+
label: ' '
|
|
234
|
+
}, {
|
|
235
|
+
unicode: 'U+2026',
|
|
236
|
+
description: 'HORIZONTAL ELLIPSIS',
|
|
237
|
+
write: '…',
|
|
238
|
+
label: '…'
|
|
239
|
+
}, {
|
|
240
|
+
unicode: 'U+00C4',
|
|
241
|
+
description: 'LATIN CAPITAL LETTER A WITH DIAERESIS',
|
|
242
|
+
write: 'Ä',
|
|
243
|
+
label: 'Ä'
|
|
244
|
+
}, {
|
|
245
|
+
unicode: 'U+00CB',
|
|
246
|
+
description: 'LATIN CAPITAL LETTER E WITH DIAERESIS',
|
|
247
|
+
write: 'Ë',
|
|
248
|
+
label: 'Ë'
|
|
249
|
+
}, {
|
|
250
|
+
unicode: 'U+00CF',
|
|
251
|
+
description: 'LATIN CAPITAL LETTER I WITH DIAERESIS',
|
|
252
|
+
write: 'Ï',
|
|
253
|
+
label: 'Ï'
|
|
254
|
+
}, {
|
|
255
|
+
unicode: 'U+00D6',
|
|
256
|
+
description: 'LATIN CAPITAL LETTER O WITH DIAERESIS',
|
|
257
|
+
write: 'Ö',
|
|
258
|
+
label: 'Ö'
|
|
259
|
+
}, {
|
|
260
|
+
unicode: 'U+00DC',
|
|
261
|
+
description: 'LATIN CAPITAL LETTER U WITH DIAERESIS',
|
|
262
|
+
write: 'Ü',
|
|
263
|
+
label: 'Ü'
|
|
264
|
+
}, {
|
|
265
|
+
unicode: 'U+2212',
|
|
266
|
+
description: 'MINUS SIGN',
|
|
267
|
+
write: '−',
|
|
268
|
+
label: '−'
|
|
269
|
+
}], [{
|
|
270
|
+
unicode: 'U+200A',
|
|
271
|
+
description: 'HAIR SPACE',
|
|
272
|
+
write: String.fromCodePoint('0x200A'),
|
|
273
|
+
label: ' '
|
|
274
|
+
}, {
|
|
275
|
+
unicode: 'U+2022',
|
|
276
|
+
description: 'BULLET',
|
|
277
|
+
write: '•',
|
|
278
|
+
label: '•'
|
|
279
|
+
}, {
|
|
280
|
+
unicode: 'U+0060',
|
|
281
|
+
description: 'GRAVE ACCENT',
|
|
282
|
+
write: '`',
|
|
283
|
+
label: '`'
|
|
284
|
+
}, {
|
|
285
|
+
unicode: 'U+00E0',
|
|
286
|
+
description: 'LATIN SMALL LETTER A WITH GRAVE',
|
|
287
|
+
write: 'à',
|
|
288
|
+
label: 'à'
|
|
289
|
+
}, {
|
|
290
|
+
unicode: 'U+00E8',
|
|
291
|
+
description: 'LATIN SMALL LETTER E WITH GRAVE',
|
|
292
|
+
write: 'è',
|
|
293
|
+
label: 'è'
|
|
294
|
+
}, {
|
|
295
|
+
unicode: 'U+00EC',
|
|
296
|
+
description: 'LATIN SMALL LETTER I WITH GRAVE',
|
|
297
|
+
write: 'ì',
|
|
298
|
+
label: 'ì'
|
|
299
|
+
}, {
|
|
300
|
+
unicode: 'U+00F2',
|
|
301
|
+
description: 'LATIN SMALL LETTER O WITH GRAVE',
|
|
302
|
+
write: 'ò',
|
|
303
|
+
label: 'ò'
|
|
304
|
+
}, {
|
|
305
|
+
unicode: 'U+00F9',
|
|
306
|
+
description: 'LATIN SMALL LETTER U WITH GRAVE',
|
|
307
|
+
write: 'ù',
|
|
308
|
+
label: 'ù'
|
|
309
|
+
}, {
|
|
310
|
+
unicode: 'U+2013',
|
|
311
|
+
description: 'EN DASH',
|
|
312
|
+
write: '–',
|
|
313
|
+
label: '–'
|
|
314
|
+
}], [{
|
|
315
|
+
unicode: 'U+0009',
|
|
316
|
+
description: 'TAB',
|
|
317
|
+
write: String.fromCodePoint('0x0009'),
|
|
318
|
+
label: 'TAB'
|
|
319
|
+
}, {
|
|
320
|
+
unicode: 'U+25E6',
|
|
321
|
+
description: 'WHITE BULLET',
|
|
322
|
+
write: '◦',
|
|
323
|
+
label: '◦'
|
|
324
|
+
}, {
|
|
325
|
+
unicode: 'U+00C0',
|
|
326
|
+
description: 'LATIN CAPITAL LETTER A WITH GRAVE',
|
|
327
|
+
write: 'À',
|
|
328
|
+
label: 'À'
|
|
329
|
+
}, {
|
|
330
|
+
unicode: 'U+00C8',
|
|
331
|
+
description: 'LATIN CAPITAL LETTER E WITH GRAVE',
|
|
332
|
+
write: 'È',
|
|
333
|
+
label: 'È'
|
|
334
|
+
}, {
|
|
335
|
+
unicode: 'U+00CC',
|
|
336
|
+
description: 'LATIN CAPITAL LETTER I WITH GRAVE',
|
|
337
|
+
write: 'Ì',
|
|
338
|
+
label: 'Ì'
|
|
339
|
+
}, {
|
|
340
|
+
unicode: 'U+00D2',
|
|
341
|
+
description: 'LATIN CAPITAL LETTER O WITH GRAVE',
|
|
342
|
+
write: 'Ò',
|
|
343
|
+
label: 'Ò'
|
|
344
|
+
}, {
|
|
345
|
+
unicode: 'U+00D9',
|
|
346
|
+
description: 'LATIN CAPITAL LETTER U WITH GRAVE',
|
|
347
|
+
write: 'Ù',
|
|
348
|
+
label: 'Ù'
|
|
349
|
+
}, {
|
|
350
|
+
unicode: 'U+2014',
|
|
351
|
+
description: 'EM DASH',
|
|
352
|
+
write: '—',
|
|
353
|
+
label: '—'
|
|
354
|
+
}]]
|
|
355
|
+
};
|
|
356
|
+
exports.specialConfig = specialConfig;
|
|
357
|
+
var characterIcons = {
|
|
358
|
+
spanish: 'ñ',
|
|
359
|
+
special: '€'
|
|
360
|
+
};
|
|
361
|
+
exports.characterIcons = characterIcons;
|
|
362
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/plugins/characters/utils.js"],"names":["spanishConfig","characters","autoClose","specialConfig","hasPreview","unicode","description","write","label","String","fromCodePoint","characterIcons","spanish","special"],"mappings":";;;;;;AAAO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,UAAU,EAAE,CACV,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,CADU,EAEV,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,CAFU,EAGV,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,CAHU,EAIV,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,CAJU,CADe;AAO3BC,EAAAA,SAAS,EAAE;AAPgB,CAAtB;;AAUA,IAAMC,aAAa,GAAG;AAC3BC,EAAAA,UAAU,EAAE,IADe;AAE3BH,EAAAA,UAAU,EAAE,CACV,CACE;AACEI,IAAAA,OAAO,EAAE,QADX;AAEEC,IAAAA,WAAW,EAAE,WAFf;AAGEC,IAAAA,KAAK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5BC,EAAAA,OAAO,EAAE;AAFmB,CAAvB","sourcesContent":["export const spanishConfig = {\n characters: [\n ['á', 'é', 'í', 'ó', 'ú'],\n ['Á', 'É', 'Í', 'Ó', 'Ú'],\n ['—', '«', '»', 'ñ', 'ü'],\n ['-', '¿', '¡', 'Ñ', 'Ü']\n ],\n autoClose: true\n};\n\nexport const specialConfig = {\n hasPreview: true,\n characters: [\n [\n {\n unicode: 'U+00A2',\n description: 'CENT SIGN',\n write: '¢',\n label: '¢'\n },\n {\n unicode: 'U+00BF',\n description: 'INVERTED QUESTION MARK',\n write: '¿',\n label: '¿'\n },\n {\n unicode: 'U+00B4',\n description: 'ACUTE ACCENT',\n write: '´',\n label: '´'\n },\n {\n unicode: 'U+00E1',\n description: 'LATIN SMALL LETTER A WITH ACUTE',\n write: 'á',\n label: 'á'\n },\n {\n unicode: 'U+00E9',\n description: 'LATIN SMALL LETTER E WITH ACUTE',\n write: 'é',\n label: 'é'\n },\n {\n unicode: 'U+00ED',\n description: 'LATIN SMALL LETTER I WITH ACUTE',\n write: 'í',\n label: 'í'\n },\n {\n unicode: 'U+00F3',\n description: 'LATIN SMALL LETTER O WITH ACUTE',\n write: 'ó',\n label: 'ó'\n },\n {\n unicode: 'U+00FA',\n description: 'LATIN SMALL LETTER U WITH ACUTE',\n write: 'ú',\n label: 'ú'\n },\n {\n unicode: 'U+00F1',\n description: 'LATIN SMALL LETTER N WITH TILDE',\n write: 'ñ',\n label: 'ñ'\n }\n ],\n [\n {\n unicode: 'U+20AC',\n description: 'EURO SIGN',\n write: '€',\n label: '€'\n },\n {\n unicode: 'U+00A1',\n description: 'INVERTED EXCLAMATION MARK',\n write: '¡',\n label: '¡'\n },\n {\n unicode: 'U+00C1',\n description: 'LATIN CAPITAL LETTER A WITH ACUTE',\n write: 'Á',\n label: 'Á'\n },\n {\n unicode: 'U+00C9',\n description: 'LATIN CAPITAL LETTER E WITH ACUTE',\n write: 'É',\n label: 'É'\n },\n {\n unicode: 'U+00CD',\n description: 'LATIN CAPITAL LETTER I WITH ACUTE',\n write: 'Í',\n label: 'Í'\n },\n {\n unicode: 'U+00D3',\n description: 'LATIN CAPITAL LETTER O WITH ACUTE',\n write: 'Ó',\n label: 'Ó'\n },\n {\n unicode: 'U+00DA',\n description: 'LATIN CAPITAL LETTER U WITH ACUTE',\n write: 'Ú',\n label: 'Ú'\n },\n {\n unicode: 'U+00D1',\n description: 'LATIN CAPITAL LETTER N WITH TILDE',\n write: 'Ñ',\n label: 'Ñ'\n }\n ],\n [\n {\n unicode: 'U+00A3',\n description: 'POUND SIGN',\n write: '£',\n label: '£'\n },\n {\n unicode: 'U+00AB',\n description: 'LEFT-POINTING DOUBLE ANGLE QUOTATION MARK',\n write: '«',\n label: '«'\n },\n {\n unicode: 'U+005E',\n description: 'CIRCUMFLEX ACCENT',\n write: '^',\n label: '^'\n },\n {\n unicode: 'U+00E2',\n description: 'LATIN SMALL LETTER A WITH CIRCUMFLEX',\n write: 'â',\n label: 'â'\n },\n {\n unicode: 'U+00EA',\n description: 'LATIN SMALL LETTER E WITH CIRCUMFLEX',\n write: 'ê',\n label: 'ê'\n },\n {\n unicode: 'U+00EE',\n description: 'LATIN SMALL LETTER I WITH CIRCUMFLEX',\n write: 'î',\n label: 'î'\n },\n {\n unicode: 'U+00F4',\n description: 'LATIN SMALL LETTER O WITH CIRCUMFLEX',\n write: 'ô',\n label: 'ô'\n },\n {\n unicode: 'U+00FB',\n description: 'LATIN SMALL LETTER U WITH CIRCUMFLEX',\n write: 'û',\n label: 'û'\n },\n {\n unicode: 'U+00E7',\n description: 'LATIN SMALL LETTER C WITH CEDILLA',\n write: 'ç',\n label: 'ç'\n }\n ],\n [\n {\n unicode: 'U+00A5',\n description: 'YEN SIGN',\n write: '¥',\n label: '¥'\n },\n {\n unicode: 'U+00BB',\n description: 'RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK',\n write: '»',\n label: '»'\n },\n {\n unicode: 'U+00C2',\n description: 'LATIN CAPITAL LETTER A WITH CIRCUMFLEX',\n write: 'Â',\n label: 'Â'\n },\n {\n unicode: 'U+00CA',\n description: 'LATIN CAPITAL LETTER E WITH CIRCUMFLEX',\n write: 'Ê',\n label: 'Ê'\n },\n {\n unicode: 'U+00CE',\n description: 'LATIN CAPITAL LETTER I WITH CIRCUMFLEX',\n write: 'Î',\n label: 'Î'\n },\n {\n unicode: 'U+00D4',\n description: 'LATIN CAPITAL LETTER O WITH CIRCUMFLEX',\n write: 'Ô',\n label: 'Ô'\n },\n {\n unicode: 'U+00DB',\n description: 'LATIN CAPITAL LETTER U WITH CIRCUMFLEX',\n write: 'Û',\n label: 'Û'\n },\n {\n unicode: 'U+00C7',\n description: 'LATIN CAPITAL LETTER C WITH CEDILLA',\n write: 'Ç',\n label: 'Ç'\n }\n ],\n [\n {\n unicode: 'U+00A0',\n description: 'NO-BREAK SPACE',\n write: String.fromCodePoint('0x00A0'),\n label: ' '\n },\n {\n unicode: 'U+00A7',\n description: 'SECTION SIGN',\n write: '§',\n label: '§'\n },\n {\n unicode: 'U+00A8',\n description: 'DIAERESIS',\n write: '¨',\n label: '¨'\n },\n {\n unicode: 'U+00E4',\n description: 'LATIN SMALL LETTER A WITH DIAERESIS',\n write: 'ä',\n label: 'ä'\n },\n {\n unicode: 'U+00EB',\n description: 'LATIN SMALL LETTER E WITH DIAERESIS',\n write: 'ë',\n label: 'ë'\n },\n {\n unicode: 'U+00EF',\n description: 'LATIN SMALL LETTER I WITH DIAERESIS',\n write: 'ï',\n label: 'ï'\n },\n {\n unicode: 'U+00F6',\n description: 'LATIN SMALL LETTER O WITH DIAERESIS',\n write: 'ö',\n label: 'ö'\n },\n {\n unicode: 'U+00FC',\n description: 'LATIN SMALL LETTER U WITH DIAERESIS',\n write: 'ü',\n label: 'ü'\n },\n {\n unicode: 'U+00DF',\n description: 'LATIN SMALL LETTER SHARP S',\n write: 'ß',\n label: 'ß'\n }\n ],\n [\n {\n unicode: 'U+2009',\n description: 'THIN SPACE',\n write: String.fromCodePoint('0x2009'),\n label: ' '\n },\n {\n unicode: 'U+2026',\n description: 'HORIZONTAL ELLIPSIS',\n write: '…',\n label: '…'\n },\n {\n unicode: 'U+00C4',\n description: 'LATIN CAPITAL LETTER A WITH DIAERESIS',\n write: 'Ä',\n label: 'Ä'\n },\n {\n unicode: 'U+00CB',\n description: 'LATIN CAPITAL LETTER E WITH DIAERESIS',\n write: 'Ë',\n label: 'Ë'\n },\n {\n unicode: 'U+00CF',\n description: 'LATIN CAPITAL LETTER I WITH DIAERESIS',\n write: 'Ï',\n label: 'Ï'\n },\n {\n unicode: 'U+00D6',\n description: 'LATIN CAPITAL LETTER O WITH DIAERESIS',\n write: 'Ö',\n label: 'Ö'\n },\n {\n unicode: 'U+00DC',\n description: 'LATIN CAPITAL LETTER U WITH DIAERESIS',\n write: 'Ü',\n label: 'Ü'\n },\n {\n unicode: 'U+2212',\n description: 'MINUS SIGN',\n write: '−',\n label: '−'\n }\n ],\n [\n {\n unicode: 'U+200A',\n description: 'HAIR SPACE',\n write: String.fromCodePoint('0x200A'),\n label: ' '\n },\n {\n unicode: 'U+2022',\n description: 'BULLET',\n write: '•',\n label: '•'\n },\n {\n unicode: 'U+0060',\n description: 'GRAVE ACCENT',\n write: '`',\n label: '`'\n },\n {\n unicode: 'U+00E0',\n description: 'LATIN SMALL LETTER A WITH GRAVE',\n write: 'à',\n label: 'à'\n },\n {\n unicode: 'U+00E8',\n description: 'LATIN SMALL LETTER E WITH GRAVE',\n write: 'è',\n label: 'è'\n },\n {\n unicode: 'U+00EC',\n description: 'LATIN SMALL LETTER I WITH GRAVE',\n write: 'ì',\n label: 'ì'\n },\n {\n unicode: 'U+00F2',\n description: 'LATIN SMALL LETTER O WITH GRAVE',\n write: 'ò',\n label: 'ò'\n },\n {\n unicode: 'U+00F9',\n description: 'LATIN SMALL LETTER U WITH GRAVE',\n write: 'ù',\n label: 'ù'\n },\n {\n unicode: 'U+2013',\n description: 'EN DASH',\n write: '–',\n label: '–'\n }\n ],\n [\n {\n unicode: 'U+0009',\n description: 'TAB',\n write: String.fromCodePoint('0x0009'),\n label: 'TAB'\n },\n {\n unicode: 'U+25E6',\n description: 'WHITE BULLET',\n write: '◦',\n label: '◦'\n },\n {\n unicode: 'U+00C0',\n description: 'LATIN CAPITAL LETTER A WITH GRAVE',\n write: 'À',\n label: 'À'\n },\n {\n unicode: 'U+00C8',\n description: 'LATIN CAPITAL LETTER E WITH GRAVE',\n write: 'È',\n label: 'È'\n },\n {\n unicode: 'U+00CC',\n description: 'LATIN CAPITAL LETTER I WITH GRAVE',\n write: 'Ì',\n label: 'Ì'\n },\n {\n unicode: 'U+00D2',\n description: 'LATIN CAPITAL LETTER O WITH GRAVE',\n write: 'Ò',\n label: 'Ò'\n },\n {\n unicode: 'U+00D9',\n description: 'LATIN CAPITAL LETTER U WITH GRAVE',\n write: 'Ù',\n label: 'Ù'\n },\n {\n unicode: 'U+2014',\n description: 'EM DASH',\n write: '—',\n label: '—'\n }\n ]\n ]\n};\n\nexport const characterIcons = {\n spanish: 'ñ',\n special: '€'\n};\n"],"file":"utils.js"}
|
|
@@ -88,22 +88,14 @@ var Component = /*#__PURE__*/function (_React$Component) {
|
|
|
88
88
|
var _this$props = _this.props,
|
|
89
89
|
node = _this$props.node,
|
|
90
90
|
editor = _this$props.editor;
|
|
91
|
-
var resizePercent = node.data.get('resizePercent');
|
|
92
|
-
log('[applySizeData]: resizePercent: ', resizePercent);
|
|
93
91
|
var update = node.data;
|
|
92
|
+
var w = update.get('width');
|
|
94
93
|
|
|
95
|
-
if (
|
|
96
|
-
update = update.set('
|
|
97
|
-
update = update.set('height', _this.getHeight(resizePercent));
|
|
98
|
-
} else {
|
|
99
|
-
var w = update.get('width');
|
|
100
|
-
|
|
101
|
-
if (w) {
|
|
102
|
-
update = update.set('resizePercent', _this.getPercentFromWidth(w));
|
|
103
|
-
}
|
|
94
|
+
if (w) {
|
|
95
|
+
update = update.set('resizePercent', _this.getPercentFromWidth(w));
|
|
104
96
|
}
|
|
105
97
|
|
|
106
|
-
log(
|
|
98
|
+
log("[applySizeData] update: ", update);
|
|
107
99
|
|
|
108
100
|
if (!update.equals(node.data)) {
|
|
109
101
|
editor.change(function (c) {
|
|
@@ -114,6 +106,138 @@ var Component = /*#__PURE__*/function (_React$Component) {
|
|
|
114
106
|
}
|
|
115
107
|
});
|
|
116
108
|
|
|
109
|
+
_defineProperty(_assertThisInitialized(_this), "initialiseResize", function () {
|
|
110
|
+
window.addEventListener('mousemove', _this.startResizing, false);
|
|
111
|
+
window.addEventListener('mouseup', _this.stopResizing, false);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
_defineProperty(_assertThisInitialized(_this), "loadImage", function () {
|
|
115
|
+
var _ref = _this.props || {},
|
|
116
|
+
maxImageWidth = _ref.maxImageWidth,
|
|
117
|
+
maxImageHeight = _ref.maxImageHeight;
|
|
118
|
+
|
|
119
|
+
maxImageWidth = maxImageWidth || 700;
|
|
120
|
+
maxImageHeight = maxImageHeight || 900;
|
|
121
|
+
var box = _this.img; //on first load
|
|
122
|
+
|
|
123
|
+
if (!box.style.width || box.style.width === 'auto') {
|
|
124
|
+
var dimensions = {
|
|
125
|
+
width: box && box.naturalWidth || 100,
|
|
126
|
+
height: box && box.naturalHeight || 100
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
var _this$updateImageDime = _this.updateImageDimensions(dimensions, {
|
|
130
|
+
width: dimensions.width < maxImageWidth ? dimensions.width : maxImageWidth,
|
|
131
|
+
height: dimensions.height < maxImageHeight ? dimensions.height : maxImageHeight
|
|
132
|
+
}, true),
|
|
133
|
+
width = _this$updateImageDime.width,
|
|
134
|
+
height = _this$updateImageDime.height;
|
|
135
|
+
|
|
136
|
+
box.style.width = "".concat(width, "px");
|
|
137
|
+
box.style.height = "".concat(height, "px");
|
|
138
|
+
|
|
139
|
+
_this.setState({
|
|
140
|
+
dimensions: {
|
|
141
|
+
height: height,
|
|
142
|
+
width: width
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
var _this$props2 = _this.props,
|
|
147
|
+
node = _this$props2.node,
|
|
148
|
+
editor = _this$props2.editor;
|
|
149
|
+
var update = node.data;
|
|
150
|
+
update = update.set('width', width);
|
|
151
|
+
update = update.set('height', height);
|
|
152
|
+
|
|
153
|
+
if (!update.equals(node.data)) {
|
|
154
|
+
editor.change(function (c) {
|
|
155
|
+
return c.setNodeByKey(node.key, {
|
|
156
|
+
data: update
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
_defineProperty(_assertThisInitialized(_this), "startResizing", function (e) {
|
|
164
|
+
var bounds = e.target.getBoundingClientRect();
|
|
165
|
+
var box = _this.img;
|
|
166
|
+
var dimensions = {
|
|
167
|
+
width: box && box.naturalWidth || 100,
|
|
168
|
+
height: box && box.naturalHeight || 100
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var _this$updateImageDime2 = _this.updateImageDimensions(dimensions, {
|
|
172
|
+
width: e.clientX - bounds.left,
|
|
173
|
+
height: e.clientY - bounds.top
|
|
174
|
+
}, true),
|
|
175
|
+
width = _this$updateImageDime2.width,
|
|
176
|
+
height = _this$updateImageDime2.height;
|
|
177
|
+
|
|
178
|
+
var hasMinimumWidth = width > 50 && height > 50;
|
|
179
|
+
var hasDimensionsConstraints = width <= 700 && height <= 900;
|
|
180
|
+
|
|
181
|
+
if (hasMinimumWidth && hasDimensionsConstraints && box) {
|
|
182
|
+
box.style.width = "".concat(width, "px");
|
|
183
|
+
box.style.height = "".concat(height, "px");
|
|
184
|
+
|
|
185
|
+
_this.setState({
|
|
186
|
+
dimensions: {
|
|
187
|
+
height: height,
|
|
188
|
+
width: width
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
var _this$props3 = _this.props,
|
|
193
|
+
node = _this$props3.node,
|
|
194
|
+
editor = _this$props3.editor;
|
|
195
|
+
var update = node.data;
|
|
196
|
+
update = update.set('width', width);
|
|
197
|
+
update = update.set('height', height);
|
|
198
|
+
|
|
199
|
+
if (!update.equals(node.data)) {
|
|
200
|
+
editor.change(function (c) {
|
|
201
|
+
return c.setNodeByKey(node.key, {
|
|
202
|
+
data: update
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
_defineProperty(_assertThisInitialized(_this), "stopResizing", function () {
|
|
210
|
+
window.removeEventListener('mousemove', _this.startResizing, false);
|
|
211
|
+
window.removeEventListener('mouseup', _this.stopResizing, false);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
_defineProperty(_assertThisInitialized(_this), "updateImageDimensions", function (initialDim, nextDim, keepAspectRatio, resizeType) {
|
|
215
|
+
// if we want to keep image aspect ratio
|
|
216
|
+
if (keepAspectRatio) {
|
|
217
|
+
var imageAspectRatio = initialDim.width / initialDim.height;
|
|
218
|
+
|
|
219
|
+
if (resizeType === 'height') {
|
|
220
|
+
// if we want to change image height => we update the width accordingly
|
|
221
|
+
return {
|
|
222
|
+
width: nextDim.height * imageAspectRatio,
|
|
223
|
+
height: nextDim.height
|
|
224
|
+
};
|
|
225
|
+
} // if we want to change image width => we update the height accordingly
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
width: nextDim.width,
|
|
230
|
+
height: nextDim.width / imageAspectRatio
|
|
231
|
+
};
|
|
232
|
+
} // if we don't want to keep aspect ratio, we just update both values
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
width: nextDim.width,
|
|
237
|
+
height: nextDim.height
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
|
|
117
241
|
return _this;
|
|
118
242
|
}
|
|
119
243
|
|
|
@@ -121,6 +245,11 @@ var Component = /*#__PURE__*/function (_React$Component) {
|
|
|
121
245
|
key: "componentDidMount",
|
|
122
246
|
value: function componentDidMount() {
|
|
123
247
|
this.applySizeData();
|
|
248
|
+
var resizeHandle = this.resize;
|
|
249
|
+
|
|
250
|
+
if (resizeHandle) {
|
|
251
|
+
resizeHandle.addEventListener('mousedown', this.initialiseResize, false);
|
|
252
|
+
}
|
|
124
253
|
}
|
|
125
254
|
}, {
|
|
126
255
|
key: "componentDidUpdate",
|
|
@@ -141,12 +270,12 @@ var Component = /*#__PURE__*/function (_React$Component) {
|
|
|
141
270
|
value: function render() {
|
|
142
271
|
var _this2 = this;
|
|
143
272
|
|
|
144
|
-
var _this$
|
|
145
|
-
node = _this$
|
|
146
|
-
editor = _this$
|
|
147
|
-
classes = _this$
|
|
148
|
-
attributes = _this$
|
|
149
|
-
onFocus = _this$
|
|
273
|
+
var _this$props4 = this.props,
|
|
274
|
+
node = _this$props4.node,
|
|
275
|
+
editor = _this$props4.editor,
|
|
276
|
+
classes = _this$props4.classes,
|
|
277
|
+
attributes = _this$props4.attributes,
|
|
278
|
+
onFocus = _this$props4.onFocus;
|
|
150
279
|
var active = editor.value.isFocused && editor.value.selection.hasEdgeIn(node);
|
|
151
280
|
var src = node.data.get('src');
|
|
152
281
|
var percent = node.data.get('percent');
|
|
@@ -155,7 +284,7 @@ var Component = /*#__PURE__*/function (_React$Component) {
|
|
|
155
284
|
log('[render] node.data:', node.data);
|
|
156
285
|
var size = this.getSize(node.data);
|
|
157
286
|
log('[render] style:', size);
|
|
158
|
-
var className = (0, _classnames["default"])(classes.root,
|
|
287
|
+
var className = (0, _classnames["default"])(classes.root, !loaded && classes.loading, deleteStatus === 'pending' && classes.pendingDelete);
|
|
159
288
|
var progressClasses = (0, _classnames["default"])(classes.progress, loaded && classes.hideProgress);
|
|
160
289
|
return [/*#__PURE__*/_react["default"].createElement("span", {
|
|
161
290
|
key: 'sp1'
|
|
@@ -167,13 +296,21 @@ var Component = /*#__PURE__*/function (_React$Component) {
|
|
|
167
296
|
mode: "determinate",
|
|
168
297
|
value: percent > 0 ? percent : 0,
|
|
169
298
|
className: progressClasses
|
|
170
|
-
}), /*#__PURE__*/_react["default"].createElement("
|
|
171
|
-
|
|
172
|
-
}, attributes, {
|
|
173
|
-
|
|
174
|
-
|
|
299
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
300
|
+
className: classes.imageContainer
|
|
301
|
+
}, /*#__PURE__*/_react["default"].createElement("img", _extends({}, attributes, {
|
|
302
|
+
className: (0, _classnames["default"])(classes.image, active && classes.active),
|
|
303
|
+
ref: function ref(_ref2) {
|
|
304
|
+
_this2.img = _ref2;
|
|
305
|
+
},
|
|
306
|
+
src: src,
|
|
307
|
+
style: size,
|
|
308
|
+
onLoad: this.loadImage
|
|
309
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
310
|
+
ref: function ref(_ref3) {
|
|
311
|
+
_this2.resize = _ref3;
|
|
175
312
|
},
|
|
176
|
-
|
|
313
|
+
className: (0, _classnames["default"])(classes.resize, 'resize')
|
|
177
314
|
}))), /*#__PURE__*/_react["default"].createElement("span", {
|
|
178
315
|
key: 'sp2'
|
|
179
316
|
}, "\xA0")];
|
|
@@ -194,7 +331,9 @@ _defineProperty(Component, "propTypes", {
|
|
|
194
331
|
classes: _propTypes["default"].object.isRequired,
|
|
195
332
|
attributes: _propTypes["default"].object,
|
|
196
333
|
onFocus: _propTypes["default"].func,
|
|
197
|
-
onBlur: _propTypes["default"].func
|
|
334
|
+
onBlur: _propTypes["default"].func,
|
|
335
|
+
maxImageWidth: _propTypes["default"].number,
|
|
336
|
+
maxImageHeight: _propTypes["default"].number
|
|
198
337
|
});
|
|
199
338
|
|
|
200
339
|
var styles = function styles(theme) {
|
|
@@ -234,12 +373,34 @@ var styles = function styles(theme) {
|
|
|
234
373
|
display: 'inline-block',
|
|
235
374
|
transition: 'opacity 200ms linear'
|
|
236
375
|
},
|
|
237
|
-
active: {
|
|
238
|
-
border: "solid 1px ".concat(theme.palette.primary.main)
|
|
239
|
-
},
|
|
240
376
|
"delete": {
|
|
241
377
|
position: 'absolute',
|
|
242
378
|
right: 0
|
|
379
|
+
},
|
|
380
|
+
imageContainer: {
|
|
381
|
+
position: 'relative',
|
|
382
|
+
width: 'fit-content',
|
|
383
|
+
display: 'flex',
|
|
384
|
+
alignItems: 'center',
|
|
385
|
+
'&&:hover > .resize': {
|
|
386
|
+
display: 'block'
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
active: {
|
|
390
|
+
border: "solid 1px ".concat(theme.palette.primary.main)
|
|
391
|
+
},
|
|
392
|
+
resize: {
|
|
393
|
+
backgroundColor: theme.palette.primary.main,
|
|
394
|
+
cursor: 'col-resize',
|
|
395
|
+
height: '35px',
|
|
396
|
+
width: '5px',
|
|
397
|
+
borderRadius: 8,
|
|
398
|
+
marginLeft: '5px',
|
|
399
|
+
marginRight: '10px',
|
|
400
|
+
display: 'none'
|
|
401
|
+
},
|
|
402
|
+
drawableHeight: {
|
|
403
|
+
minHeight: 350
|
|
243
404
|
}
|
|
244
405
|
};
|
|
245
406
|
};
|