@commercetools-uikit/rich-text-utils 20.2.3 → 20.3.1

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.
@@ -14,6 +14,7 @@ var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
14
14
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
15
15
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
16
16
  var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
17
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
17
18
  var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
18
19
  var _Array$from = require('@babel/runtime-corejs3/core-js-stable/array/from');
19
20
  var _flatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/flat');
@@ -59,6 +60,7 @@ var uniq__default = /*#__PURE__*/_interopDefault(uniq);
59
60
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
60
61
  var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
61
62
  var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
63
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
62
64
  var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
63
65
  var _Array$from__default = /*#__PURE__*/_interopDefault(_Array$from);
64
66
  var _flatInstanceProperty__default = /*#__PURE__*/_interopDefault(_flatInstanceProperty);
@@ -441,36 +443,36 @@ const withLinks = editor => {
441
443
  };
442
444
 
443
445
  function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
444
- function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$f(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$f(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
446
+ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context1, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context1 = ownKeys$f(Object(t), !0)).call(_context1, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context10 = ownKeys$f(Object(t))).call(_context10, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
445
447
 
446
448
  // Slate's way of providing custom type annotations comes down to extending `CustomTypes` interface
447
449
  // more: https://docs.slatejs.org/concepts/12-typescript
448
450
  // example: https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/custom-types.ts
449
451
 
450
452
  const serializeNode = node => {
451
- var _context;
453
+ var _context, _context5, _context6;
452
454
  if (slate.Text.isText(node)) {
453
455
  let string = escapeHtml__default["default"](node.text);
454
456
  if (node.bold) {
455
- string = `<strong>${string}</strong>`;
457
+ string = "<strong>".concat(string, "</strong>");
456
458
  }
457
459
  if (node.code) {
458
- string = `<code>${string}</code>`;
460
+ string = "<code>".concat(string, "</code>");
459
461
  }
460
462
  if (node.italic) {
461
- string = `<em>${string}</em>`;
463
+ string = "<em>".concat(string, "</em>");
462
464
  }
463
465
  if (node.underline) {
464
- string = `<u>${string}</u>`;
466
+ string = "<u>".concat(string, "</u>");
465
467
  }
466
468
  if (node.superscript) {
467
- string = `<sup>${string}</sup>`;
469
+ string = "<sup>".concat(string, "</sup>");
468
470
  }
469
471
  if (node.subscript) {
470
- string = `<sub>${string}</sub>`;
472
+ string = "<sub>".concat(string, "</sub>");
471
473
  }
472
474
  if (node.strikethrough) {
473
- string = `<del>${string}</del>`;
475
+ string = "<del>".concat(string, "</del>");
474
476
  }
475
477
 
476
478
  // Replace all Linebreaks (that are caused by the editor) with a br-tag
@@ -482,20 +484,19 @@ const serializeNode = node => {
482
484
 
483
485
  switch (element.type) {
484
486
  case 'block-quote':
485
- return `<blockquote>${children}</blockquote>`;
487
+ return "<blockquote>".concat(children, "</blockquote>");
486
488
  case 'paragraph':
487
- return `<p>${children}</p>`;
489
+ return "<p>".concat(children, "</p>");
488
490
  case 'code':
489
- return `<pre>
490
- <code>${children}</code>`;
491
+ return "<pre>\n <code>".concat(children, "</code>");
491
492
  case 'span':
492
- return `<span>${children}</span>`;
493
+ return "<span>".concat(children, "</span>");
493
494
  case 'bulleted-list':
494
- return `<ul>${children}</ul>`;
495
+ return "<ul>".concat(children, "</ul>");
495
496
  case 'numbered-list':
496
- return `<ol>${children}</ol>`;
497
+ return "<ol>".concat(children, "</ol>");
497
498
  case 'list-item':
498
- return `<li>${children}</li>`;
499
+ return "<li>".concat(children, "</li>");
499
500
  case BLOCK_TAGS.a:
500
501
  // Handle link serialization
501
502
  // eslint-disable-next-line no-case-declarations
@@ -509,7 +510,7 @@ const serializeNode = node => {
509
510
  }
510
511
  return String(element.url);
511
512
  })();
512
- hrefAttr = ` href="${escapeHtml__default["default"](sanitizedUrl)}"`;
513
+ hrefAttr = " href=\"".concat(escapeHtml__default["default"](sanitizedUrl), "\"");
513
514
  }
514
515
  // eslint-disable-next-line no-case-declarations
515
516
  let otherAttrsString = '';
@@ -521,21 +522,22 @@ const serializeNode = node => {
521
522
  const value = _ref2[1];
522
523
  // Strip event handlers during serialization too
523
524
  if (!_startsWithInstanceProperty__default["default"](_context3 = key.toLowerCase()).call(_context3, 'on')) {
524
- otherAttrsString += ` ${escapeHtml__default["default"](key)}="${escapeHtml__default["default"](String(value))}"`;
525
+ var _context4;
526
+ otherAttrsString += _concatInstanceProperty__default["default"](_context4 = " ".concat(escapeHtml__default["default"](key), "=\"")).call(_context4, escapeHtml__default["default"](String(value)), "\"");
525
527
  }
526
528
  }
527
529
  }
528
- return `<a${hrefAttr}${otherAttrsString}>${children}</a>`;
530
+ return _concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "<a".concat(hrefAttr)).call(_context6, otherAttrsString, ">")).call(_context5, children, "</a>");
529
531
  case 'heading-one':
530
- return `<h1>${children}</h1>`;
532
+ return "<h1>".concat(children, "</h1>");
531
533
  case 'heading-two':
532
- return `<h2>${children}</h2>`;
534
+ return "<h2>".concat(children, "</h2>");
533
535
  case 'heading-three':
534
- return `<h3>${children}</h3>`;
536
+ return "<h3>".concat(children, "</h3>");
535
537
  case 'heading-four':
536
- return `<h4>${children}</h4>`;
538
+ return "<h4>".concat(children, "</h4>");
537
539
  case 'heading-five':
538
- return `<h5>${children}</h5>`;
540
+ return "<h5>".concat(children, "</h5>");
539
541
  default:
540
542
  return children;
541
543
  }
@@ -564,9 +566,9 @@ const ELEMENT_TAGS = {
564
566
  const attrName = attr.name.toLowerCase();
565
567
  const attrValue = attr.value;
566
568
  if (attrName === 'href') {
567
- var _context4;
569
+ var _context7;
568
570
  // Sanitize href to prevent javascript: URLs
569
- const sanitizedValue = _trimInstanceProperty__default["default"](_context4 = decodeURI(attrValue)).call(_context4).toLowerCase();
571
+ const sanitizedValue = _trimInstanceProperty__default["default"](_context7 = decodeURI(attrValue)).call(_context7).toLowerCase();
570
572
  if (
571
573
  // eslint-disable-next-line no-script-url
572
574
  _startsWithInstanceProperty__default["default"](sanitizedValue).call(sanitizedValue, 'javascript:') || _startsWithInstanceProperty__default["default"](sanitizedValue).call(sanitizedValue, 'data:') || _startsWithInstanceProperty__default["default"](sanitizedValue).call(sanitizedValue, 'vbscript:')) {
@@ -686,10 +688,13 @@ const mapper = {
686
688
  const wrapWithParagraph = textContent => slateHyperscript.jsx('element', {
687
689
  type: 'paragraph'
688
690
  }, textContent);
689
- const wrapWithParagraphIfRootElement = (el, textContent) => el.parentNode?.nodeName === 'BODY' // root element, because body is eventually turned to React fragment
690
- ? wrapWithParagraph(textContent) : textContent;
691
+ const wrapWithParagraphIfRootElement = (el, textContent) => {
692
+ var _el$parentNode;
693
+ return ((_el$parentNode = el.parentNode) === null || _el$parentNode === void 0 ? void 0 : _el$parentNode.nodeName) === 'BODY' // root element, because body is eventually turned to React fragment
694
+ ? wrapWithParagraph(textContent) : textContent;
695
+ };
691
696
  const deserializeElement = el => {
692
- var _context5, _context6;
697
+ var _context8, _context9;
693
698
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#value
694
699
  if (el.nodeType === 3) {
695
700
  return wrapWithParagraphIfRootElement(el, {
@@ -706,7 +711,7 @@ const deserializeElement = el => {
706
711
  if (nodeName === 'PRE' && el.childNodes[0] && el.childNodes[0].nodeName === 'CODE') {
707
712
  parent = el.childNodes[0];
708
713
  }
709
- let children = _flatInstanceProperty__default["default"](_context5 = _mapInstanceProperty__default["default"](_context6 = _Array$from__default["default"](parent.childNodes)).call(_context6, deserializeElement)).call(_context5);
714
+ let children = _flatInstanceProperty__default["default"](_context8 = _mapInstanceProperty__default["default"](_context9 = _Array$from__default["default"](parent.childNodes)).call(_context9, deserializeElement)).call(_context8);
710
715
  if (children.length === 0) {
711
716
  children = [{
712
717
  text: ''
@@ -725,15 +730,16 @@ const deserializeElement = el => {
725
730
  type: 'span'
726
731
  }, children));
727
732
  } else {
728
- var _context7;
729
- attrs = _reduceInstanceProperty__default["default"](_context7 = _Object$entries__default["default"](styleObj || {})).call(_context7, (mappedAttrObj, _ref3) => {
733
+ var _context0;
734
+ attrs = _reduceInstanceProperty__default["default"](_context0 = _Object$entries__default["default"](styleObj || {})).call(_context0, (mappedAttrObj, _ref3) => {
730
735
  let _ref4 = _slicedToArray(_ref3, 2),
731
736
  key = _ref4[0],
732
737
  value = _ref4[1];
733
738
  const values = value.split(' '); // to cover the case of space-separated values e.g. `text-decoration-line: "underline line-through"`
734
739
 
735
740
  _forEachInstanceProperty__default["default"](values).call(values, splittedValue => {
736
- if (mapper[key]?.[splittedValue]) {
741
+ var _mapper$key;
742
+ if ((_mapper$key = mapper[key]) !== null && _mapper$key !== void 0 && _mapper$key[splittedValue]) {
737
743
  // checking if the parsed style attr value has representation in the mapper obj
738
744
  mappedAttrObj = _objectSpread$f(_objectSpread$f({}, mappedAttrObj), mapper[key][splittedValue]);
739
745
  }
@@ -1319,7 +1325,7 @@ var Divider$1 = Divider;
1319
1325
  const DropdownItem = /*#__PURE__*/_styled__default["default"]("button", {
1320
1326
  target: "e1f4n71b2"
1321
1327
  } )("width:100%;border:0;font-size:1rem;cursor:pointer;padding:", designSystem.designTokens.spacing20, " ", designSystem.designTokens.spacing30, ";font-family:", designSystem.designTokens.fontFamily, ";display:block;background-color:", props => props.isSelected ? designSystem.designTokens.colorPrimary95 : designSystem.designTokens.colorSurface, ";&:focus,&:hover{outline:none;background-color:", designSystem.designTokens.colorNeutral98, ";}" + ("" ));
1322
- const getButtonStyles = props => [/*#__PURE__*/react$1.css("border:0;font-family:", designSystem.designTokens.fontFamily, ";border-radius:", designSystem.designTokens.borderRadius4, ";cursor:pointer;font-size:", designSystem.designTokens.fontSize30, ";color:", designSystem.designTokens.colorSolid, ";display:flex;justify-content:center;align-items:center;padding:", props.isStyleButton ? `5px ${designSystem.designTokens.spacing20}` : `${designSystem.designTokens.spacing20}`, ";&:hover{background-color:", designSystem.designTokens.colorNeutral95, ";}" + ("" ), "" ), props.isIndeterminate && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorAccent95, ";" + ("" ), "" ), props.isOpen && /*#__PURE__*/react$1.css("&:not(:hover){background-color:", designSystem.designTokens.colorAccent20, ";color:", designSystem.designTokens.colorSurface, ";svg{fill:", designSystem.designTokens.colorSurface, ";}}" + ("" ), "" ), props.isReadOnly && /*#__PURE__*/react$1.css("color:", designSystem.designTokens.colorNeutral60, ";svg{fill:", designSystem.designTokens.colorNeutral60, ";}" + ("" ), "" ), props.isDisabled && /*#__PURE__*/react$1.css("color:", designSystem.designTokens.colorNeutral60, ";svg{fill:", designSystem.designTokens.colorNeutral60, ";}" + ("" ), "" )];
1328
+ const getButtonStyles = props => [/*#__PURE__*/react$1.css("border:0;font-family:", designSystem.designTokens.fontFamily, ";border-radius:", designSystem.designTokens.borderRadius4, ";cursor:pointer;font-size:", designSystem.designTokens.fontSize30, ";color:", designSystem.designTokens.colorSolid, ";display:flex;justify-content:center;align-items:center;padding:", props.isStyleButton ? "5px ".concat(designSystem.designTokens.spacing20) : "".concat(designSystem.designTokens.spacing20), ";&:hover{background-color:", designSystem.designTokens.colorNeutral95, ";}" + ("" ), "" ), props.isIndeterminate && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorAccent95, ";" + ("" ), "" ), props.isOpen && /*#__PURE__*/react$1.css("&:not(:hover){background-color:", designSystem.designTokens.colorAccent20, ";color:", designSystem.designTokens.colorSurface, ";svg{fill:", designSystem.designTokens.colorSurface, ";}}" + ("" ), "" ), props.isReadOnly && /*#__PURE__*/react$1.css("color:", designSystem.designTokens.colorNeutral60, ";svg{fill:", designSystem.designTokens.colorNeutral60, ";}" + ("" ), "" ), props.isDisabled && /*#__PURE__*/react$1.css("color:", designSystem.designTokens.colorNeutral60, ";svg{fill:", designSystem.designTokens.colorNeutral60, ";}" + ("" ), "" )];
1323
1329
  const DropdownContainer = /*#__PURE__*/_styled__default["default"]("div", {
1324
1330
  target: "e1f4n71b1"
1325
1331
  } )("position:absolute;cursor:pointer;font-size:", designSystem.designTokens.fontSize30, ";top:", designSystem.designTokens.spacing10, ";margin-top:", designSystem.designTokens.spacing10, ";left:0;white-space:nowrap;background:", designSystem.designTokens.colorSurface, ";overflow:hidden;z-index:9999;border:1px solid ", designSystem.designTokens.colorSurface, ";box-shadow:0 2px 5px 0px rgba(0, 0, 0, 0.15);border-radius:", designSystem.designTokens.borderRadius6, ";" + ("" ));
@@ -1353,7 +1359,7 @@ const Dropdown = _ref2 => {
1353
1359
  const Downshift = DownshiftUntyped__default["default"];
1354
1360
  return jsxRuntime.jsx(Downshift, {
1355
1361
  onChange: props.onChange,
1356
- itemToString: headings => headings?.label || '',
1362
+ itemToString: headings => (headings === null || headings === void 0 ? void 0 : headings.label) || '',
1357
1363
  children: _ref3 => {
1358
1364
  var _context2;
1359
1365
  let isOpen = _ref3.isOpen,
@@ -1411,109 +1417,151 @@ var Dropdown$1 = Dropdown;
1411
1417
 
1412
1418
  var messages = reactIntl.defineMessages({
1413
1419
  boldButtonLabel: {
1414
- id: 'UIKit.RichTextBody.boldButtonLabel',
1415
- description: 'Label for the bold button',
1416
- defaultMessage: 'Bold'
1420
+ id: "UIKit.RichTextBody.boldButtonLabel",
1421
+ defaultMessage: [{
1422
+ "type": 0,
1423
+ "value": "Bold"
1424
+ }]
1417
1425
  },
1418
1426
  expandButtonLabel: {
1419
- id: 'UIKit.RichTextBody.expandButtonLabel',
1420
- description: 'Label for the expand button',
1421
- defaultMessage: 'Expand'
1427
+ id: "UIKit.RichTextBody.expandButtonLabel",
1428
+ defaultMessage: [{
1429
+ "type": 0,
1430
+ "value": "Expand"
1431
+ }]
1422
1432
  },
1423
1433
  italicButtonLabel: {
1424
- id: 'UIKit.RichTextBody.italicButtonLabel',
1425
- description: 'Label for the italic button',
1426
- defaultMessage: 'Italic'
1434
+ id: "UIKit.RichTextBody.italicButtonLabel",
1435
+ defaultMessage: [{
1436
+ "type": 0,
1437
+ "value": "Italic"
1438
+ }]
1427
1439
  },
1428
1440
  moreStylesDropdownLabel: {
1429
- id: 'UIKit.RichTextBody.moreStylesDropdownLabel',
1430
- description: 'Label for the more styles dropdown',
1431
- defaultMessage: 'More styles'
1441
+ id: "UIKit.RichTextBody.moreStylesDropdownLabel",
1442
+ defaultMessage: [{
1443
+ "type": 0,
1444
+ "value": "More styles"
1445
+ }]
1432
1446
  },
1433
1447
  moreStylesDropdownOptionStrikethrough: {
1434
- id: 'UIKit.RichTextBody.moreStylesDropdownOptionStrikethrough',
1435
- description: 'label for the more styles `strikethrough` option',
1436
- defaultMessage: 'Strikethrough'
1448
+ id: "UIKit.RichTextBody.moreStylesDropdownOptionStrikethrough",
1449
+ defaultMessage: [{
1450
+ "type": 0,
1451
+ "value": "Strikethrough"
1452
+ }]
1437
1453
  },
1438
1454
  moreStylesDropdownOptionSuperscript: {
1439
- id: 'UIKit.RichTextBody.moreStylesDropdownOptionSuperscript',
1440
- description: 'label for the more styles `superscript` option',
1441
- defaultMessage: 'Superscript'
1455
+ id: "UIKit.RichTextBody.moreStylesDropdownOptionSuperscript",
1456
+ defaultMessage: [{
1457
+ "type": 0,
1458
+ "value": "Superscript"
1459
+ }]
1442
1460
  },
1443
1461
  moreStylesDropdownOptionSubscript: {
1444
- id: 'UIKit.RichTextBody.moreStylesDropdownOptionSubscript',
1445
- description: 'label for the more styles `subscript` option',
1446
- defaultMessage: 'Subscript'
1462
+ id: "UIKit.RichTextBody.moreStylesDropdownOptionSubscript",
1463
+ defaultMessage: [{
1464
+ "type": 0,
1465
+ "value": "Subscript"
1466
+ }]
1447
1467
  },
1448
1468
  orderedListButtonLabel: {
1449
- id: 'UIKit.RichTextBody.orderedListButtonLabel',
1450
- description: 'Label for the numbered list button',
1451
- defaultMessage: 'Numbered list'
1469
+ id: "UIKit.RichTextBody.orderedListButtonLabel",
1470
+ defaultMessage: [{
1471
+ "type": 0,
1472
+ "value": "Numbered list"
1473
+ }]
1452
1474
  },
1453
1475
  redoButtonLabel: {
1454
- id: 'UIKit.RichTextBody.redoButtonLabel',
1455
- description: 'Label for the redo button',
1456
- defaultMessage: 'Redo'
1476
+ id: "UIKit.RichTextBody.redoButtonLabel",
1477
+ defaultMessage: [{
1478
+ "type": 0,
1479
+ "value": "Redo"
1480
+ }]
1457
1481
  },
1458
1482
  styleDropdownLabel: {
1459
- id: 'UIKit.RichTextBody.styleDropdownLabel',
1460
- description: 'Label for the style dropdown',
1461
- defaultMessage: 'Text styles'
1483
+ id: "UIKit.RichTextBody.styleDropdownLabel",
1484
+ defaultMessage: [{
1485
+ "type": 0,
1486
+ "value": "Text styles"
1487
+ }]
1462
1488
  },
1463
1489
  styleDropdownOptionParagraph: {
1464
- id: 'UIKit.RichTextBody.styleDropdownOptionParagraph',
1465
- description: 'Label for the `paragraph` option',
1466
- defaultMessage: 'Paragraph'
1490
+ id: "UIKit.RichTextBody.styleDropdownOptionParagraph",
1491
+ defaultMessage: [{
1492
+ "type": 0,
1493
+ "value": "Paragraph"
1494
+ }]
1467
1495
  },
1468
1496
  styleDropdownOptionH1: {
1469
- id: 'UIKit.RichTextBody.styleDropdownOptionH1',
1470
- description: 'Label for the `headline-one` option',
1471
- defaultMessage: 'Headline H1'
1497
+ id: "UIKit.RichTextBody.styleDropdownOptionH1",
1498
+ defaultMessage: [{
1499
+ "type": 0,
1500
+ "value": "Headline H1"
1501
+ }]
1472
1502
  },
1473
1503
  styleDropdownOptionH2: {
1474
- id: 'UIKit.RichTextBody.styleDropdownOptionH2',
1475
- description: 'Label for the `headline-two` option',
1476
- defaultMessage: 'Headline H2'
1504
+ id: "UIKit.RichTextBody.styleDropdownOptionH2",
1505
+ defaultMessage: [{
1506
+ "type": 0,
1507
+ "value": "Headline H2"
1508
+ }]
1477
1509
  },
1478
1510
  styleDropdownOptionH3: {
1479
- id: 'UIKit.RichTextBody.styleDropdownOptionH3',
1480
- description: 'Label for the `headline-three` option',
1481
- defaultMessage: 'Headline H3'
1511
+ id: "UIKit.RichTextBody.styleDropdownOptionH3",
1512
+ defaultMessage: [{
1513
+ "type": 0,
1514
+ "value": "Headline H3"
1515
+ }]
1482
1516
  },
1483
1517
  styleDropdownOptionH4: {
1484
- id: 'UIKit.RichTextBody.styleDropdownOptionH4',
1485
- description: 'Label for the `headline-four` option',
1486
- defaultMessage: 'Headline H4'
1518
+ id: "UIKit.RichTextBody.styleDropdownOptionH4",
1519
+ defaultMessage: [{
1520
+ "type": 0,
1521
+ "value": "Headline H4"
1522
+ }]
1487
1523
  },
1488
1524
  styleDropdownOptionH5: {
1489
- id: 'UIKit.RichTextBody.styleDropdownOptionH5',
1490
- description: 'Label for the `headline-five` option',
1491
- defaultMessage: 'Headline H5'
1525
+ id: "UIKit.RichTextBody.styleDropdownOptionH5",
1526
+ defaultMessage: [{
1527
+ "type": 0,
1528
+ "value": "Headline H5"
1529
+ }]
1492
1530
  },
1493
1531
  styleDropdownOptionQuote: {
1494
- id: 'UIKit.RichTextBody.styleDropdownOptionQuote',
1495
- description: 'Label for the `quote` option',
1496
- defaultMessage: 'Quote'
1532
+ id: "UIKit.RichTextBody.styleDropdownOptionQuote",
1533
+ defaultMessage: [{
1534
+ "type": 0,
1535
+ "value": "Quote"
1536
+ }]
1497
1537
  },
1498
1538
  styleDropdownOptionPreformatted: {
1499
- id: 'UIKit.RichTextBody.styleDropdownOptionPreformatted',
1500
- description: 'Label for the `code` option',
1501
- defaultMessage: 'Preformatted'
1539
+ id: "UIKit.RichTextBody.styleDropdownOptionPreformatted",
1540
+ defaultMessage: [{
1541
+ "type": 0,
1542
+ "value": "Preformatted"
1543
+ }]
1502
1544
  },
1503
1545
  underlinedButtonLabel: {
1504
- id: 'UIKit.RichTextBody.underlinedButtonLabel',
1505
- description: 'Label for the underline button',
1506
- defaultMessage: 'Underline'
1546
+ id: "UIKit.RichTextBody.underlinedButtonLabel",
1547
+ defaultMessage: [{
1548
+ "type": 0,
1549
+ "value": "Underline"
1550
+ }]
1507
1551
  },
1508
1552
  undoButtonLabel: {
1509
- id: 'UIKit.RichTextBody.undoButtonLabel',
1510
- description: 'Label for the undo button',
1511
- defaultMessage: 'Undo'
1553
+ id: "UIKit.RichTextBody.undoButtonLabel",
1554
+ defaultMessage: [{
1555
+ "type": 0,
1556
+ "value": "Undo"
1557
+ }]
1512
1558
  },
1513
1559
  unorderedListButtonLabel: {
1514
- id: 'UIKit.RichTextBody.unorderedListButtonLabel',
1515
- description: 'Label for the bullet list button',
1516
- defaultMessage: 'Bullet list'
1560
+ id: "UIKit.RichTextBody.unorderedListButtonLabel",
1561
+ defaultMessage: [{
1562
+ "type": 0,
1563
+ "value": "Bullet list"
1564
+ }]
1517
1565
  }
1518
1566
  });
1519
1567
 
@@ -1697,7 +1745,7 @@ const RichTextEditorBody = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
1697
1745
  }, []);
1698
1746
  if (props.showExpandIcon) ;
1699
1747
  return jsxRuntime.jsxs(Container, {
1700
- css: styles?.container,
1748
+ css: styles === null || styles === void 0 ? void 0 : styles.container,
1701
1749
  hasError: props.hasError,
1702
1750
  hasWarning: props.hasWarning,
1703
1751
  isReadOnly: props.isReadOnly,
@@ -1865,7 +1913,7 @@ RichTextEditorBody.displayName = 'RichTextEditorBody';
1865
1913
  var RichTextEditorBody$1 = RichTextEditorBody;
1866
1914
 
1867
1915
  // NOTE: This string will be replaced on build time with the package version.
1868
- var version = "20.2.3";
1916
+ var version = "20.3.1";
1869
1917
 
1870
1918
  exports.Element = Element;
1871
1919
  exports.HiddenInput = HiddenInput$1;