@dialpad/dialtone-vue 3.13.0 → 3.17.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.
@@ -714,7 +714,8 @@ function shortcodeToEmojiData(shortcode) {
714
714
  return reference;
715
715
  } // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
716
716
  // as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
717
- // and such.
717
+ // and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these
718
+ // are not included as part of the key in the emoji.json.
718
719
  //
719
720
  // Example:
720
721
  // return value for smile emoji (no skin tone): 1f600
@@ -724,6 +725,10 @@ function unicodeToString(emoji) {
724
725
  let key = '';
725
726
 
726
727
  for (const codePoint of emoji) {
728
+ const codepoint = codePoint.codePointAt(0).toString(16); // skip 200d and fe0f as these are not included in emoji_strategy.json keys
729
+
730
+ if (['200d', 'fe0f'].includes(codepoint)) continue;
731
+
727
732
  if (key !== '') {
728
733
  key = key + '-';
729
734
  }
@@ -937,8 +942,8 @@ const SKELETON_HEADING_HEIGHTS = {
937
942
 
938
943
  const animationDelay = this.skeletonOffset * SKELETON_RIPPLE_DURATION / 1000;
939
944
  const animationDuration = this.animationDuration === -1 ? 1000 : this.animationDuration;
940
- style.animationDelay = "".concat(animationDelay, "ms");
941
- style.animationDuration = "".concat(animationDuration, "ms");
945
+ style.animationDelay = `${animationDelay}ms`;
946
+ style.animationDuration = `${animationDuration}ms`;
942
947
  return style;
943
948
  }
944
949
 
@@ -1218,7 +1223,7 @@ const validator = number => number !== '' && !Number.isNaN(Number(number));
1218
1223
  randomWidthPercentage() {
1219
1224
  const min = Math.min(this.minWidth, this.maxWidth);
1220
1225
  const max = Math.max(this.minWidth, this.maxWidth);
1221
- return "".concat(Math.round(Math.random() * (max - min)) + min, "%");
1226
+ return `${Math.round(Math.random() * (max - min)) + min}%`;
1222
1227
  },
1223
1228
 
1224
1229
  getSizeParagraphRow(row) {
@@ -1387,10 +1392,10 @@ const skeleton_list_item_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)
1387
1392
  });
1388
1393
 
1389
1394
  if (filtered.length >= 2) {
1390
- const errorMessage = "Use only one of ".concat(filtered.map(_ref2 => {
1395
+ const errorMessage = `Use only one of ${filtered.map(_ref2 => {
1391
1396
  let [key] = _ref2;
1392
1397
  return key;
1393
- }).join(' | '), " options at the same time");
1398
+ }).join(' | ')} options at the same time`;
1394
1399
  console.error(errorMessage);
1395
1400
  }
1396
1401
  }
@@ -1611,7 +1616,7 @@ const emoji_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(emojivue_typ
1611
1616
  * @returns {Array<VNode|string>}
1612
1617
  */
1613
1618
  replaceDtEmojis(replaceList, textContent) {
1614
- const regexp = new RegExp("(".concat(replaceList.join('|'), ")"), 'g');
1619
+ const regexp = new RegExp(`(${replaceList.join('|')})`, 'g');
1615
1620
  const split = textContent.split(regexp);
1616
1621
  return split.map(item => {
1617
1622
  if (replaceList.includes(item)) {
package/dist/emoji.umd.js CHANGED
@@ -732,7 +732,8 @@ function shortcodeToEmojiData(shortcode) {
732
732
  return reference;
733
733
  } // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
734
734
  // as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
735
- // and such.
735
+ // and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these
736
+ // are not included as part of the key in the emoji.json.
736
737
  //
737
738
  // Example:
738
739
  // return value for smile emoji (no skin tone): 1f600
@@ -742,6 +743,10 @@ function unicodeToString(emoji) {
742
743
  let key = '';
743
744
 
744
745
  for (const codePoint of emoji) {
746
+ const codepoint = codePoint.codePointAt(0).toString(16); // skip 200d and fe0f as these are not included in emoji_strategy.json keys
747
+
748
+ if (['200d', 'fe0f'].includes(codepoint)) continue;
749
+
745
750
  if (key !== '') {
746
751
  key = key + '-';
747
752
  }
@@ -955,8 +960,8 @@ const SKELETON_HEADING_HEIGHTS = {
955
960
 
956
961
  const animationDelay = this.skeletonOffset * SKELETON_RIPPLE_DURATION / 1000;
957
962
  const animationDuration = this.animationDuration === -1 ? 1000 : this.animationDuration;
958
- style.animationDelay = "".concat(animationDelay, "ms");
959
- style.animationDuration = "".concat(animationDuration, "ms");
963
+ style.animationDelay = `${animationDelay}ms`;
964
+ style.animationDuration = `${animationDuration}ms`;
960
965
  return style;
961
966
  }
962
967
 
@@ -1236,7 +1241,7 @@ const validator = number => number !== '' && !Number.isNaN(Number(number));
1236
1241
  randomWidthPercentage() {
1237
1242
  const min = Math.min(this.minWidth, this.maxWidth);
1238
1243
  const max = Math.max(this.minWidth, this.maxWidth);
1239
- return "".concat(Math.round(Math.random() * (max - min)) + min, "%");
1244
+ return `${Math.round(Math.random() * (max - min)) + min}%`;
1240
1245
  },
1241
1246
 
1242
1247
  getSizeParagraphRow(row) {
@@ -1405,10 +1410,10 @@ const skeleton_list_item_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)
1405
1410
  });
1406
1411
 
1407
1412
  if (filtered.length >= 2) {
1408
- const errorMessage = "Use only one of ".concat(filtered.map(_ref2 => {
1413
+ const errorMessage = `Use only one of ${filtered.map(_ref2 => {
1409
1414
  let [key] = _ref2;
1410
1415
  return key;
1411
- }).join(' | '), " options at the same time");
1416
+ }).join(' | ')} options at the same time`;
1412
1417
  console.error(errorMessage);
1413
1418
  }
1414
1419
  }
@@ -1629,7 +1634,7 @@ const emoji_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(emojivue_typ
1629
1634
  * @returns {Array<VNode|string>}
1630
1635
  */
1631
1636
  replaceDtEmojis(replaceList, textContent) {
1632
- const regexp = new RegExp("(".concat(replaceList.join('|'), ")"), 'g');
1637
+ const regexp = new RegExp(`(${replaceList.join('|')})`, 'g');
1633
1638
  const split = textContent.split(regexp);
1634
1639
  return split.map(item => {
1635
1640
  if (replaceList.includes(item)) {