@dialpad/dialtone-vue 2.21.0-alpha.2 → 2.22.2-alpha.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.
@@ -694,7 +694,8 @@ function shortcodeToEmojiData(shortcode) {
694
694
  return reference;
695
695
  } // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
696
696
  // as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
697
- // and such.
697
+ // and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these
698
+ // are not included as part of the key in the emoji.json.
698
699
  //
699
700
  // Example:
700
701
  // return value for smile emoji (no skin tone): 1f600
@@ -704,6 +705,10 @@ function unicodeToString(emoji) {
704
705
  let key = '';
705
706
 
706
707
  for (const codePoint of emoji) {
708
+ const codepoint = codePoint.codePointAt(0).toString(16); // skip 200d and fe0f as these are not included in emoji_strategy.json keys
709
+
710
+ if (['200d', 'fe0f'].includes(codepoint)) continue;
711
+
707
712
  if (key !== '') {
708
713
  key = key + '-';
709
714
  }
@@ -753,8 +758,8 @@ function findEmojis(textContent) {
753
758
  const emojis = matches.length ? matches.map(match => match[0]) : [];
754
759
  return new Set(emojis);
755
760
  }
756
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/emoji/emoji.vue?vue&type=template&id=263332ba&
757
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{class:_vm.skeletonSizeClass},[_c('dt-skeleton',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgLoading),expression:"imgLoading"}],class:_vm.skeletonSizeClass,attrs:{"offset":0,"shape-option":{ shape: 'square', contentClass: _vm.skeletonSizeClass, size: 'auto' }}}),_c('img',{directives:[{name:"show",rawName:"v-show",value:(!_vm.imgLoading),expression:"!imgLoading"}],ref:"emojiImg",class:[_vm.size, _vm.imgClass],attrs:{"aria-label":_vm.emojiLabel,"alt":_vm.emojiAlt,"title":_vm.emojiLabel,"src":_vm.emojiSrc},on:{"load":_vm.imageLoaded,"error":_vm.imageErrored}})],1)}
761
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/emoji/emoji.vue?vue&type=template&id=334ba6aa&
762
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{class:_vm.skeletonSizeClass},[_c('dt-skeleton',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgLoading && _vm.showSkeleton),expression:"imgLoading && showSkeleton"}],class:_vm.skeletonSizeClass,attrs:{"offset":0,"shape-option":{ shape: 'square', contentClass: _vm.skeletonSizeClass, size: 'auto' }}}),_c('img',{directives:[{name:"show",rawName:"v-show",value:(!_vm.imgLoading),expression:"!imgLoading"}],ref:"emojiImg",class:[_vm.size, _vm.imgClass],attrs:{"aria-label":_vm.emojiLabel,"alt":_vm.emojiAlt,"title":_vm.emojiLabel,"src":_vm.emojiSrc},on:{"load":_vm.imageLoaded,"error":_vm.imageErrored}})],1)}
758
763
  var staticRenderFns = []
759
764
 
760
765
 
@@ -1657,6 +1662,14 @@ var skeleton_component = normalizeComponent(
1657
1662
  ariaLabel: {
1658
1663
  type: String,
1659
1664
  default: null
1665
+ },
1666
+
1667
+ /**
1668
+ * Shows a skeleton loader while the emoji asset is loading.
1669
+ */
1670
+ showSkeleton: {
1671
+ type: Boolean,
1672
+ default: true
1660
1673
  }
1661
1674
  },
1662
1675
 
package/dist/emoji.umd.js CHANGED
@@ -704,7 +704,8 @@ function shortcodeToEmojiData(shortcode) {
704
704
  return reference;
705
705
  } // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
706
706
  // as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
707
- // and such.
707
+ // and such. Note that this function does NOT return variation selectors (fe0f) or zero width joiners (200d), as these
708
+ // are not included as part of the key in the emoji.json.
708
709
  //
709
710
  // Example:
710
711
  // return value for smile emoji (no skin tone): 1f600
@@ -714,6 +715,10 @@ function unicodeToString(emoji) {
714
715
  let key = '';
715
716
 
716
717
  for (const codePoint of emoji) {
718
+ const codepoint = codePoint.codePointAt(0).toString(16); // skip 200d and fe0f as these are not included in emoji_strategy.json keys
719
+
720
+ if (['200d', 'fe0f'].includes(codepoint)) continue;
721
+
717
722
  if (key !== '') {
718
723
  key = key + '-';
719
724
  }
@@ -763,8 +768,8 @@ function findEmojis(textContent) {
763
768
  const emojis = matches.length ? matches.map(match => match[0]) : [];
764
769
  return new Set(emojis);
765
770
  }
766
- ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/emoji/emoji.vue?vue&type=template&id=263332ba&
767
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{class:_vm.skeletonSizeClass},[_c('dt-skeleton',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgLoading),expression:"imgLoading"}],class:_vm.skeletonSizeClass,attrs:{"offset":0,"shape-option":{ shape: 'square', contentClass: _vm.skeletonSizeClass, size: 'auto' }}}),_c('img',{directives:[{name:"show",rawName:"v-show",value:(!_vm.imgLoading),expression:"!imgLoading"}],ref:"emojiImg",class:[_vm.size, _vm.imgClass],attrs:{"aria-label":_vm.emojiLabel,"alt":_vm.emojiAlt,"title":_vm.emojiLabel,"src":_vm.emojiSrc},on:{"load":_vm.imageLoaded,"error":_vm.imageErrored}})],1)}
771
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/emoji/emoji.vue?vue&type=template&id=334ba6aa&
772
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{class:_vm.skeletonSizeClass},[_c('dt-skeleton',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgLoading && _vm.showSkeleton),expression:"imgLoading && showSkeleton"}],class:_vm.skeletonSizeClass,attrs:{"offset":0,"shape-option":{ shape: 'square', contentClass: _vm.skeletonSizeClass, size: 'auto' }}}),_c('img',{directives:[{name:"show",rawName:"v-show",value:(!_vm.imgLoading),expression:"!imgLoading"}],ref:"emojiImg",class:[_vm.size, _vm.imgClass],attrs:{"aria-label":_vm.emojiLabel,"alt":_vm.emojiAlt,"title":_vm.emojiLabel,"src":_vm.emojiSrc},on:{"load":_vm.imageLoaded,"error":_vm.imageErrored}})],1)}
768
773
  var staticRenderFns = []
769
774
 
770
775
 
@@ -1667,6 +1672,14 @@ var skeleton_component = normalizeComponent(
1667
1672
  ariaLabel: {
1668
1673
  type: String,
1669
1674
  default: null
1675
+ },
1676
+
1677
+ /**
1678
+ * Shows a skeleton loader while the emoji asset is loading.
1679
+ */
1680
+ showSkeleton: {
1681
+ type: Boolean,
1682
+ default: true
1670
1683
  }
1671
1684
  },
1672
1685