@contentful/field-editor-markdown 0.16.3 → 0.18.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 +30 -151
- package/README.md +0 -1
- package/dist/components/HeadingSelector.d.ts +1 -0
- package/dist/components/icons.d.ts +0 -9
- package/dist/field-editor-markdown.cjs.development.js +334 -571
- package/dist/field-editor-markdown.cjs.development.js.map +1 -1
- package/dist/field-editor-markdown.cjs.production.min.js +1 -1
- package/dist/field-editor-markdown.cjs.production.min.js.map +1 -1
- package/dist/field-editor-markdown.esm.js +325 -562
- package/dist/field-editor-markdown.esm.js.map +1 -1
- package/package.json +9 -8
|
@@ -12,10 +12,10 @@ require('codemirror/addon/display/autorefresh');
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var React__default = _interopDefault(React);
|
|
14
14
|
var emotion = require('emotion');
|
|
15
|
-
var tokens = _interopDefault(require('@contentful/
|
|
15
|
+
var tokens = _interopDefault(require('@contentful/f36-tokens'));
|
|
16
16
|
var fieldEditorShared = require('@contentful/field-editor-shared');
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var f36Components = require('@contentful/f36-components');
|
|
18
|
+
var f36Icons = require('@contentful/f36-icons');
|
|
19
19
|
var transform = _interopDefault(require('lodash/transform'));
|
|
20
20
|
var throttle = _interopDefault(require('lodash/throttle'));
|
|
21
21
|
var CodeMirror = _interopDefault(require('codemirror'));
|
|
@@ -195,16 +195,7 @@ var _excluded = ["label"],
|
|
|
195
195
|
_excluded7 = ["label"],
|
|
196
196
|
_excluded8 = ["label"],
|
|
197
197
|
_excluded9 = ["label"],
|
|
198
|
-
_excluded10 = ["label"]
|
|
199
|
-
_excluded11 = ["label"],
|
|
200
|
-
_excluded12 = ["label"],
|
|
201
|
-
_excluded13 = ["label"],
|
|
202
|
-
_excluded14 = ["label"],
|
|
203
|
-
_excluded15 = ["label"],
|
|
204
|
-
_excluded16 = ["label"],
|
|
205
|
-
_excluded17 = ["label"],
|
|
206
|
-
_excluded18 = ["label"],
|
|
207
|
-
_excluded19 = ["label"];
|
|
198
|
+
_excluded10 = ["label"];
|
|
208
199
|
var srOnly = /*#__PURE__*/emotion.css({
|
|
209
200
|
position: 'absolute',
|
|
210
201
|
width: '1px',
|
|
@@ -215,49 +206,49 @@ var srOnly = /*#__PURE__*/emotion.css({
|
|
|
215
206
|
clip: 'rect(0, 0, 0, 0)',
|
|
216
207
|
border: '0'
|
|
217
208
|
});
|
|
218
|
-
var
|
|
209
|
+
var Zen = function Zen(_ref) {
|
|
219
210
|
var label = _ref.label,
|
|
220
211
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
221
212
|
|
|
222
213
|
return React__default.createElement("svg", Object.assign({
|
|
223
214
|
width: 14,
|
|
224
215
|
height: 14,
|
|
225
|
-
viewBox: "0 0
|
|
216
|
+
viewBox: "0 0 1792 1792"
|
|
226
217
|
}, rest), React__default.createElement("path", {
|
|
227
|
-
d: "
|
|
218
|
+
d: "M1411 541l-355 355 355 355 144-144q29-31 70-14 39 17 39 59v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l144-144-355-355-355 355 144 144q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l144 144 355-355-355-355-144 144q-19 19-45 19-12 0-24-5-40-17-40-59V192q0-26 19-45t45-19h448q42 0 59 40 17 39-14 69L541 381l355 355 355-355-144-144q-31-30-14-69 17-40 59-40h448q26 0 45 19t19 45v448q0 42-39 59-13 5-25 5-26 0-45-19z"
|
|
228
219
|
}), React__default.createElement("span", {
|
|
229
220
|
className: srOnly
|
|
230
221
|
}, label));
|
|
231
222
|
};
|
|
232
|
-
var
|
|
223
|
+
var Strikethrough = function Strikethrough(_ref2) {
|
|
233
224
|
var label = _ref2.label,
|
|
234
225
|
rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
235
226
|
|
|
236
227
|
return React__default.createElement("svg", Object.assign({
|
|
237
228
|
width: 14,
|
|
238
229
|
height: 14,
|
|
239
|
-
viewBox: "0 0
|
|
230
|
+
viewBox: "0 0 1792 1792"
|
|
240
231
|
}, rest), React__default.createElement("path", {
|
|
241
|
-
d: "
|
|
232
|
+
d: "M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9H32q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zM483 832q-28-35-51-80-48-98-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52H483zm507 256h411q7 39 7 92 0 111-41 212-23 56-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"
|
|
242
233
|
}), React__default.createElement("span", {
|
|
243
234
|
className: srOnly
|
|
244
235
|
}, label));
|
|
245
236
|
};
|
|
246
|
-
var
|
|
237
|
+
var Indent = function Indent(_ref3) {
|
|
247
238
|
var label = _ref3.label,
|
|
248
239
|
rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
249
240
|
|
|
250
241
|
return React__default.createElement("svg", Object.assign({
|
|
251
242
|
width: 14,
|
|
252
243
|
height: 14,
|
|
253
|
-
viewBox: "0 0
|
|
244
|
+
viewBox: "0 0 1792 1792"
|
|
254
245
|
}, rest), React__default.createElement("path", {
|
|
255
|
-
d: "
|
|
246
|
+
d: "M352 832q0 14-9 23L55 1143q-9 9-23 9-13 0-22.5-9.5T0 1120V544q0-13 9.5-22.5T32 512q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
|
|
256
247
|
}), React__default.createElement("span", {
|
|
257
248
|
className: srOnly
|
|
258
249
|
}, label));
|
|
259
250
|
};
|
|
260
|
-
var
|
|
251
|
+
var Dedent = function Dedent(_ref4) {
|
|
261
252
|
var label = _ref4.label,
|
|
262
253
|
rest = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
263
254
|
|
|
@@ -266,26 +257,26 @@ var List = function List(_ref4) {
|
|
|
266
257
|
height: 14,
|
|
267
258
|
viewBox: "0 0 1792 1792"
|
|
268
259
|
}, rest), React__default.createElement("path", {
|
|
269
|
-
d: "
|
|
260
|
+
d: "M384 544v576q0 13-9.5 22.5T352 1152q-14 0-23-9L41 855q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5T384 544zm1408 768v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
|
|
270
261
|
}), React__default.createElement("span", {
|
|
271
262
|
className: srOnly
|
|
272
263
|
}, label));
|
|
273
264
|
};
|
|
274
|
-
var
|
|
265
|
+
var Cubes = function Cubes(_ref5) {
|
|
275
266
|
var label = _ref5.label,
|
|
276
267
|
rest = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
277
268
|
|
|
278
269
|
return React__default.createElement("svg", Object.assign({
|
|
279
|
-
width:
|
|
270
|
+
width: 18,
|
|
280
271
|
height: 14,
|
|
281
|
-
viewBox: "0 0
|
|
272
|
+
viewBox: "0 0 2304 1792"
|
|
282
273
|
}, rest), React__default.createElement("path", {
|
|
283
|
-
d: "
|
|
274
|
+
d: "M640 1632l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm1088 454l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm-448-293l384-165V454l-384 164v267zm-64-379l441-189-441-189-441 189zm1088 518v416q0 36-19 67t-52 47l-448 224q-25 14-57 14t-57-14l-448-224q-4-2-7-4-2 2-7 4l-448 224q-25 14-57 14t-57-14L71 1554q-33-16-52-47t-19-67v-416q0-38 21.5-70T78 906l434-186V320q0-38 21.5-70t56.5-48l448-192q23-10 50-10t50 10l448 192q35 16 56.5 48t21.5 70v400l434 186q36 16 57 48t21 70z"
|
|
284
275
|
}), React__default.createElement("span", {
|
|
285
276
|
className: srOnly
|
|
286
277
|
}, label));
|
|
287
278
|
};
|
|
288
|
-
var
|
|
279
|
+
var Table = function Table(_ref6) {
|
|
289
280
|
var label = _ref6.label,
|
|
290
281
|
rest = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
291
282
|
|
|
@@ -294,12 +285,12 @@ var Link = function Link(_ref6) {
|
|
|
294
285
|
height: 14,
|
|
295
286
|
viewBox: "0 0 1792 1792"
|
|
296
287
|
}, rest), React__default.createElement("path", {
|
|
297
|
-
d: "
|
|
288
|
+
d: "M576 1376v-192q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V800q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zM576 608V416q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768V416q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V416q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47H224q-66 0-113-47t-47-113V288q0-66 47-113t113-47h1344q66 0 113 47t47 113z"
|
|
298
289
|
}), React__default.createElement("span", {
|
|
299
290
|
className: srOnly
|
|
300
291
|
}, label));
|
|
301
292
|
};
|
|
302
|
-
var
|
|
293
|
+
var SpecialChar = function SpecialChar(_ref7) {
|
|
303
294
|
var label = _ref7.label,
|
|
304
295
|
rest = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
305
296
|
|
|
@@ -308,12 +299,12 @@ var Heading = function Heading(_ref7) {
|
|
|
308
299
|
height: 14,
|
|
309
300
|
viewBox: "0 0 1792 1792"
|
|
310
301
|
}, rest), React__default.createElement("path", {
|
|
311
|
-
d: "
|
|
302
|
+
d: "M1360 1307l35 159q3 12-3 22.5t-17 14.5l-5 1q-4 2-10.5 3.5t-16 4.5-21.5 5.5-25.5 5-30 5-33.5 4.5-36.5 3-38.5 1q-234 0-409-130.5T511 1054h-95q-13 0-22.5-9.5T384 1022V909q0-13 9.5-22.5T416 877h66q-2-57 1-105h-67q-14 0-23-9t-9-23V626q0-14 9-23t23-9h98q67-210 243.5-338T1158 128q102 0 194 23 11 3 20 15 6 11 3 24l-43 159q-3 13-14 19.5t-24 2.5l-4-1q-4-1-11.5-2.5L1261 364l-22.5-3.5-26-3-29-2.5-29.5-1q-126 0-226 64T778 594h468q16 0 25 12 10 12 7 26l-24 114q-5 26-32 26H734q-3 37 0 105h459q15 0 25 12 9 12 6 27l-24 112q-2 11-11 18.5t-20 7.5H782q48 117 149.5 185.5T1160 1308q18 0 36-1.5t33.5-3.5 29.5-4.5 24.5-5 18.5-4.5l12-3 5-2q13-5 26 2 12 7 15 21z"
|
|
312
303
|
}), React__default.createElement("span", {
|
|
313
304
|
className: srOnly
|
|
314
305
|
}, label));
|
|
315
306
|
};
|
|
316
|
-
var
|
|
307
|
+
var OrgLinks = function OrgLinks(_ref8) {
|
|
317
308
|
var label = _ref8.label,
|
|
318
309
|
rest = _objectWithoutPropertiesLoose(_ref8, _excluded8);
|
|
319
310
|
|
|
@@ -322,12 +313,12 @@ var Zen = function Zen(_ref8) {
|
|
|
322
313
|
height: 14,
|
|
323
314
|
viewBox: "0 0 1792 1792"
|
|
324
315
|
}, rest), React__default.createElement("path", {
|
|
325
|
-
d: "
|
|
316
|
+
d: "M1792 1248v320q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H960v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H736q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H320v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H96q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960q0-52 38-90t90-38h512V640h-96q-40 0-68-28t-28-68V224q0-40 28-68t68-28h320q40 0 68 28t28 68v320q0 40-28 68t-68 28h-96v192h512q52 0 90 38t38 90v192h96q40 0 68 28t28 68z"
|
|
326
317
|
}), React__default.createElement("span", {
|
|
327
318
|
className: srOnly
|
|
328
319
|
}, label));
|
|
329
320
|
};
|
|
330
|
-
var
|
|
321
|
+
var Undo = function Undo(_ref9) {
|
|
331
322
|
var label = _ref9.label,
|
|
332
323
|
rest = _objectWithoutPropertiesLoose(_ref9, _excluded9);
|
|
333
324
|
|
|
@@ -336,141 +327,15 @@ var Strikethrough = function Strikethrough(_ref9) {
|
|
|
336
327
|
height: 14,
|
|
337
328
|
viewBox: "0 0 1792 1792"
|
|
338
329
|
}, rest), React__default.createElement("path", {
|
|
339
|
-
d: "
|
|
330
|
+
d: "M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5T305 1387q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5T1258 1258t109.5-163.5T1408 896t-40.5-198.5T1258 534t-163.5-109.5T896 384q-98 0-188 35.5T548 521l137 138q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45V256q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5T896 128q156 0 298 61t245 164 164 245 61 298z"
|
|
340
331
|
}), React__default.createElement("span", {
|
|
341
332
|
className: srOnly
|
|
342
333
|
}, label));
|
|
343
334
|
};
|
|
344
|
-
var
|
|
335
|
+
var Redo = function Redo(_ref10) {
|
|
345
336
|
var label = _ref10.label,
|
|
346
337
|
rest = _objectWithoutPropertiesLoose(_ref10, _excluded10);
|
|
347
338
|
|
|
348
|
-
return React__default.createElement("svg", Object.assign({
|
|
349
|
-
width: 18,
|
|
350
|
-
height: 14,
|
|
351
|
-
viewBox: "0 0 2048 1792"
|
|
352
|
-
}, rest), React__default.createElement("path", {
|
|
353
|
-
d: "M681 1399l-50 50q-10 10-23 10t-23-10L119 983q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23L288 960l393 393q10 10 10 23t-10 23zm591-1067L899 1623q-4 13-15.5 19.5T860 1645l-62-17q-13-4-19.5-15.5T776 1588l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"
|
|
354
|
-
}), React__default.createElement("span", {
|
|
355
|
-
className: srOnly
|
|
356
|
-
}, label));
|
|
357
|
-
};
|
|
358
|
-
var Hr = function Hr(_ref11) {
|
|
359
|
-
var label = _ref11.label,
|
|
360
|
-
rest = _objectWithoutPropertiesLoose(_ref11, _excluded11);
|
|
361
|
-
|
|
362
|
-
return React__default.createElement("svg", Object.assign({
|
|
363
|
-
width: 14,
|
|
364
|
-
height: 14,
|
|
365
|
-
viewBox: "0 0 1792 1792"
|
|
366
|
-
}, rest), React__default.createElement("path", {
|
|
367
|
-
d: "M1792 896q0 26-19 45l-256 256q-19 19-45 19t-45-19-19-45v-128H384v128q0 26-19 45t-45 19-45-19L19 941Q0 922 0 896t19-45l256-256q19-19 45-19t45 19 19 45v128h1024V640q0-26 19-45t45-19 45 19l256 256q19 19 19 45z"
|
|
368
|
-
}), React__default.createElement("span", {
|
|
369
|
-
className: srOnly
|
|
370
|
-
}, label));
|
|
371
|
-
};
|
|
372
|
-
var Indent = function Indent(_ref12) {
|
|
373
|
-
var label = _ref12.label,
|
|
374
|
-
rest = _objectWithoutPropertiesLoose(_ref12, _excluded12);
|
|
375
|
-
|
|
376
|
-
return React__default.createElement("svg", Object.assign({
|
|
377
|
-
width: 14,
|
|
378
|
-
height: 14,
|
|
379
|
-
viewBox: "0 0 1792 1792"
|
|
380
|
-
}, rest), React__default.createElement("path", {
|
|
381
|
-
d: "M352 832q0 14-9 23L55 1143q-9 9-23 9-13 0-22.5-9.5T0 1120V544q0-13 9.5-22.5T32 512q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
|
|
382
|
-
}), React__default.createElement("span", {
|
|
383
|
-
className: srOnly
|
|
384
|
-
}, label));
|
|
385
|
-
};
|
|
386
|
-
var Dedent = function Dedent(_ref13) {
|
|
387
|
-
var label = _ref13.label,
|
|
388
|
-
rest = _objectWithoutPropertiesLoose(_ref13, _excluded13);
|
|
389
|
-
|
|
390
|
-
return React__default.createElement("svg", Object.assign({
|
|
391
|
-
width: 14,
|
|
392
|
-
height: 14,
|
|
393
|
-
viewBox: "0 0 1792 1792"
|
|
394
|
-
}, rest), React__default.createElement("path", {
|
|
395
|
-
d: "M384 544v576q0 13-9.5 22.5T352 1152q-14 0-23-9L41 855q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5T384 544zm1408 768v192q0 13-9.5 22.5t-22.5 9.5H32q-13 0-22.5-9.5T0 1504v-192q0-13 9.5-22.5T32 1280h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5H672q-13 0-22.5-9.5T640 1120V928q0-13 9.5-22.5T672 896h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 768H672q-13 0-22.5-9.5T640 736V544q0-13 9.5-22.5T672 512h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5T1760 384H32q-13 0-22.5-9.5T0 352V160q0-13 9.5-22.5T32 128h1728q13 0 22.5 9.5t9.5 22.5z"
|
|
396
|
-
}), React__default.createElement("span", {
|
|
397
|
-
className: srOnly
|
|
398
|
-
}, label));
|
|
399
|
-
};
|
|
400
|
-
var Cubes = function Cubes(_ref14) {
|
|
401
|
-
var label = _ref14.label,
|
|
402
|
-
rest = _objectWithoutPropertiesLoose(_ref14, _excluded14);
|
|
403
|
-
|
|
404
|
-
return React__default.createElement("svg", Object.assign({
|
|
405
|
-
width: 18,
|
|
406
|
-
height: 14,
|
|
407
|
-
viewBox: "0 0 2304 1792"
|
|
408
|
-
}, rest), React__default.createElement("path", {
|
|
409
|
-
d: "M640 1632l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm1088 454l384-192v-314l-384 164v342zm-64-454l404-173-404-173-404 173zm-448-293l384-165V454l-384 164v267zm-64-379l441-189-441-189-441 189zm1088 518v416q0 36-19 67t-52 47l-448 224q-25 14-57 14t-57-14l-448-224q-4-2-7-4-2 2-7 4l-448 224q-25 14-57 14t-57-14L71 1554q-33-16-52-47t-19-67v-416q0-38 21.5-70T78 906l434-186V320q0-38 21.5-70t56.5-48l448-192q23-10 50-10t50 10l448 192q35 16 56.5 48t21.5 70v400l434 186q36 16 57 48t21 70z"
|
|
410
|
-
}), React__default.createElement("span", {
|
|
411
|
-
className: srOnly
|
|
412
|
-
}, label));
|
|
413
|
-
};
|
|
414
|
-
var Table = function Table(_ref15) {
|
|
415
|
-
var label = _ref15.label,
|
|
416
|
-
rest = _objectWithoutPropertiesLoose(_ref15, _excluded15);
|
|
417
|
-
|
|
418
|
-
return React__default.createElement("svg", Object.assign({
|
|
419
|
-
width: 14,
|
|
420
|
-
height: 14,
|
|
421
|
-
viewBox: "0 0 1792 1792"
|
|
422
|
-
}, rest), React__default.createElement("path", {
|
|
423
|
-
d: "M576 1376v-192q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V800q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zM576 608V416q0-14-9-23t-23-9H224q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768V416q0-14-9-23t-23-9H736q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384V800q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384V416q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47H224q-66 0-113-47t-47-113V288q0-66 47-113t113-47h1344q66 0 113 47t47 113z"
|
|
424
|
-
}), React__default.createElement("span", {
|
|
425
|
-
className: srOnly
|
|
426
|
-
}, label));
|
|
427
|
-
};
|
|
428
|
-
var SpecialChar = function SpecialChar(_ref16) {
|
|
429
|
-
var label = _ref16.label,
|
|
430
|
-
rest = _objectWithoutPropertiesLoose(_ref16, _excluded16);
|
|
431
|
-
|
|
432
|
-
return React__default.createElement("svg", Object.assign({
|
|
433
|
-
width: 14,
|
|
434
|
-
height: 14,
|
|
435
|
-
viewBox: "0 0 1792 1792"
|
|
436
|
-
}, rest), React__default.createElement("path", {
|
|
437
|
-
d: "M1360 1307l35 159q3 12-3 22.5t-17 14.5l-5 1q-4 2-10.5 3.5t-16 4.5-21.5 5.5-25.5 5-30 5-33.5 4.5-36.5 3-38.5 1q-234 0-409-130.5T511 1054h-95q-13 0-22.5-9.5T384 1022V909q0-13 9.5-22.5T416 877h66q-2-57 1-105h-67q-14 0-23-9t-9-23V626q0-14 9-23t23-9h98q67-210 243.5-338T1158 128q102 0 194 23 11 3 20 15 6 11 3 24l-43 159q-3 13-14 19.5t-24 2.5l-4-1q-4-1-11.5-2.5L1261 364l-22.5-3.5-26-3-29-2.5-29.5-1q-126 0-226 64T778 594h468q16 0 25 12 10 12 7 26l-24 114q-5 26-32 26H734q-3 37 0 105h459q15 0 25 12 9 12 6 27l-24 112q-2 11-11 18.5t-20 7.5H782q48 117 149.5 185.5T1160 1308q18 0 36-1.5t33.5-3.5 29.5-4.5 24.5-5 18.5-4.5l12-3 5-2q13-5 26 2 12 7 15 21z"
|
|
438
|
-
}), React__default.createElement("span", {
|
|
439
|
-
className: srOnly
|
|
440
|
-
}, label));
|
|
441
|
-
};
|
|
442
|
-
var OrgLinks = function OrgLinks(_ref17) {
|
|
443
|
-
var label = _ref17.label,
|
|
444
|
-
rest = _objectWithoutPropertiesLoose(_ref17, _excluded17);
|
|
445
|
-
|
|
446
|
-
return React__default.createElement("svg", Object.assign({
|
|
447
|
-
width: 14,
|
|
448
|
-
height: 14,
|
|
449
|
-
viewBox: "0 0 1792 1792"
|
|
450
|
-
}, rest), React__default.createElement("path", {
|
|
451
|
-
d: "M1792 1248v320q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H960v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H736q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960H320v192h96q40 0 68 28t28 68v320q0 40-28 68t-68 28H96q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h96V960q0-52 38-90t90-38h512V640h-96q-40 0-68-28t-28-68V224q0-40 28-68t68-28h320q40 0 68 28t28 68v320q0 40-28 68t-68 28h-96v192h512q52 0 90 38t38 90v192h96q40 0 68 28t28 68z"
|
|
452
|
-
}), React__default.createElement("span", {
|
|
453
|
-
className: srOnly
|
|
454
|
-
}, label));
|
|
455
|
-
};
|
|
456
|
-
var Undo = function Undo(_ref18) {
|
|
457
|
-
var label = _ref18.label,
|
|
458
|
-
rest = _objectWithoutPropertiesLoose(_ref18, _excluded18);
|
|
459
|
-
|
|
460
|
-
return React__default.createElement("svg", Object.assign({
|
|
461
|
-
width: 14,
|
|
462
|
-
height: 14,
|
|
463
|
-
viewBox: "0 0 1792 1792"
|
|
464
|
-
}, rest), React__default.createElement("path", {
|
|
465
|
-
d: "M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5T305 1387q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5T1258 1258t109.5-163.5T1408 896t-40.5-198.5T1258 534t-163.5-109.5T896 384q-98 0-188 35.5T548 521l137 138q31 30 14 69-17 40-59 40H192q-26 0-45-19t-19-45V256q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5T896 128q156 0 298 61t245 164 164 245 61 298z"
|
|
466
|
-
}), React__default.createElement("span", {
|
|
467
|
-
className: srOnly
|
|
468
|
-
}, label));
|
|
469
|
-
};
|
|
470
|
-
var Redo = function Redo(_ref19) {
|
|
471
|
-
var label = _ref19.label,
|
|
472
|
-
rest = _objectWithoutPropertiesLoose(_ref19, _excluded19);
|
|
473
|
-
|
|
474
339
|
return React__default.createElement("svg", Object.assign({
|
|
475
340
|
width: 14,
|
|
476
341
|
height: 14,
|
|
@@ -483,36 +348,21 @@ var Redo = function Redo(_ref19) {
|
|
|
483
348
|
};
|
|
484
349
|
|
|
485
350
|
var HeadingSelector = function HeadingSelector(props) {
|
|
486
|
-
var _useState = React.useState(false),
|
|
487
|
-
isOpen = _useState[0],
|
|
488
|
-
setOpen = _useState[1];
|
|
489
|
-
|
|
490
351
|
var handleMenuClick = function handleMenuClick(heading) {
|
|
491
352
|
props.onSelect(heading);
|
|
492
|
-
setOpen(false);
|
|
493
353
|
};
|
|
494
354
|
|
|
495
|
-
return React__default.createElement(
|
|
496
|
-
isOpen: isOpen,
|
|
497
|
-
onClose: function onClose() {
|
|
498
|
-
return setOpen(false);
|
|
499
|
-
},
|
|
500
|
-
toggleElement: React__default.cloneElement(props.children, {
|
|
501
|
-
onClick: function onClick() {
|
|
502
|
-
return setOpen(!isOpen);
|
|
503
|
-
}
|
|
504
|
-
})
|
|
505
|
-
}, React__default.createElement(forma36ReactComponents.DropdownList, null, React__default.createElement(forma36ReactComponents.DropdownListItem, {
|
|
355
|
+
return React__default.createElement(f36Components.Menu, null, React__default.createElement(f36Components.Menu.Trigger, null, props.children), React__default.createElement(f36Components.Menu.List, null, React__default.createElement(f36Components.Menu.Item, {
|
|
506
356
|
testId: "markdown-action-button-heading-h1",
|
|
507
357
|
onClick: function onClick() {
|
|
508
358
|
return handleMenuClick('h1');
|
|
509
359
|
}
|
|
510
|
-
}, "Heading 1"), React__default.createElement(
|
|
360
|
+
}, "Heading 1"), React__default.createElement(f36Components.Menu.Item, {
|
|
511
361
|
testId: "markdown-action-button-heading-h2",
|
|
512
362
|
onClick: function onClick() {
|
|
513
363
|
return handleMenuClick('h2');
|
|
514
364
|
}
|
|
515
|
-
}, "Heading 2"), React__default.createElement(
|
|
365
|
+
}, "Heading 2"), React__default.createElement(f36Components.Menu.Item, {
|
|
516
366
|
testId: "markdown-action-button-heading-h3",
|
|
517
367
|
onClick: function onClick() {
|
|
518
368
|
return handleMenuClick('h3');
|
|
@@ -524,12 +374,12 @@ var InsertLinkSelector = function InsertLinkSelector(props) {
|
|
|
524
374
|
if (props.canAddNew) {
|
|
525
375
|
return React__default.createElement(MultipleMediaContextMenu, Object.assign({}, props));
|
|
526
376
|
} else {
|
|
527
|
-
return React__default.createElement(
|
|
528
|
-
|
|
529
|
-
|
|
377
|
+
return React__default.createElement(f36Components.Button, {
|
|
378
|
+
isDisabled: props.disabled,
|
|
379
|
+
startIcon: React__default.createElement(f36Icons.AssetIcon, null),
|
|
530
380
|
testId: "markdownEditor.linkExistingAssets",
|
|
531
381
|
size: "small",
|
|
532
|
-
|
|
382
|
+
variant: "secondary",
|
|
533
383
|
onClick: function onClick() {
|
|
534
384
|
props.onSelectExisting();
|
|
535
385
|
}
|
|
@@ -538,45 +388,29 @@ var InsertLinkSelector = function InsertLinkSelector(props) {
|
|
|
538
388
|
};
|
|
539
389
|
|
|
540
390
|
var MultipleMediaContextMenu = function MultipleMediaContextMenu(props) {
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
isOpen: isOpen,
|
|
552
|
-
position: "bottom-right",
|
|
553
|
-
onClose: function onClose() {
|
|
554
|
-
return setOpen(false);
|
|
555
|
-
},
|
|
556
|
-
toggleElement: React__default.createElement(forma36ReactComponents.Button, {
|
|
557
|
-
disabled: props.disabled,
|
|
558
|
-
icon: "Asset",
|
|
559
|
-
testId: "markdownEditor.insertMediaDropdownTrigger",
|
|
560
|
-
size: "small",
|
|
561
|
-
buttonType: "muted",
|
|
562
|
-
indicateDropdown: true,
|
|
563
|
-
onClick: function onClick() {
|
|
564
|
-
return setOpen(!isOpen);
|
|
565
|
-
}
|
|
566
|
-
}, "Insert media")
|
|
567
|
-
}, React__default.createElement(forma36ReactComponents.DropdownList, null, React__default.createElement(forma36ReactComponents.DropdownListItem, {
|
|
391
|
+
return React__default.createElement(f36Components.Menu, {
|
|
392
|
+
placement: "bottom-end"
|
|
393
|
+
}, React__default.createElement(f36Components.Menu.Trigger, null, React__default.createElement(f36Components.Button, {
|
|
394
|
+
endIcon: React__default.createElement(f36Icons.ChevronDownIcon, null),
|
|
395
|
+
isDisabled: props.disabled,
|
|
396
|
+
startIcon: React__default.createElement(f36Icons.AssetIcon, null),
|
|
397
|
+
testId: "markdownEditor.insertMediaDropdownTrigger",
|
|
398
|
+
size: "small",
|
|
399
|
+
variant: "secondary"
|
|
400
|
+
}, "Insert media")), React__default.createElement(f36Components.Menu.List, null, React__default.createElement(f36Components.Menu.Item, {
|
|
568
401
|
testId: "markdownEditor.uploadAssetsAndLink",
|
|
569
402
|
onClick: function onClick() {
|
|
570
|
-
return
|
|
403
|
+
return props.onAddNew();
|
|
571
404
|
}
|
|
572
|
-
}, "Add new media and link"), React__default.createElement(
|
|
405
|
+
}, "Add new media and link"), React__default.createElement(f36Components.Menu.Item, {
|
|
573
406
|
testId: "markdownEditor.linkExistingAssets",
|
|
574
407
|
onClick: function onClick() {
|
|
575
|
-
return
|
|
408
|
+
return props.onSelectExisting();
|
|
576
409
|
}
|
|
577
410
|
}, "Link existing media")));
|
|
578
411
|
};
|
|
579
412
|
|
|
413
|
+
var _excluded$1 = ["tooltip", "onClick", "children", "className", "variant", "tooltipPlace", "isDisabled"];
|
|
580
414
|
var styles$1 = {
|
|
581
415
|
root: /*#__PURE__*/emotion.css({
|
|
582
416
|
position: 'relative',
|
|
@@ -586,18 +420,11 @@ var styles$1 = {
|
|
|
586
420
|
padding: tokens.spacingXs,
|
|
587
421
|
borderTopLeftRadius: tokens.borderRadiusSmall
|
|
588
422
|
}),
|
|
589
|
-
actionsRow: /*#__PURE__*/emotion.css({
|
|
590
|
-
display: 'flex',
|
|
591
|
-
justifyContent: 'space-between'
|
|
592
|
-
}),
|
|
593
|
-
additionalRow: /*#__PURE__*/emotion.css({
|
|
594
|
-
marginTop: tokens.spacingXs
|
|
595
|
-
}),
|
|
596
|
-
actionsGroup: /*#__PURE__*/emotion.css({
|
|
597
|
-
display: 'flex'
|
|
598
|
-
}),
|
|
599
423
|
button: /*#__PURE__*/emotion.css({
|
|
600
|
-
|
|
424
|
+
height: '30px',
|
|
425
|
+
width: '36px',
|
|
426
|
+
marginLeft: tokens.spacing2Xs,
|
|
427
|
+
marginRight: tokens.spacing2Xs
|
|
601
428
|
}),
|
|
602
429
|
icon: /*#__PURE__*/emotion.css({
|
|
603
430
|
fill: tokens.gray700,
|
|
@@ -613,42 +440,39 @@ var styles$1 = {
|
|
|
613
440
|
zIndex: /*#__PURE__*/Number(tokens.zIndexTooltip)
|
|
614
441
|
})
|
|
615
442
|
};
|
|
616
|
-
|
|
617
|
-
function ToolbarButton(props) {
|
|
443
|
+
var ToolbarButton = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
618
444
|
var tooltip = props.tooltip,
|
|
619
|
-
|
|
620
|
-
_onClick = _props$onClick === void 0 ? noop : _props$onClick,
|
|
621
|
-
testId = props.testId,
|
|
445
|
+
onClick = props.onClick,
|
|
622
446
|
children = props.children,
|
|
623
447
|
className = props.className,
|
|
624
|
-
_props$
|
|
625
|
-
|
|
448
|
+
_props$variant = props.variant,
|
|
449
|
+
variant = _props$variant === void 0 ? 'transparent' : _props$variant,
|
|
626
450
|
_props$tooltipPlace = props.tooltipPlace,
|
|
627
451
|
tooltipPlace = _props$tooltipPlace === void 0 ? 'top' : _props$tooltipPlace,
|
|
628
|
-
_props$
|
|
629
|
-
|
|
452
|
+
_props$isDisabled = props.isDisabled,
|
|
453
|
+
isDisabled = _props$isDisabled === void 0 ? false : _props$isDisabled,
|
|
454
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
630
455
|
|
|
631
|
-
var button = React__default.createElement(
|
|
456
|
+
var button = React__default.createElement(f36Components.Button, Object.assign({}, otherProps, {
|
|
457
|
+
ref: ref,
|
|
632
458
|
className: emotion.cx(styles$1.button, className),
|
|
633
|
-
|
|
634
|
-
onClick:
|
|
635
|
-
|
|
636
|
-
},
|
|
637
|
-
testId: testId,
|
|
638
|
-
buttonType: buttonType,
|
|
459
|
+
isDisabled: isDisabled,
|
|
460
|
+
onClick: onClick,
|
|
461
|
+
variant: variant,
|
|
639
462
|
size: "small"
|
|
640
|
-
}, children);
|
|
463
|
+
}), children);
|
|
641
464
|
|
|
642
465
|
if (tooltip) {
|
|
643
|
-
return React__default.createElement(
|
|
466
|
+
return React__default.createElement(f36Components.Tooltip, {
|
|
644
467
|
className: styles$1.tooltip,
|
|
645
|
-
|
|
468
|
+
placement: tooltipPlace,
|
|
646
469
|
content: tooltip
|
|
647
470
|
}, button);
|
|
648
471
|
}
|
|
649
472
|
|
|
650
473
|
return button;
|
|
651
|
-
}
|
|
474
|
+
});
|
|
475
|
+
ToolbarButton.displayName = 'ToolbarButton';
|
|
652
476
|
|
|
653
477
|
function MainButtons(props) {
|
|
654
478
|
var tooltipPlace = props.mode === 'zen' ? 'bottom' : 'top';
|
|
@@ -659,66 +483,66 @@ function MainButtons(props) {
|
|
|
659
483
|
}
|
|
660
484
|
}
|
|
661
485
|
}, React__default.createElement(ToolbarButton, {
|
|
662
|
-
|
|
486
|
+
isDisabled: props.disabled,
|
|
663
487
|
testId: "markdown-action-button-heading",
|
|
664
488
|
tooltip: "Headings",
|
|
665
489
|
tooltipPlace: tooltipPlace
|
|
666
|
-
}, React__default.createElement(
|
|
667
|
-
label: "Headings",
|
|
490
|
+
}, React__default.createElement(f36Icons.HeadingIcon, {
|
|
491
|
+
"aria-label": "Headings",
|
|
668
492
|
className: styles$1.icon
|
|
669
493
|
}))), React__default.createElement(ToolbarButton, {
|
|
670
|
-
|
|
494
|
+
isDisabled: props.disabled,
|
|
671
495
|
testId: "markdown-action-button-bold",
|
|
672
496
|
tooltip: "Bold",
|
|
673
497
|
tooltipPlace: tooltipPlace,
|
|
674
498
|
onClick: props.actions.simple.bold
|
|
675
|
-
}, React__default.createElement(
|
|
676
|
-
label: "Bold",
|
|
499
|
+
}, React__default.createElement(f36Icons.FormatBoldIcon, {
|
|
500
|
+
"aria-label": "Bold",
|
|
677
501
|
className: styles$1.icon
|
|
678
502
|
})), React__default.createElement(ToolbarButton, {
|
|
679
|
-
|
|
503
|
+
isDisabled: props.disabled,
|
|
680
504
|
testId: "markdown-action-button-italic",
|
|
681
505
|
tooltip: "Italic",
|
|
682
506
|
tooltipPlace: tooltipPlace,
|
|
683
507
|
onClick: props.actions.simple.italic
|
|
684
|
-
}, React__default.createElement(
|
|
685
|
-
label: "Italic",
|
|
508
|
+
}, React__default.createElement(f36Icons.FormatItalicIcon, {
|
|
509
|
+
"aria-label": "Italic",
|
|
686
510
|
className: styles$1.icon
|
|
687
511
|
})), React__default.createElement(ToolbarButton, {
|
|
688
|
-
|
|
512
|
+
isDisabled: props.disabled,
|
|
689
513
|
testId: "markdown-action-button-quote",
|
|
690
514
|
tooltip: "Quote",
|
|
691
515
|
tooltipPlace: tooltipPlace,
|
|
692
516
|
onClick: props.actions.simple.quote
|
|
693
|
-
}, React__default.createElement(
|
|
694
|
-
label: "Quote",
|
|
517
|
+
}, React__default.createElement(f36Icons.QuoteIcon, {
|
|
518
|
+
"aria-label": "Quote",
|
|
695
519
|
className: styles$1.icon
|
|
696
520
|
})), React__default.createElement(ToolbarButton, {
|
|
697
|
-
|
|
521
|
+
isDisabled: props.disabled,
|
|
698
522
|
testId: "markdown-action-button-ul",
|
|
699
523
|
tooltip: "Unordered list",
|
|
700
524
|
tooltipPlace: tooltipPlace,
|
|
701
525
|
onClick: props.actions.simple.ul
|
|
702
|
-
}, React__default.createElement(
|
|
703
|
-
label: "Unordered list",
|
|
526
|
+
}, React__default.createElement(f36Icons.ListBulletedIcon, {
|
|
527
|
+
"aria-label": "Unordered list",
|
|
704
528
|
className: styles$1.icon
|
|
705
529
|
})), React__default.createElement(ToolbarButton, {
|
|
706
|
-
|
|
530
|
+
isDisabled: props.disabled,
|
|
707
531
|
testId: "markdown-action-button-ol",
|
|
708
532
|
tooltip: "Ordered list",
|
|
709
533
|
tooltipPlace: tooltipPlace,
|
|
710
534
|
onClick: props.actions.simple.ol
|
|
711
|
-
}, React__default.createElement(
|
|
712
|
-
label: "Ordered list",
|
|
535
|
+
}, React__default.createElement(f36Icons.ListNumberedIcon, {
|
|
536
|
+
"aria-label": "Ordered list",
|
|
713
537
|
className: styles$1.icon
|
|
714
538
|
})), React__default.createElement(ToolbarButton, {
|
|
715
|
-
|
|
539
|
+
isDisabled: props.disabled,
|
|
716
540
|
testId: "markdown-action-button-link",
|
|
717
541
|
tooltip: "Link",
|
|
718
542
|
tooltipPlace: tooltipPlace,
|
|
719
543
|
onClick: props.actions.insertLink
|
|
720
|
-
}, React__default.createElement(
|
|
721
|
-
label: "Link",
|
|
544
|
+
}, React__default.createElement(f36Icons.LinkIcon, {
|
|
545
|
+
"aria-label": "Link",
|
|
722
546
|
className: styles$1.icon
|
|
723
547
|
})));
|
|
724
548
|
}
|
|
@@ -726,7 +550,7 @@ function MainButtons(props) {
|
|
|
726
550
|
function AdditionalButtons(props) {
|
|
727
551
|
var tooltipPlace = props.mode === 'zen' ? 'bottom' : 'top';
|
|
728
552
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ToolbarButton, {
|
|
729
|
-
|
|
553
|
+
isDisabled: props.disabled,
|
|
730
554
|
testId: "markdown-action-button-strike",
|
|
731
555
|
tooltip: "Strike out",
|
|
732
556
|
tooltipPlace: tooltipPlace,
|
|
@@ -735,25 +559,25 @@ function AdditionalButtons(props) {
|
|
|
735
559
|
label: "Strike out",
|
|
736
560
|
className: styles$1.icon
|
|
737
561
|
})), React__default.createElement(ToolbarButton, {
|
|
738
|
-
|
|
562
|
+
isDisabled: props.disabled,
|
|
739
563
|
testId: "markdown-action-button-code",
|
|
740
564
|
tooltip: "Code block",
|
|
741
565
|
tooltipPlace: tooltipPlace,
|
|
742
566
|
onClick: props.actions.simple.code
|
|
743
|
-
}, React__default.createElement(
|
|
744
|
-
label: "Code block",
|
|
567
|
+
}, React__default.createElement(f36Icons.CodeIcon, {
|
|
568
|
+
"aria-label": "Code block",
|
|
745
569
|
className: styles$1.icon
|
|
746
570
|
})), React__default.createElement(ToolbarButton, {
|
|
747
|
-
|
|
571
|
+
isDisabled: props.disabled,
|
|
748
572
|
testId: "markdown-action-button-hr",
|
|
749
573
|
tooltip: "Horizontal rule",
|
|
750
574
|
tooltipPlace: tooltipPlace,
|
|
751
575
|
onClick: props.actions.simple.hr
|
|
752
|
-
}, React__default.createElement(
|
|
753
|
-
label: "Horizontal rule",
|
|
576
|
+
}, React__default.createElement(f36Icons.HorizontalRuleIcon, {
|
|
577
|
+
"aria-label": "Horizontal rule",
|
|
754
578
|
className: styles$1.icon
|
|
755
579
|
})), React__default.createElement(ToolbarButton, {
|
|
756
|
-
|
|
580
|
+
isDisabled: props.disabled,
|
|
757
581
|
testId: "markdown-action-button-indent",
|
|
758
582
|
tooltip: "Increase indentation",
|
|
759
583
|
tooltipPlace: tooltipPlace,
|
|
@@ -762,7 +586,7 @@ function AdditionalButtons(props) {
|
|
|
762
586
|
label: "Increase indentation",
|
|
763
587
|
className: styles$1.icon
|
|
764
588
|
})), React__default.createElement(ToolbarButton, {
|
|
765
|
-
|
|
589
|
+
isDisabled: props.disabled,
|
|
766
590
|
testId: "markdown-action-button-dedent",
|
|
767
591
|
tooltip: "Decrease indentation",
|
|
768
592
|
tooltipPlace: tooltipPlace,
|
|
@@ -771,7 +595,7 @@ function AdditionalButtons(props) {
|
|
|
771
595
|
label: "Decrease indentation",
|
|
772
596
|
className: styles$1.icon
|
|
773
597
|
})), React__default.createElement(ToolbarButton, {
|
|
774
|
-
|
|
598
|
+
isDisabled: props.disabled,
|
|
775
599
|
testId: "markdown-action-button-embed",
|
|
776
600
|
tooltip: "Embed external content",
|
|
777
601
|
tooltipPlace: tooltipPlace,
|
|
@@ -780,7 +604,7 @@ function AdditionalButtons(props) {
|
|
|
780
604
|
label: "Embed external content",
|
|
781
605
|
className: styles$1.icon
|
|
782
606
|
})), React__default.createElement(ToolbarButton, {
|
|
783
|
-
|
|
607
|
+
isDisabled: props.disabled,
|
|
784
608
|
testId: "markdown-action-button-table",
|
|
785
609
|
tooltip: "Insert table",
|
|
786
610
|
tooltipPlace: tooltipPlace,
|
|
@@ -789,7 +613,7 @@ function AdditionalButtons(props) {
|
|
|
789
613
|
label: "Insert table",
|
|
790
614
|
className: styles$1.icon
|
|
791
615
|
})), React__default.createElement(ToolbarButton, {
|
|
792
|
-
|
|
616
|
+
isDisabled: props.disabled,
|
|
793
617
|
testId: "markdown-action-button-special",
|
|
794
618
|
tooltip: "Insert special character",
|
|
795
619
|
tooltipPlace: tooltipPlace,
|
|
@@ -798,7 +622,7 @@ function AdditionalButtons(props) {
|
|
|
798
622
|
label: "Insert special character",
|
|
799
623
|
className: styles$1.icon
|
|
800
624
|
})), React__default.createElement(ToolbarButton, {
|
|
801
|
-
|
|
625
|
+
isDisabled: props.disabled,
|
|
802
626
|
testId: "markdown-action-button-organizeLinks",
|
|
803
627
|
tooltip: "Organize links",
|
|
804
628
|
tooltipPlace: tooltipPlace,
|
|
@@ -807,7 +631,7 @@ function AdditionalButtons(props) {
|
|
|
807
631
|
label: "Organize links",
|
|
808
632
|
className: styles$1.icon
|
|
809
633
|
})), React__default.createElement(ToolbarButton, {
|
|
810
|
-
|
|
634
|
+
isDisabled: props.disabled,
|
|
811
635
|
testId: "markdown-action-button-undo",
|
|
812
636
|
tooltip: "Undo",
|
|
813
637
|
tooltipPlace: tooltipPlace,
|
|
@@ -816,7 +640,7 @@ function AdditionalButtons(props) {
|
|
|
816
640
|
label: "Undo",
|
|
817
641
|
className: styles$1.icon
|
|
818
642
|
})), React__default.createElement(ToolbarButton, {
|
|
819
|
-
|
|
643
|
+
isDisabled: props.disabled,
|
|
820
644
|
testId: "markdown-action-button-redo",
|
|
821
645
|
tooltip: "Redo",
|
|
822
646
|
tooltipPlace: tooltipPlace,
|
|
@@ -834,59 +658,49 @@ function DefaultMarkdownToolbar(props) {
|
|
|
834
658
|
|
|
835
659
|
return React__default.createElement("div", {
|
|
836
660
|
className: styles$1.root
|
|
837
|
-
}, React__default.createElement(
|
|
838
|
-
|
|
839
|
-
}, React__default.createElement(
|
|
840
|
-
|
|
841
|
-
}, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(ToolbarButton, {
|
|
842
|
-
disabled: props.disabled,
|
|
661
|
+
}, React__default.createElement(f36Components.Flex, {
|
|
662
|
+
justifyContent: "space-between"
|
|
663
|
+
}, React__default.createElement(f36Components.Flex, null, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(ToolbarButton, {
|
|
664
|
+
isDisabled: props.disabled,
|
|
843
665
|
testId: "markdown-action-button-toggle-additional",
|
|
844
666
|
tooltip: showAdditional ? 'Hide additional actions' : 'More actions',
|
|
845
667
|
onClick: function onClick() {
|
|
846
668
|
setShowAdditional(!showAdditional);
|
|
847
669
|
}
|
|
848
|
-
}, React__default.createElement(
|
|
849
|
-
className: styles$1.icon
|
|
850
|
-
|
|
851
|
-
}))), React__default.createElement("div", {
|
|
852
|
-
className: styles$1.actionsGroup
|
|
853
|
-
}, React__default.createElement(InsertLinkSelector, {
|
|
670
|
+
}, React__default.createElement(f36Icons.MoreHorizontalIcon, {
|
|
671
|
+
className: styles$1.icon
|
|
672
|
+
}))), React__default.createElement(f36Components.Flex, null, React__default.createElement(InsertLinkSelector, {
|
|
854
673
|
disabled: props.disabled,
|
|
855
674
|
onSelectExisting: props.actions.linkExistingMedia,
|
|
856
675
|
onAddNew: props.actions.addNewMedia,
|
|
857
676
|
canAddNew: props.canUploadAssets
|
|
858
677
|
}), React__default.createElement(ToolbarButton, {
|
|
859
|
-
|
|
678
|
+
isDisabled: props.disabled,
|
|
860
679
|
testId: "markdown-action-button-zen",
|
|
861
|
-
|
|
680
|
+
variant: "secondary",
|
|
862
681
|
onClick: props.actions.openZenMode,
|
|
863
682
|
className: styles$1.zenButton
|
|
864
683
|
}, React__default.createElement(Zen, {
|
|
865
684
|
label: "Expand",
|
|
866
685
|
className: styles$1.icon
|
|
867
|
-
})))), showAdditional && React__default.createElement(
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}, React__default.createElement(AdditionalButtons, Object.assign({}, props)))));
|
|
686
|
+
})))), showAdditional && React__default.createElement(f36Components.Flex, {
|
|
687
|
+
justifyContent: "space-between",
|
|
688
|
+
marginTop: "spacingXs"
|
|
689
|
+
}, React__default.createElement(f36Components.Flex, null, React__default.createElement(AdditionalButtons, Object.assign({}, props)))));
|
|
872
690
|
}
|
|
873
691
|
function ZenMarkdownToolbar(props) {
|
|
874
692
|
return React__default.createElement("div", {
|
|
875
693
|
className: styles$1.root
|
|
876
|
-
}, React__default.createElement(
|
|
877
|
-
|
|
878
|
-
}, React__default.createElement(
|
|
879
|
-
className: styles$1.actionsGroup
|
|
880
|
-
}, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(AdditionalButtons, Object.assign({}, props))), React__default.createElement("div", {
|
|
881
|
-
className: styles$1.actionsGroup
|
|
882
|
-
}, React__default.createElement(InsertLinkSelector, {
|
|
694
|
+
}, React__default.createElement(f36Components.Flex, {
|
|
695
|
+
justifyContent: "space-between"
|
|
696
|
+
}, React__default.createElement(f36Components.Flex, null, React__default.createElement(MainButtons, Object.assign({}, props)), React__default.createElement(AdditionalButtons, Object.assign({}, props))), React__default.createElement(f36Components.Flex, null, React__default.createElement(InsertLinkSelector, {
|
|
883
697
|
disabled: props.disabled,
|
|
884
698
|
onSelectExisting: props.actions.linkExistingMedia,
|
|
885
699
|
onAddNew: props.actions.addNewMedia,
|
|
886
700
|
canAddNew: props.canUploadAssets
|
|
887
|
-
}), React__default.createElement(
|
|
701
|
+
}), React__default.createElement(f36Components.Button, {
|
|
888
702
|
testId: "markdown-action-button-zen-close",
|
|
889
|
-
|
|
703
|
+
variant: "secondary",
|
|
890
704
|
size: "small",
|
|
891
705
|
className: emotion.cx(styles$1.zenButton, styles$1.zenButtonPressed),
|
|
892
706
|
onClick: function onClick() {
|
|
@@ -910,6 +724,8 @@ var userAgent = /*#__PURE__*/get(window, 'navigator.userAgent', '');
|
|
|
910
724
|
var platform = /*#__PURE__*/get(window, 'navigator.platform', '');
|
|
911
725
|
var ctrlKey = 'Ctrl';
|
|
912
726
|
var tests = {
|
|
727
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
728
|
+
// @ts-ignore ignore missing MSStream
|
|
913
729
|
ios: /*#__PURE__*/ /(iphone os|ipad|iphone|ipod)/i.test(userAgent) && !window.MSStream
|
|
914
730
|
};
|
|
915
731
|
|
|
@@ -1867,9 +1683,11 @@ var styles$3 = {
|
|
|
1867
1683
|
})
|
|
1868
1684
|
};
|
|
1869
1685
|
function MarkdownHelp(props) {
|
|
1870
|
-
return React__default.createElement(
|
|
1686
|
+
return React__default.createElement(f36Components.Paragraph, {
|
|
1687
|
+
marginBottom: "none",
|
|
1871
1688
|
className: styles$3.help
|
|
1872
|
-
}, "Format your text like a pro with the", ' ', React__default.createElement(
|
|
1689
|
+
}, "Format your text like a pro with the", ' ', React__default.createElement(f36Components.TextLink, {
|
|
1690
|
+
as: "button",
|
|
1873
1691
|
testId: "open-markdown-cheatsheet-button",
|
|
1874
1692
|
onClick: function onClick() {
|
|
1875
1693
|
props.onClick();
|
|
@@ -1952,7 +1770,7 @@ var styles$4 = {
|
|
|
1952
1770
|
})
|
|
1953
1771
|
};
|
|
1954
1772
|
var CheatsheetModalDialog = function CheatsheetModalDialog() {
|
|
1955
|
-
return React__default.createElement(
|
|
1773
|
+
return React__default.createElement(f36Components.ModalContent, {
|
|
1956
1774
|
testId: "markdown-cheatsheet-dialog-content"
|
|
1957
1775
|
}, React__default.createElement("div", {
|
|
1958
1776
|
className: styles$4.flexColumnContainer
|
|
@@ -1960,22 +1778,25 @@ var CheatsheetModalDialog = function CheatsheetModalDialog() {
|
|
|
1960
1778
|
className: emotion.cx(styles$4.flexColumn, styles$4.verticalDivider)
|
|
1961
1779
|
}, React__default.createElement("div", {
|
|
1962
1780
|
className: styles$4.helpItem
|
|
1963
|
-
}, React__default.createElement(
|
|
1964
|
-
|
|
1781
|
+
}, React__default.createElement(f36Components.Heading, {
|
|
1782
|
+
marginBottom: "none",
|
|
1783
|
+
as: "h1",
|
|
1965
1784
|
className: emotion.cx(styles$4.preview, styles$4.h1)
|
|
1966
1785
|
}, "H1"), React__default.createElement("div", {
|
|
1967
1786
|
className: styles$4.markup
|
|
1968
1787
|
}, "# heading")), React__default.createElement("div", {
|
|
1969
1788
|
className: styles$4.helpItem
|
|
1970
|
-
}, React__default.createElement(
|
|
1971
|
-
|
|
1789
|
+
}, React__default.createElement(f36Components.Heading, {
|
|
1790
|
+
marginBottom: "none",
|
|
1791
|
+
as: "h2",
|
|
1972
1792
|
className: emotion.cx(styles$4.preview, styles$4.h2)
|
|
1973
1793
|
}, "H2"), React__default.createElement("div", {
|
|
1974
1794
|
className: styles$4.markup
|
|
1975
1795
|
}, "## heading")), React__default.createElement("div", {
|
|
1976
1796
|
className: styles$4.helpItem
|
|
1977
|
-
}, React__default.createElement(
|
|
1978
|
-
|
|
1797
|
+
}, React__default.createElement(f36Components.Heading, {
|
|
1798
|
+
marginBottom: "none",
|
|
1799
|
+
as: "h3",
|
|
1979
1800
|
className: emotion.cx(styles$4.preview, styles$4.h3)
|
|
1980
1801
|
}, "H3"), React__default.createElement("div", {
|
|
1981
1802
|
className: styles$4.markup
|
|
@@ -1999,7 +1820,8 @@ var CheatsheetModalDialog = function CheatsheetModalDialog() {
|
|
|
1999
1820
|
className: styles$4.markup
|
|
2000
1821
|
}, "~~text~~")), React__default.createElement("div", {
|
|
2001
1822
|
className: styles$4.helpItem
|
|
2002
|
-
}, React__default.createElement(
|
|
1823
|
+
}, React__default.createElement(f36Components.TextLink, {
|
|
1824
|
+
as: "button",
|
|
2003
1825
|
className: styles$4.preview
|
|
2004
1826
|
}, "Link"), React__default.createElement("div", {
|
|
2005
1827
|
className: styles$4.markup
|
|
@@ -2043,7 +1865,7 @@ var CheatsheetModalDialog = function CheatsheetModalDialog() {
|
|
|
2043
1865
|
className: styles$4.markup
|
|
2044
1866
|
}, "```code here```")))), React__default.createElement("div", {
|
|
2045
1867
|
className: styles$4.flexRowContainer
|
|
2046
|
-
}, React__default.createElement(
|
|
1868
|
+
}, React__default.createElement(f36Components.TextLink, {
|
|
2047
1869
|
className: styles$4.helpLink,
|
|
2048
1870
|
href: "https://help.github.com/en/github/writing-on-github/basic-writing-and-formatting-syntax",
|
|
2049
1871
|
target: "_blank",
|
|
@@ -2054,7 +1876,7 @@ var openCheatsheetModal = function openCheatsheetModal(dialogs) {
|
|
|
2054
1876
|
return dialogs.openCurrent({
|
|
2055
1877
|
title: 'Markdown formatting help',
|
|
2056
1878
|
width: 'large',
|
|
2057
|
-
minHeight: '
|
|
1879
|
+
minHeight: '415px',
|
|
2058
1880
|
shouldCloseOnEscapePress: true,
|
|
2059
1881
|
shouldCloseOnOverlayClick: true,
|
|
2060
1882
|
parameters: {
|
|
@@ -2063,7 +1885,7 @@ var openCheatsheetModal = function openCheatsheetModal(dialogs) {
|
|
|
2063
1885
|
});
|
|
2064
1886
|
};
|
|
2065
1887
|
|
|
2066
|
-
var _excluded$
|
|
1888
|
+
var _excluded$2 = ["Embedly", "children"];
|
|
2067
1889
|
|
|
2068
1890
|
var _templateObject$1;
|
|
2069
1891
|
var styles$5 = {
|
|
@@ -2086,7 +1908,7 @@ var styles$5 = {
|
|
|
2086
1908
|
function MarkdownLink(props) {
|
|
2087
1909
|
var Embedly = props.Embedly,
|
|
2088
1910
|
children = props.children,
|
|
2089
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
1911
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2);
|
|
2090
1912
|
|
|
2091
1913
|
if (props.className === 'embedly-card' && Embedly) {
|
|
2092
1914
|
return React__default.createElement(Embedly, {
|
|
@@ -2885,14 +2707,6 @@ function isValidUrl(value) {
|
|
|
2885
2707
|
return urlRegex.test(value);
|
|
2886
2708
|
}
|
|
2887
2709
|
|
|
2888
|
-
var styles$7 = {
|
|
2889
|
-
controlsContainer: /*#__PURE__*/emotion.css({
|
|
2890
|
-
display: 'flex',
|
|
2891
|
-
button: {
|
|
2892
|
-
marginRight: tokens.spacingM
|
|
2893
|
-
}
|
|
2894
|
-
})
|
|
2895
|
-
};
|
|
2896
2710
|
var InsertLinkModal = function InsertLinkModal(_ref) {
|
|
2897
2711
|
var selectedText = _ref.selectedText,
|
|
2898
2712
|
onClose = _ref.onClose;
|
|
@@ -2926,9 +2740,9 @@ var InsertLinkModal = function InsertLinkModal(_ref) {
|
|
|
2926
2740
|
mainInputRef.current.focus();
|
|
2927
2741
|
}
|
|
2928
2742
|
}, [mainInputRef]);
|
|
2929
|
-
return React__default.createElement(
|
|
2743
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
|
|
2930
2744
|
testId: "insert-link-modal"
|
|
2931
|
-
}, React__default.createElement(
|
|
2745
|
+
}, React__default.createElement(f36Components.Form, {
|
|
2932
2746
|
onSubmit: function onSubmit() {
|
|
2933
2747
|
return onInsert({
|
|
2934
2748
|
url: url,
|
|
@@ -2936,50 +2750,47 @@ var InsertLinkModal = function InsertLinkModal(_ref) {
|
|
|
2936
2750
|
title: title
|
|
2937
2751
|
});
|
|
2938
2752
|
}
|
|
2939
|
-
}, React__default.createElement(
|
|
2940
|
-
value: text,
|
|
2941
|
-
name: "link-text",
|
|
2753
|
+
}, React__default.createElement(f36Components.FormControl, {
|
|
2942
2754
|
id: "link-text-field",
|
|
2943
|
-
|
|
2755
|
+
isDisabled: Boolean(selectedText)
|
|
2756
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Link text"), React__default.createElement(f36Components.TextInput, {
|
|
2757
|
+
name: "link-text",
|
|
2758
|
+
value: text,
|
|
2944
2759
|
onChange: function onChange(e) {
|
|
2945
2760
|
setText(e.target.value);
|
|
2946
2761
|
},
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
testId: 'link-text-field'
|
|
2950
|
-
}
|
|
2951
|
-
}), React__default.createElement(forma36ReactComponents.TextField, {
|
|
2952
|
-
value: url,
|
|
2953
|
-
name: "target-url",
|
|
2762
|
+
testId: "link-text-field"
|
|
2763
|
+
})), React__default.createElement(f36Components.FormControl, {
|
|
2954
2764
|
id: "target-url-field",
|
|
2955
|
-
|
|
2956
|
-
|
|
2765
|
+
isInvalid: touched && !urlIsValid
|
|
2766
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Target URL"), React__default.createElement(f36Components.TextInput, {
|
|
2767
|
+
name: "target-url",
|
|
2768
|
+
value: url,
|
|
2957
2769
|
onChange: function onChange(e) {
|
|
2958
2770
|
setUrl(e.target.value);
|
|
2959
2771
|
setTouched(true);
|
|
2960
2772
|
},
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
}), React__default.createElement(forma36ReactComponents.TextField, {
|
|
2969
|
-
value: title,
|
|
2773
|
+
placeholder: "https://",
|
|
2774
|
+
maxLength: 2100,
|
|
2775
|
+
testId: "target-url-field",
|
|
2776
|
+
ref: mainInputRef
|
|
2777
|
+
}), React__default.createElement(f36Components.FormControl.HelpText, null, "Include protocol (e.g. https://)"), touched && !urlIsValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Invalid URL")), React__default.createElement(f36Components.FormControl, {
|
|
2778
|
+
id: "link-title-field"
|
|
2779
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Link title"), React__default.createElement(f36Components.TextInput, {
|
|
2970
2780
|
name: "link-title",
|
|
2971
|
-
|
|
2972
|
-
labelText: "Link title",
|
|
2973
|
-
helpText: "Recommended for accessibility",
|
|
2781
|
+
value: title,
|
|
2974
2782
|
onChange: function onChange(e) {
|
|
2975
2783
|
setTitle(e.target.value);
|
|
2976
2784
|
},
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2785
|
+
testId: "link-title-field"
|
|
2786
|
+
}), React__default.createElement(f36Components.FormControl.HelpText, null, "Recommended for accessibility")))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
|
|
2787
|
+
testId: "insert-link-cancel",
|
|
2788
|
+
onClick: function onClick() {
|
|
2789
|
+
return onClose(false);
|
|
2790
|
+
},
|
|
2791
|
+
variant: "secondary",
|
|
2792
|
+
size: "small"
|
|
2793
|
+
}, "Cancel"), React__default.createElement(f36Components.Button, {
|
|
2983
2794
|
testId: "insert-link-confirm",
|
|
2984
2795
|
onClick: function onClick() {
|
|
2985
2796
|
onInsert({
|
|
@@ -2988,21 +2799,16 @@ var InsertLinkModal = function InsertLinkModal(_ref) {
|
|
|
2988
2799
|
title: title
|
|
2989
2800
|
});
|
|
2990
2801
|
},
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
onClick: function onClick() {
|
|
2996
|
-
return onClose(false);
|
|
2997
|
-
},
|
|
2998
|
-
buttonType: "muted"
|
|
2999
|
-
}, "Cancel")));
|
|
2802
|
+
isDisabled: !urlIsValid,
|
|
2803
|
+
variant: "positive",
|
|
2804
|
+
size: "small"
|
|
2805
|
+
}, "Insert")));
|
|
3000
2806
|
};
|
|
3001
2807
|
var openInsertLinkDialog = function openInsertLinkDialog(dialogs, params) {
|
|
3002
2808
|
return dialogs.openCurrent({
|
|
3003
2809
|
title: 'Insert link',
|
|
3004
2810
|
width: 'large',
|
|
3005
|
-
minHeight: '
|
|
2811
|
+
minHeight: '410px',
|
|
3006
2812
|
shouldCloseOnEscapePress: true,
|
|
3007
2813
|
shouldCloseOnOverlayClick: true,
|
|
3008
2814
|
parameters: _extends({
|
|
@@ -3175,7 +2981,7 @@ var specialCharacters = [{
|
|
|
3175
2981
|
desc: 'diamond'
|
|
3176
2982
|
}];
|
|
3177
2983
|
|
|
3178
|
-
var styles$
|
|
2984
|
+
var styles$7 = {
|
|
3179
2985
|
buttonPanel: /*#__PURE__*/emotion.css({
|
|
3180
2986
|
display: 'flex',
|
|
3181
2987
|
flexWrap: 'wrap'
|
|
@@ -3197,20 +3003,6 @@ var styles$8 = {
|
|
|
3197
3003
|
button: /*#__PURE__*/emotion.css({
|
|
3198
3004
|
marginTop: tokens.spacingM,
|
|
3199
3005
|
marginRight: tokens.spacingS
|
|
3200
|
-
}),
|
|
3201
|
-
charContainer: /*#__PURE__*/emotion.css({
|
|
3202
|
-
display: 'flex',
|
|
3203
|
-
flexDirection: 'column',
|
|
3204
|
-
justifyContent: 'center',
|
|
3205
|
-
marginBottom: tokens.spacingM
|
|
3206
|
-
}),
|
|
3207
|
-
selectedCharacter: /*#__PURE__*/emotion.css({
|
|
3208
|
-
fontSize: tokens.fontSize3Xl,
|
|
3209
|
-
margin: 'auto'
|
|
3210
|
-
}),
|
|
3211
|
-
selectedCharacterDesc: /*#__PURE__*/emotion.css({
|
|
3212
|
-
fontSize: tokens.fontSizeM,
|
|
3213
|
-
margin: 'auto'
|
|
3214
3006
|
})
|
|
3215
3007
|
};
|
|
3216
3008
|
var SpecialCharacterModalDialog = function SpecialCharacterModalDialog(_ref) {
|
|
@@ -3220,54 +3012,59 @@ var SpecialCharacterModalDialog = function SpecialCharacterModalDialog(_ref) {
|
|
|
3220
3012
|
selectedCharacter = _useState[0],
|
|
3221
3013
|
setSelectedCharacter = _useState[1];
|
|
3222
3014
|
|
|
3223
|
-
return React__default.createElement(
|
|
3015
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
|
|
3224
3016
|
testId: "insert-special-character-modal"
|
|
3225
|
-
}, React__default.createElement(
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3017
|
+
}, React__default.createElement(f36Components.Flex, {
|
|
3018
|
+
flexDirection: "column",
|
|
3019
|
+
alignItems: "center"
|
|
3020
|
+
}, React__default.createElement(f36Components.Text, {
|
|
3021
|
+
as: "div",
|
|
3022
|
+
lineHeight: "lineHeight3Xl",
|
|
3023
|
+
fontSize: "fontSize3Xl",
|
|
3024
|
+
marginBottom: "spacingS"
|
|
3025
|
+
}, String.fromCharCode(selectedCharacter.code)), React__default.createElement(f36Components.Text, {
|
|
3026
|
+
as: "div",
|
|
3027
|
+
marginBottom: "spacingS"
|
|
3233
3028
|
}, selectedCharacter.desc)), React__default.createElement("div", {
|
|
3234
|
-
className: styles$
|
|
3029
|
+
className: styles$7.buttonPanel
|
|
3235
3030
|
}, specialCharacters.map(function (_char) {
|
|
3236
3031
|
return React__default.createElement("div", {
|
|
3237
3032
|
key: _char.code
|
|
3238
|
-
}, React__default.createElement(
|
|
3239
|
-
className: styles$
|
|
3033
|
+
}, React__default.createElement(f36Components.Tooltip, {
|
|
3034
|
+
className: styles$7.tooltip,
|
|
3240
3035
|
content: _char.desc
|
|
3241
|
-
}, React__default.createElement(
|
|
3036
|
+
}, React__default.createElement(f36Components.Button, {
|
|
3242
3037
|
testId: "special-character-button",
|
|
3243
3038
|
isActive: _char.code === selectedCharacter.code,
|
|
3244
|
-
className: styles$
|
|
3245
|
-
|
|
3039
|
+
className: styles$7.charButton,
|
|
3040
|
+
variant: "transparent",
|
|
3246
3041
|
onClick: function onClick() {
|
|
3247
3042
|
return setSelectedCharacter(_char);
|
|
3248
3043
|
}
|
|
3249
3044
|
}, String.fromCharCode(_char.code))));
|
|
3250
|
-
})), React__default.createElement(
|
|
3251
|
-
className: styles$8.button,
|
|
3252
|
-
testId: "insert-character-confirm",
|
|
3253
|
-
onClick: function onClick() {
|
|
3254
|
-
return onClose(String.fromCharCode(selectedCharacter.code));
|
|
3255
|
-
},
|
|
3256
|
-
buttonType: "positive"
|
|
3257
|
-
}, "Insert selected"), React__default.createElement(forma36ReactComponents.Button, {
|
|
3045
|
+
}))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
|
|
3258
3046
|
testId: "insert-character-cancel",
|
|
3259
|
-
className: styles$
|
|
3047
|
+
className: styles$7.button,
|
|
3260
3048
|
onClick: function onClick() {
|
|
3261
3049
|
return onClose(false);
|
|
3262
3050
|
},
|
|
3263
|
-
|
|
3264
|
-
|
|
3051
|
+
variant: "secondary",
|
|
3052
|
+
size: "small"
|
|
3053
|
+
}, "Cancel"), React__default.createElement(f36Components.Button, {
|
|
3054
|
+
className: styles$7.button,
|
|
3055
|
+
testId: "insert-character-confirm",
|
|
3056
|
+
onClick: function onClick() {
|
|
3057
|
+
return onClose(String.fromCharCode(selectedCharacter.code));
|
|
3058
|
+
},
|
|
3059
|
+
variant: "positive",
|
|
3060
|
+
size: "small"
|
|
3061
|
+
}, "Insert selected")));
|
|
3265
3062
|
};
|
|
3266
3063
|
var openInsertSpecialCharacter = function openInsertSpecialCharacter(dialogs) {
|
|
3267
3064
|
return dialogs.openCurrent({
|
|
3268
3065
|
title: 'Insert special character',
|
|
3269
3066
|
width: 'large',
|
|
3270
|
-
minHeight: '
|
|
3067
|
+
minHeight: '600px',
|
|
3271
3068
|
shouldCloseOnEscapePress: true,
|
|
3272
3069
|
shouldCloseOnOverlayClick: true,
|
|
3273
3070
|
parameters: {
|
|
@@ -3276,13 +3073,6 @@ var openInsertSpecialCharacter = function openInsertSpecialCharacter(dialogs) {
|
|
|
3276
3073
|
});
|
|
3277
3074
|
};
|
|
3278
3075
|
|
|
3279
|
-
var styles$9 = {
|
|
3280
|
-
controlButton: /*#__PURE__*/emotion.css({
|
|
3281
|
-
button: {
|
|
3282
|
-
marginRight: tokens.spacingM
|
|
3283
|
-
}
|
|
3284
|
-
})
|
|
3285
|
-
};
|
|
3286
3076
|
var InsertTableModal = function InsertTableModal(_ref) {
|
|
3287
3077
|
var onClose = _ref.onClose;
|
|
3288
3078
|
var mainInputRef = React.useRef(null);
|
|
@@ -3304,50 +3094,51 @@ var InsertTableModal = function InsertTableModal(_ref) {
|
|
|
3304
3094
|
mainInputRef.current.focus();
|
|
3305
3095
|
}
|
|
3306
3096
|
}, [mainInputRef]);
|
|
3307
|
-
return React__default.createElement(
|
|
3097
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
|
|
3308
3098
|
testId: "insert-table-modal"
|
|
3309
|
-
}, React__default.createElement(
|
|
3310
|
-
labelText: "Number of rows",
|
|
3311
|
-
value: rows.toString(),
|
|
3099
|
+
}, React__default.createElement(f36Components.Form, null, React__default.createElement(f36Components.FormControl, {
|
|
3312
3100
|
id: "insert-table-rows-number-field",
|
|
3101
|
+
isRequired: true,
|
|
3102
|
+
isInvalid: !rowsAreValid
|
|
3103
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Number of rows"), React__default.createElement(f36Components.TextInput, {
|
|
3313
3104
|
name: "rows",
|
|
3105
|
+
value: rows.toString(),
|
|
3314
3106
|
onChange: function onChange(e) {
|
|
3315
3107
|
return setRows(Number(e.target.value));
|
|
3316
3108
|
},
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
},
|
|
3327
|
-
validationMessage: !rowsAreValid ? 'Should be between 2 and 100' : '',
|
|
3328
|
-
required: true
|
|
3329
|
-
}), React__default.createElement(forma36ReactComponents.TextField, {
|
|
3330
|
-
labelText: "Number of columns",
|
|
3331
|
-
value: cols.toString(),
|
|
3109
|
+
testId: "insert-table-rows-number-field",
|
|
3110
|
+
min: 2,
|
|
3111
|
+
max: 100,
|
|
3112
|
+
pattern: "[1-9][0-9]*",
|
|
3113
|
+
type: "number",
|
|
3114
|
+
width: "small",
|
|
3115
|
+
autoComplete: "off",
|
|
3116
|
+
ref: mainInputRef
|
|
3117
|
+
}), !rowsAreValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Should be between 2 and 100")), React__default.createElement(f36Components.FormControl, {
|
|
3332
3118
|
id: "insert-table-columns-number-field",
|
|
3119
|
+
isRequired: true,
|
|
3120
|
+
isInvalid: !colsAreValid
|
|
3121
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Number of columns"), React__default.createElement(f36Components.TextInput, {
|
|
3333
3122
|
name: "columns",
|
|
3123
|
+
value: cols.toString(),
|
|
3334
3124
|
onChange: function onChange(e) {
|
|
3335
3125
|
return setColumns(Number(e.target.value));
|
|
3336
3126
|
},
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3127
|
+
testId: "insert-table-columns-number-field",
|
|
3128
|
+
min: 1,
|
|
3129
|
+
max: 100,
|
|
3130
|
+
pattern: "[1-9][0-9]*",
|
|
3131
|
+
type: "number",
|
|
3132
|
+
width: "small",
|
|
3133
|
+
autoComplete: "off"
|
|
3134
|
+
}), !colsAreValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Should be between 1 and 100")))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
|
|
3135
|
+
testId: "insert-table-cancel",
|
|
3136
|
+
onClick: function onClick() {
|
|
3137
|
+
return onClose(false);
|
|
3345
3138
|
},
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
})
|
|
3349
|
-
className: styles$9.controlButton
|
|
3350
|
-
}, React__default.createElement(forma36ReactComponents.Button, {
|
|
3139
|
+
variant: "secondary",
|
|
3140
|
+
size: "small"
|
|
3141
|
+
}, "Cancel"), React__default.createElement(f36Components.Button, {
|
|
3351
3142
|
testId: "insert-table-confirm",
|
|
3352
3143
|
onClick: function onClick() {
|
|
3353
3144
|
return onClose({
|
|
@@ -3355,21 +3146,16 @@ var InsertTableModal = function InsertTableModal(_ref) {
|
|
|
3355
3146
|
cols: cols
|
|
3356
3147
|
});
|
|
3357
3148
|
},
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
onClick: function onClick() {
|
|
3363
|
-
return onClose(false);
|
|
3364
|
-
},
|
|
3365
|
-
buttonType: "muted"
|
|
3366
|
-
}, "Cancel")));
|
|
3149
|
+
variant: "positive",
|
|
3150
|
+
size: "small",
|
|
3151
|
+
isDisabled: !rowsAreValid || !colsAreValid
|
|
3152
|
+
}, "Insert")));
|
|
3367
3153
|
};
|
|
3368
3154
|
var openInsertTableDialog = function openInsertTableDialog(dialogs) {
|
|
3369
3155
|
return dialogs.openCurrent({
|
|
3370
3156
|
title: 'Insert table',
|
|
3371
3157
|
width: 'medium',
|
|
3372
|
-
minHeight: '
|
|
3158
|
+
minHeight: '260px',
|
|
3373
3159
|
shouldCloseOnEscapePress: true,
|
|
3374
3160
|
shouldCloseOnOverlayClick: true,
|
|
3375
3161
|
parameters: {
|
|
@@ -3378,7 +3164,7 @@ var openInsertTableDialog = function openInsertTableDialog(dialogs) {
|
|
|
3378
3164
|
});
|
|
3379
3165
|
};
|
|
3380
3166
|
|
|
3381
|
-
var styles$
|
|
3167
|
+
var styles$8 = {
|
|
3382
3168
|
widthFiledGroup: /*#__PURE__*/emotion.css({
|
|
3383
3169
|
display: 'flex',
|
|
3384
3170
|
flexWrap: 'nowrap',
|
|
@@ -3391,12 +3177,6 @@ var styles$a = {
|
|
|
3391
3177
|
}),
|
|
3392
3178
|
radioButton: /*#__PURE__*/emotion.css({
|
|
3393
3179
|
marginLeft: tokens.spacingM
|
|
3394
|
-
}),
|
|
3395
|
-
controlsContainer: /*#__PURE__*/emotion.css({
|
|
3396
|
-
display: 'flex',
|
|
3397
|
-
button: {
|
|
3398
|
-
marginRight: tokens.spacingM
|
|
3399
|
-
}
|
|
3400
3180
|
})
|
|
3401
3181
|
};
|
|
3402
3182
|
|
|
@@ -3447,87 +3227,85 @@ var EmbedExternalContentModal = function EmbedExternalContentModal(_ref2) {
|
|
|
3447
3227
|
mainInputRef.current.focus();
|
|
3448
3228
|
}
|
|
3449
3229
|
}, [mainInputRef]);
|
|
3450
|
-
return React__default.createElement(
|
|
3230
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
|
|
3451
3231
|
testId: "embed-external-dialog"
|
|
3452
|
-
}, React__default.createElement(
|
|
3453
|
-
|
|
3232
|
+
}, React__default.createElement(f36Components.Form, null, React__default.createElement(f36Components.FormControl, {
|
|
3233
|
+
id: "external-link-url-field",
|
|
3234
|
+
isRequired: true,
|
|
3235
|
+
isInvalid: !urlIsValid
|
|
3236
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Content URL"), React__default.createElement(f36Components.TextInput, {
|
|
3454
3237
|
name: "external-link-url",
|
|
3238
|
+
value: url,
|
|
3455
3239
|
onChange: function onChange(e) {
|
|
3456
3240
|
var value = e.target.value;
|
|
3457
3241
|
setUrl(value);
|
|
3458
3242
|
setUrlValidity(isValidUrl(value));
|
|
3459
3243
|
},
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
testId: 'external-link-url-field',
|
|
3465
|
-
placeholder: 'https://example.com',
|
|
3466
|
-
inputRef: mainInputRef
|
|
3467
|
-
},
|
|
3468
|
-
required: true,
|
|
3469
|
-
validationMessage: urlIsValid ? '' : 'URL is invalid'
|
|
3470
|
-
}), React__default.createElement(forma36ReactComponents.TextLink, {
|
|
3244
|
+
testId: "external-link-url-field",
|
|
3245
|
+
placeholder: "https://example.com",
|
|
3246
|
+
ref: mainInputRef
|
|
3247
|
+
}), React__default.createElement(f36Components.FormControl.HelpText, null, "Include protocol (e.g. https://)"), !urlIsValid && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "URL is invalid")), React__default.createElement(f36Components.TextLink, {
|
|
3471
3248
|
href: "http://embed.ly/providers",
|
|
3472
3249
|
target: "_blank",
|
|
3473
3250
|
rel: "noopener noreferrer"
|
|
3474
3251
|
}, "Supported sources"), React__default.createElement("div", {
|
|
3475
|
-
className: styles$
|
|
3476
|
-
}, React__default.createElement(
|
|
3477
|
-
value: width,
|
|
3252
|
+
className: styles$8.widthFiledGroup
|
|
3253
|
+
}, React__default.createElement(f36Components.FormControl, {
|
|
3478
3254
|
id: "embedded-content-width",
|
|
3255
|
+
isRequired: true,
|
|
3256
|
+
isInvalid: !isWidthValid(Number(width), selectedUnit)
|
|
3257
|
+
}, React__default.createElement(f36Components.FormControl.Label, null, "Width"), React__default.createElement(f36Components.TextInput, {
|
|
3258
|
+
value: width,
|
|
3479
3259
|
name: "embedded-content-width",
|
|
3260
|
+
testId: "embedded-content-width",
|
|
3261
|
+
type: "number",
|
|
3262
|
+
width: "small",
|
|
3480
3263
|
onChange: function onChange(e) {
|
|
3481
3264
|
return setWidth(e.target.value);
|
|
3482
|
-
}
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
type: 'number',
|
|
3487
|
-
width: 'small'
|
|
3488
|
-
},
|
|
3489
|
-
required: true,
|
|
3490
|
-
validationMessage: isWidthValid(Number(width), selectedUnit) ? '' : 'Should be equal or less then 100'
|
|
3491
|
-
}), React__default.createElement("div", {
|
|
3492
|
-
className: styles$a.radioButtonGroup
|
|
3493
|
-
}, React__default.createElement(forma36ReactComponents.RadioButtonField, {
|
|
3494
|
-
className: styles$a.radioButton,
|
|
3265
|
+
}
|
|
3266
|
+
}), !isWidthValid(Number(width), selectedUnit) && React__default.createElement(f36Components.FormControl.ValidationMessage, null, "Should be equal or less then 100")), React__default.createElement("div", {
|
|
3267
|
+
className: styles$8.radioButtonGroup
|
|
3268
|
+
}, React__default.createElement(f36Components.Radio, {
|
|
3495
3269
|
id: "unit-option-percent",
|
|
3496
|
-
checked: selectedUnit === 'percent',
|
|
3497
|
-
labelText: "percent",
|
|
3498
3270
|
value: "percent",
|
|
3271
|
+
isChecked: selectedUnit === 'percent',
|
|
3499
3272
|
onChange: function onChange() {
|
|
3500
3273
|
return setUnit('percent');
|
|
3501
3274
|
},
|
|
3502
|
-
|
|
3503
|
-
}), React__default.createElement(
|
|
3504
|
-
className: styles$a.radioButton,
|
|
3275
|
+
className: styles$8.radioButton
|
|
3276
|
+
}, "percent"), React__default.createElement(f36Components.Radio, {
|
|
3505
3277
|
id: "unit-option-pixels",
|
|
3506
|
-
checked: selectedUnit === 'px',
|
|
3507
|
-
labelText: "pixels",
|
|
3508
3278
|
value: "pixels",
|
|
3279
|
+
isChecked: selectedUnit === 'px',
|
|
3509
3280
|
onChange: function onChange() {
|
|
3510
3281
|
return setUnit('px');
|
|
3511
3282
|
},
|
|
3512
|
-
|
|
3513
|
-
}))), React__default.createElement(
|
|
3514
|
-
value: "Yes",
|
|
3515
|
-
testId: "attach-social-checkbox",
|
|
3283
|
+
className: styles$8.radioButton
|
|
3284
|
+
}, "pixels"))), React__default.createElement(f36Components.Checkbox, {
|
|
3516
3285
|
id: "attach-social-checkbox",
|
|
3517
3286
|
name: "attach-social-checkbox",
|
|
3518
|
-
|
|
3287
|
+
value: "Yes",
|
|
3288
|
+
isChecked: attachSocial,
|
|
3519
3289
|
onChange: function onChange() {
|
|
3520
3290
|
return setAttachSocial(!attachSocial);
|
|
3521
3291
|
},
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3292
|
+
testId: "attach-social-checkbox"
|
|
3293
|
+
}, "Attach social sharing links to this element"), React__default.createElement(f36Components.Text, {
|
|
3294
|
+
as: "p",
|
|
3295
|
+
fontColor: "gray500",
|
|
3296
|
+
marginTop: "spacingXs"
|
|
3297
|
+
}, "To enable this embedded content in your application make sure to add the\xA0", React__default.createElement(f36Components.TextLink, {
|
|
3525
3298
|
href: "http://embed.ly/docs/products/cards",
|
|
3526
3299
|
target: "_blank",
|
|
3527
3300
|
rel: "noopener noreferrer"
|
|
3528
|
-
}, "Embedly's platform.js"), "\xA0on your development environment")), React__default.createElement(
|
|
3529
|
-
|
|
3530
|
-
|
|
3301
|
+
}, "Embedly's platform.js"), "\xA0on your development environment"))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
|
|
3302
|
+
testId: "emded-external-cancel",
|
|
3303
|
+
onClick: function onClick() {
|
|
3304
|
+
return onClose(false);
|
|
3305
|
+
},
|
|
3306
|
+
variant: "secondary",
|
|
3307
|
+
size: "small"
|
|
3308
|
+
}, "Cancel"), React__default.createElement(f36Components.Button, {
|
|
3531
3309
|
testId: "embed-external-confirm",
|
|
3532
3310
|
onClick: function onClick() {
|
|
3533
3311
|
return onClose(makeEmbedlyLink({
|
|
@@ -3537,20 +3315,15 @@ var EmbedExternalContentModal = function EmbedExternalContentModal(_ref2) {
|
|
|
3537
3315
|
attachSocial: attachSocial
|
|
3538
3316
|
}));
|
|
3539
3317
|
},
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
onClick: function onClick() {
|
|
3544
|
-
return onClose(false);
|
|
3545
|
-
},
|
|
3546
|
-
buttonType: "muted"
|
|
3547
|
-
}, "Cancel")));
|
|
3318
|
+
variant: "positive",
|
|
3319
|
+
size: "small"
|
|
3320
|
+
}, "Insert")));
|
|
3548
3321
|
};
|
|
3549
3322
|
var openEmbedExternalContentDialog = function openEmbedExternalContentDialog(dialogs) {
|
|
3550
3323
|
return dialogs.openCurrent({
|
|
3551
3324
|
title: 'Embed external content',
|
|
3552
3325
|
width: 'large',
|
|
3553
|
-
minHeight: '
|
|
3326
|
+
minHeight: '435px',
|
|
3554
3327
|
shouldCloseOnEscapePress: true,
|
|
3555
3328
|
shouldCloseOnOverlayClick: true,
|
|
3556
3329
|
parameters: {
|
|
@@ -3559,53 +3332,45 @@ var openEmbedExternalContentDialog = function openEmbedExternalContentDialog(dia
|
|
|
3559
3332
|
});
|
|
3560
3333
|
};
|
|
3561
3334
|
|
|
3562
|
-
var styles$b = {
|
|
3563
|
-
controlButton: /*#__PURE__*/emotion.css({
|
|
3564
|
-
marginTop: tokens.spacingL,
|
|
3565
|
-
button: {
|
|
3566
|
-
marginRight: tokens.spacingM
|
|
3567
|
-
}
|
|
3568
|
-
})
|
|
3569
|
-
};
|
|
3570
3335
|
var ConfirmInsertAssetModalDialog = function ConfirmInsertAssetModalDialog(_ref) {
|
|
3571
3336
|
var onClose = _ref.onClose,
|
|
3572
3337
|
assets = _ref.assets,
|
|
3573
3338
|
locale = _ref.locale;
|
|
3574
3339
|
var localesNumber = assets.length;
|
|
3575
|
-
return React__default.createElement(
|
|
3340
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(f36Components.ModalContent, {
|
|
3576
3341
|
testId: "confirm-insert-asset"
|
|
3577
|
-
}, React__default.createElement(
|
|
3342
|
+
}, React__default.createElement(f36Components.Paragraph, null, localesNumber === 1 ? "Link asset with missing file for locale " + locale : "Link assets with missing files for locale " + locale), React__default.createElement(f36Components.Paragraph, null, localesNumber === 1 ? 'Do you want to link to the file in its fallback locale?' : 'Do you want to link to the files in their fallback locales?'), React__default.createElement(f36Components.EntityList, null, assets.map(function (_ref2) {
|
|
3578
3343
|
var title = _ref2.title,
|
|
3579
3344
|
description = _ref2.description,
|
|
3580
3345
|
thumbnailUrl = _ref2.thumbnailUrl,
|
|
3581
3346
|
thumbnailAltText = _ref2.thumbnailAltText;
|
|
3582
|
-
return React__default.createElement(
|
|
3347
|
+
return React__default.createElement(f36Components.EntityList.Item, {
|
|
3583
3348
|
key: thumbnailUrl,
|
|
3584
3349
|
title: title,
|
|
3585
3350
|
thumbnailUrl: thumbnailUrl + "?w=46&h=46&fit=thumb",
|
|
3586
3351
|
thumbnailAltText: thumbnailAltText,
|
|
3587
3352
|
description: description
|
|
3588
3353
|
});
|
|
3589
|
-
})), React__default.createElement(
|
|
3590
|
-
className: styles$b.controlButton
|
|
3591
|
-
}, React__default.createElement(forma36ReactComponents.Button, {
|
|
3592
|
-
testId: "confirm-insert-asset",
|
|
3354
|
+
}))), React__default.createElement(f36Components.ModalControls, null, React__default.createElement(f36Components.Button, {
|
|
3593
3355
|
onClick: function onClick() {
|
|
3594
|
-
return onClose(
|
|
3356
|
+
return onClose(false);
|
|
3595
3357
|
},
|
|
3596
|
-
|
|
3597
|
-
|
|
3358
|
+
variant: "secondary",
|
|
3359
|
+
size: "small"
|
|
3360
|
+
}, "Cancel"), React__default.createElement(f36Components.Button, {
|
|
3361
|
+
testId: "confirm-insert-asset",
|
|
3598
3362
|
onClick: function onClick() {
|
|
3599
|
-
return onClose(
|
|
3363
|
+
return onClose(true);
|
|
3600
3364
|
},
|
|
3601
|
-
|
|
3602
|
-
|
|
3365
|
+
variant: "positive",
|
|
3366
|
+
size: "small"
|
|
3367
|
+
}, "Confirm")));
|
|
3603
3368
|
};
|
|
3604
3369
|
var openConfirmInsertAsset = function openConfirmInsertAsset(dialogs, options) {
|
|
3605
3370
|
return dialogs.openCurrent({
|
|
3606
3371
|
title: 'Confirm using fallback assets',
|
|
3607
3372
|
width: 'medium',
|
|
3608
|
-
minHeight: '
|
|
3373
|
+
minHeight: '270px',
|
|
3609
3374
|
shouldCloseOnEscapePress: true,
|
|
3610
3375
|
shouldCloseOnOverlayClick: true,
|
|
3611
3376
|
parameters: _extends({
|
|
@@ -3614,7 +3379,7 @@ var openConfirmInsertAsset = function openConfirmInsertAsset(dialogs, options) {
|
|
|
3614
3379
|
});
|
|
3615
3380
|
};
|
|
3616
3381
|
|
|
3617
|
-
var styles$
|
|
3382
|
+
var styles$9 = {
|
|
3618
3383
|
root: /*#__PURE__*/emotion.css({
|
|
3619
3384
|
position: 'fixed',
|
|
3620
3385
|
left: 0,
|
|
@@ -3733,17 +3498,17 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
|
|
|
3733
3498
|
|
|
3734
3499
|
var direction = (_props$sdk$locales$di = props.sdk.locales.direction[props.locale]) != null ? _props$sdk$locales$di : 'ltr';
|
|
3735
3500
|
return React__default.createElement("div", {
|
|
3736
|
-
className: styles$
|
|
3501
|
+
className: styles$9.root,
|
|
3737
3502
|
"data-test-id": "zen-mode-markdown-editor"
|
|
3738
3503
|
}, React__default.createElement("div", {
|
|
3739
|
-
className: styles$
|
|
3504
|
+
className: styles$9.topSplit
|
|
3740
3505
|
}, React__default.createElement(MarkdownToolbar, {
|
|
3741
3506
|
mode: "zen",
|
|
3742
3507
|
disabled: false,
|
|
3743
3508
|
canUploadAssets: false,
|
|
3744
3509
|
actions: actions
|
|
3745
3510
|
})), React__default.createElement("div", {
|
|
3746
|
-
className: emotion.cx(styles$
|
|
3511
|
+
className: emotion.cx(styles$9.editorSplit, (_cx = {}, _cx[styles$9.editorSplitFullscreen] = showPreview === false, _cx))
|
|
3747
3512
|
}, React__default.createElement(MarkdownTextarea, {
|
|
3748
3513
|
mode: "zen",
|
|
3749
3514
|
visible: true,
|
|
@@ -3762,38 +3527,36 @@ var ZenModeModalDialog = function ZenModeModalDialog(props) {
|
|
|
3762
3527
|
});
|
|
3763
3528
|
}
|
|
3764
3529
|
})), showPreview && React__default.createElement("div", {
|
|
3765
|
-
className: styles$
|
|
3530
|
+
className: styles$9.previewSplit
|
|
3766
3531
|
}, React__default.createElement(MarkdownPreview, {
|
|
3767
3532
|
direction: direction,
|
|
3768
3533
|
mode: "zen",
|
|
3769
3534
|
value: currentValue,
|
|
3770
3535
|
previewComponents: props.previewComponents
|
|
3771
3536
|
})), showPreview && React__default.createElement("div", {
|
|
3772
|
-
className: styles$
|
|
3537
|
+
className: styles$9.separator
|
|
3773
3538
|
}), showPreview && React__default.createElement("button", {
|
|
3774
|
-
className: emotion.cx(styles$
|
|
3539
|
+
className: emotion.cx(styles$9.button, styles$9.hideButton),
|
|
3775
3540
|
"aria-label": "Hide preview",
|
|
3776
3541
|
onClick: function onClick() {
|
|
3777
3542
|
setShowPreview(false);
|
|
3778
3543
|
}
|
|
3779
|
-
}, React__default.createElement(
|
|
3780
|
-
|
|
3781
|
-
color: "muted",
|
|
3544
|
+
}, React__default.createElement(f36Icons.ChevronRightIcon, {
|
|
3545
|
+
variant: "muted",
|
|
3782
3546
|
size: "tiny",
|
|
3783
|
-
className: styles$
|
|
3547
|
+
className: styles$9.icon
|
|
3784
3548
|
})), !showPreview && React__default.createElement("button", {
|
|
3785
|
-
className: emotion.cx(styles$
|
|
3549
|
+
className: emotion.cx(styles$9.button, styles$9.showButton),
|
|
3786
3550
|
"aria-label": "Show preview",
|
|
3787
3551
|
onClick: function onClick() {
|
|
3788
3552
|
setShowPreview(true);
|
|
3789
3553
|
}
|
|
3790
|
-
}, React__default.createElement(
|
|
3791
|
-
|
|
3792
|
-
color: "muted",
|
|
3554
|
+
}, React__default.createElement(f36Icons.ChevronLeftIcon, {
|
|
3555
|
+
variant: "muted",
|
|
3793
3556
|
size: "tiny",
|
|
3794
|
-
className: styles$
|
|
3557
|
+
className: styles$9.icon
|
|
3795
3558
|
})), React__default.createElement("div", {
|
|
3796
|
-
className: styles$
|
|
3559
|
+
className: styles$9.bottomSplit
|
|
3797
3560
|
}, React__default.createElement(MarkdownBottomBar, null, React__default.createElement(MarkdownHelp, {
|
|
3798
3561
|
onClick: function onClick() {
|
|
3799
3562
|
openCheatsheetModal(props.sdk.dialogs);
|
|
@@ -4575,7 +4338,7 @@ function createMarkdownActions(props) {
|
|
|
4575
4338
|
};
|
|
4576
4339
|
}
|
|
4577
4340
|
|
|
4578
|
-
var styles$
|
|
4341
|
+
var styles$a = {
|
|
4579
4342
|
container: /*#__PURE__*/emotion.css({
|
|
4580
4343
|
display: 'flex',
|
|
4581
4344
|
flexDirection: 'column',
|
|
@@ -4633,7 +4396,7 @@ function MarkdownEditor(props) {
|
|
|
4633
4396
|
openCheatsheetModal(props.sdk.dialogs);
|
|
4634
4397
|
}, []);
|
|
4635
4398
|
return React__default.createElement("div", {
|
|
4636
|
-
className: styles$
|
|
4399
|
+
className: styles$a.container,
|
|
4637
4400
|
"data-test-id": "markdown-editor"
|
|
4638
4401
|
}, React__default.createElement(MarkdownTabs, {
|
|
4639
4402
|
active: selectedTab,
|