@dialpad/dialtone-vue 2.13.1 → 2.16.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.
@@ -1117,6 +1117,7 @@ __webpack_require__.d(__webpack_exports__, {
1117
1117
  "DtCombobox": () => (/* reexport */ combobox),
1118
1118
  "DtDropdown": () => (/* reexport */ dropdown),
1119
1119
  "DtEmoji": () => (/* reexport */ emoji),
1120
+ "DtEmojiTextWrapper": () => (/* reexport */ emoji_text_wrapper),
1120
1121
  "DtGroupableInputMixin": () => (/* reexport */ GroupableMixin),
1121
1122
  "DtInput": () => (/* reexport */ input_input),
1122
1123
  "DtInputGroup": () => (/* reexport */ input_group_input_group),
@@ -1158,6 +1159,7 @@ __webpack_require__.d(__webpack_exports__, {
1158
1159
  "LINK_VARIANTS": () => (/* reexport */ LINK_VARIANTS),
1159
1160
  "MODAL_KIND_MODIFIERS": () => (/* reexport */ MODAL_KIND_MODIFIERS),
1160
1161
  "MODAL_SIZE_MODIFIERS": () => (/* reexport */ MODAL_SIZE_MODIFIERS),
1162
+ "MULTI_SELECT_SIZES": () => (/* reexport */ MULTI_SELECT_SIZES),
1161
1163
  "NOTICE_KINDS": () => (/* reexport */ NOTICE_KINDS),
1162
1164
  "POPOVER_CONTENT_WIDTHS": () => (/* reexport */ POPOVER_CONTENT_WIDTHS),
1163
1165
  "POPOVER_HEADER_FOOTER_PADDING_CLASSES": () => (/* reexport */ POPOVER_HEADER_FOOTER_PADDING_CLASSES),
@@ -1187,6 +1189,7 @@ __webpack_require__.d(__webpack_exports__, {
1187
1189
  "USER_STATUS_COLOR_MODIFIERS": () => (/* reexport */ USER_STATUS_COLOR_MODIFIERS),
1188
1190
  "VALIDATION_MESSAGE_TYPES": () => (/* reexport */ VALIDATION_MESSAGE_TYPES),
1189
1191
  "codeToEmojiData": () => (/* reexport */ codeToEmojiData),
1192
+ "customEmojiAssetUrl": () => (/* reexport */ customEmojiAssetUrl),
1190
1193
  "defaultEmojiAssetUrl": () => (/* reexport */ defaultEmojiAssetUrl),
1191
1194
  "emojiFileExtensionLarge": () => (/* reexport */ emojiFileExtensionLarge),
1192
1195
  "emojiFileExtensionSmall": () => (/* reexport */ emojiFileExtensionSmall),
@@ -1195,17 +1198,22 @@ __webpack_require__.d(__webpack_exports__, {
1195
1198
  "emojiJson": () => (/* reexport */ emojiJson),
1196
1199
  "emojiVersion": () => (/* reexport */ emojiVersion),
1197
1200
  "filterFormattedMessages": () => (/* reexport */ filterFormattedMessages),
1201
+ "filterValidShortCodes": () => (/* reexport */ filterValidShortCodes),
1198
1202
  "findEmojis": () => (/* reexport */ findEmojis),
1199
1203
  "findShortCodes": () => (/* reexport */ findShortCodes),
1200
1204
  "formatMessages": () => (/* reexport */ formatMessages),
1205
+ "getEmojiData": () => (/* reexport */ getEmojiData),
1201
1206
  "getEmojiJson": () => (/* reexport */ getEmojiJson),
1202
1207
  "getUniqueString": () => (/* reexport */ getUniqueString),
1203
1208
  "getValidationState": () => (/* reexport */ getValidationState),
1209
+ "setCustomEmojiJson": () => (/* reexport */ setCustomEmojiJson),
1210
+ "setCustomEmojiUrl": () => (/* reexport */ setCustomEmojiUrl),
1204
1211
  "setEmojiAssetUrlLarge": () => (/* reexport */ setEmojiAssetUrlLarge),
1205
1212
  "setEmojiAssetUrlSmall": () => (/* reexport */ setEmojiAssetUrlSmall),
1206
1213
  "shortcodeToEmojiData": () => (/* reexport */ shortcodeToEmojiData),
1207
1214
  "stringToUnicode": () => (/* reexport */ stringToUnicode),
1208
1215
  "unicodeToString": () => (/* reexport */ unicodeToString),
1216
+ "validateCustomEmojiJson": () => (/* reexport */ validateCustomEmojiJson),
1209
1217
  "validationMessageValidator": () => (/* reexport */ validationMessageValidator)
1210
1218
  });
1211
1219
 
@@ -3244,9 +3252,9 @@ var button_group_component = normalizeComponent(
3244
3252
  ;// CONCATENATED MODULE: ./components/button_group/index.js
3245
3253
 
3246
3254
 
3247
- ;// 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/combobox/combobox.vue?vue&type=template&id=071e5acc&
3248
- var comboboxvue_type_template_id_071e5acc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.stopPropagation();return _vm.onKeyValidation($event, 'onEscapeKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }return _vm.onKeyValidation($event, 'onEnterKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onUpKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onDownKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"home",undefined,$event.key,undefined)){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onHomeKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"end",undefined,$event.key,undefined)){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onEndKey')}]}},[_c('div',{attrs:{"data-qa":"dt-combobox-input-wrapper"}},[_vm._t("input",null,{"inputProps":_vm.inputProps})],2),(_vm.showList)?_c('div',{ref:"listWrapper",attrs:{"data-qa":"dt-combobox-list-wrapper"},on:{"mouseleave":_vm.clearHighlightIndex,"focusout":_vm.clearHighlightIndex,"!mousemove":function($event){return _vm.onMouseHighlight.apply(null, arguments)}}},[(_vm.loading)?_c('combobox-loading-list',_vm._b({},'combobox-loading-list',_vm.listProps,false)):_vm._t("list",null,{"listProps":_vm.listProps,"opened":_vm.onOpen,"clearHighlightIndex":_vm.clearHighlightIndex})],2):_vm._e()])}
3249
- var comboboxvue_type_template_id_071e5acc_staticRenderFns = []
3255
+ ;// 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/combobox/combobox.vue?vue&type=template&id=0f032a37&
3256
+ var comboboxvue_type_template_id_0f032a37_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{on:{"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }$event.stopPropagation();return _vm.onKeyValidation($event, 'onEscapeKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }return _vm.onKeyValidation($event, 'onEnterKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onUpKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onDownKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"home",undefined,$event.key,undefined)){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onHomeKey')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"end",undefined,$event.key,undefined)){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.onKeyValidation($event, 'onEndKey')}]}},[_c('div',{attrs:{"data-qa":"dt-combobox-input-wrapper"}},[_vm._t("input",null,{"inputProps":_vm.inputProps})],2),(_vm.showList)?_c('div',{ref:"listWrapper",attrs:{"data-qa":"dt-combobox-list-wrapper"},on:{"mouseleave":_vm.clearHighlightIndex,"focusout":_vm.clearHighlightIndex,"!mousemove":function($event){return _vm.onMouseHighlight.apply(null, arguments)}}},[(_vm.loading)?_c('combobox-loading-list',_vm._b({},'combobox-loading-list',_vm.listProps,false)):_vm._t("list",null,{"listProps":_vm.listProps,"opened":_vm.onOpen,"clearHighlightIndex":_vm.clearHighlightIndex})],2):_vm._e()])}
3257
+ var comboboxvue_type_template_id_0f032a37_staticRenderFns = []
3250
3258
 
3251
3259
 
3252
3260
  ;// CONCATENATED MODULE: ./common/mixins/dom.js
@@ -3620,9 +3628,9 @@ const ERROR_INVALID_LIST_ELEMENT = 'listElementKey is required or the referenced
3620
3628
  }
3621
3629
  };
3622
3630
  });
3623
- ;// 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/combobox/combobox_loading-list.vue?vue&type=template&id=49c938eb&
3624
- var combobox_loading_listvue_type_template_id_49c938eb_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((7),function(index){return _c('dt-list-item',{key:index,attrs:{"role":"option","navigation-type":"none"}},[_c('dt-skeleton',{attrs:{"text-option":{ type: 'body' },"offset":0}})],1)}),1)}
3625
- var combobox_loading_listvue_type_template_id_49c938eb_staticRenderFns = []
3631
+ ;// 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/combobox/combobox_loading-list.vue?vue&type=template&id=07d9971d&
3632
+ var combobox_loading_listvue_type_template_id_07d9971d_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ol',{staticClass:"d-p0 d-mt8 d-hmx332 d-of-y-auto",attrs:{"aria-busy":"true"}},_vm._l((7),function(index){return _c('dt-list-item',{key:index,attrs:{"role":"option","navigation-type":"none"}},[_c('dt-skeleton',{attrs:{"text-option":{ type: 'body' },"offset":0}})],1)}),1)}
3633
+ var combobox_loading_listvue_type_template_id_07d9971d_staticRenderFns = []
3626
3634
 
3627
3635
 
3628
3636
  ;// 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/list_item/list_item.vue?vue&type=template&id=5367188c&
@@ -4669,6 +4677,9 @@ var skeleton_component = normalizeComponent(
4669
4677
  //
4670
4678
  //
4671
4679
  //
4680
+ //
4681
+ //
4682
+ //
4672
4683
 
4673
4684
 
4674
4685
  /* harmony default export */ const combobox_loading_listvue_type_script_lang_js_ = ({
@@ -4690,8 +4701,8 @@ var skeleton_component = normalizeComponent(
4690
4701
  ;
4691
4702
  var combobox_loading_list_component = normalizeComponent(
4692
4703
  combobox_combobox_loading_listvue_type_script_lang_js_,
4693
- combobox_loading_listvue_type_template_id_49c938eb_render,
4694
- combobox_loading_listvue_type_template_id_49c938eb_staticRenderFns,
4704
+ combobox_loading_listvue_type_template_id_07d9971d_render,
4705
+ combobox_loading_listvue_type_template_id_07d9971d_staticRenderFns,
4695
4706
  false,
4696
4707
  null,
4697
4708
  null,
@@ -4894,6 +4905,7 @@ var combobox_loading_list_component = normalizeComponent(
4894
4905
  },
4895
4906
  methods: {
4896
4907
  onMouseHighlight(e) {
4908
+ if (this.loading) return;
4897
4909
  const liElement = e.target.closest('li');
4898
4910
 
4899
4911
  if (liElement && this.highlightId !== liElement.id) {
@@ -4914,10 +4926,13 @@ var combobox_loading_list_component = normalizeComponent(
4914
4926
  },
4915
4927
 
4916
4928
  afterHighlight() {
4929
+ if (this.loading) return;
4917
4930
  this.$emit('highlight', this.highlightIndex);
4918
4931
  },
4919
4932
 
4920
4933
  onEnterKey() {
4934
+ if (this.loading) return;
4935
+
4921
4936
  if (this.highlightIndex >= 0) {
4922
4937
  this.$emit('select', this.highlightIndex);
4923
4938
  }
@@ -4940,7 +4955,7 @@ var combobox_loading_list_component = normalizeComponent(
4940
4955
  },
4941
4956
 
4942
4957
  onKeyValidation(e, eventHandler) {
4943
- if (!this.showList || !this.getListElement() || this.loading) {
4958
+ if (!this.showList || !this.getListElement()) {
4944
4959
  return;
4945
4960
  }
4946
4961
 
@@ -4950,7 +4965,7 @@ var combobox_loading_list_component = normalizeComponent(
4950
4965
  setInitialHighlightIndex() {
4951
4966
  if (this.showList) {
4952
4967
  // When the list's is shown, reset the highlight index.
4953
- // If the list is in loading state, set to -1
4968
+ // If the list is loading, set to -1
4954
4969
  this.setHighlightIndex(this.loading ? -1 : 0);
4955
4970
  }
4956
4971
  }
@@ -4969,8 +4984,8 @@ var combobox_loading_list_component = normalizeComponent(
4969
4984
  ;
4970
4985
  var combobox_component = normalizeComponent(
4971
4986
  combobox_comboboxvue_type_script_lang_js_,
4972
- comboboxvue_type_template_id_071e5acc_render,
4973
- comboboxvue_type_template_id_071e5acc_staticRenderFns,
4987
+ comboboxvue_type_template_id_0f032a37_render,
4988
+ comboboxvue_type_template_id_0f032a37_staticRenderFns,
4974
4989
  false,
4975
4990
  null,
4976
4991
  null,
@@ -10980,9 +10995,9 @@ var dropdown_component = normalizeComponent(
10980
10995
  /* harmony default export */ const dropdown = (dropdown_component.exports);
10981
10996
  ;// CONCATENATED MODULE: ./components/dropdown/index.js
10982
10997
 
10983
- ;// 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=010f8b36&
10984
- var emojivue_type_template_id_010f8b36_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.emojiDataLoading || _vm.imgLoading),expression:"emojiDataLoading || imgLoading"}],class:_vm.skeletonSizeClass,attrs:{"offset":0,"shape-option":{ shape: 'square', contentClass: _vm.skeletonSizeClass, size: 'auto' }}}),(!_vm.emojiDataLoading)?_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}}):_vm._e()],1)}
10985
- var emojivue_type_template_id_010f8b36_staticRenderFns = []
10998
+ ;// 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=85307cb0&
10999
+ var emojivue_type_template_id_85307cb0_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.emojiDataLoading || _vm.imgLoading),expression:"emojiDataLoading || imgLoading"}],class:_vm.skeletonSizeClass,attrs:{"offset":0,"shape-option":{ shape: 'square', contentClass: _vm.skeletonSizeClass, size: 'auto' }}}),(!_vm.emojiDataLoading)?_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}}):_vm._e()],1)}
11000
+ var emojivue_type_template_id_85307cb0_staticRenderFns = []
10986
11001
 
10987
11002
 
10988
11003
  ;// CONCATENATED MODULE: ./components/emoji/emoji_constants.js
@@ -11006,7 +11021,8 @@ var emoji_regex_default = /*#__PURE__*/__webpack_require__.n(emoji_regex);
11006
11021
  ;// CONCATENATED MODULE: ./common/emoji.js
11007
11022
 
11008
11023
  const emojiVersion = '6.6';
11009
- const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/'; // Used for emoji 16px and smaller
11024
+ const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
11025
+ let customEmojiAssetUrl = null; // Used for emoji 16px and smaller
11010
11026
 
11011
11027
  let emojiImageUrlSmall = defaultEmojiAssetUrl;
11012
11028
  let emojiFileExtensionSmall = '.png'; // Used for emoji larger than 16px
@@ -11018,6 +11034,9 @@ async function getEmojiJson() {
11018
11034
  if (emojiJson) return;
11019
11035
  emojiJson = await __webpack_require__.e(/* import() */ 370).then(__webpack_require__.t.bind(__webpack_require__, 370, 19));
11020
11036
  }
11037
+ function getEmojiData() {
11038
+ return emojiJson;
11039
+ }
11021
11040
  function setEmojiAssetUrlSmall(url) {
11022
11041
  let fileExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.png';
11023
11042
 
@@ -11037,6 +11056,69 @@ function setEmojiAssetUrlLarge(url) {
11037
11056
 
11038
11057
  emojiImageUrlLarge = url;
11039
11058
  emojiFileExtensionLarge = fileExtension;
11059
+ }
11060
+ function setCustomEmojiUrl(url) {
11061
+ customEmojiAssetUrl = url;
11062
+ }
11063
+ function setCustomEmojiJson(json) {
11064
+ validateCustomEmojiJson(json);
11065
+ }
11066
+ /**
11067
+ * Validate custom emoji json
11068
+ */
11069
+
11070
+ async function validateCustomEmojiJson(json) {
11071
+ await getEmojiJson();
11072
+ const customEmojiProps = ['extension', 'custom'];
11073
+ const customEmojiRequiredProps = ['name', 'category', 'shortname', 'extension', 'custom'];
11074
+ /**
11075
+ * Update single emoji properties.
11076
+ * If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.
11077
+ * If not exists, will add the property to the emojiData object.
11078
+ */
11079
+
11080
+ const _updateNativeEmojiData = (emojiData, propName, propValue) => {
11081
+ if (emojiData[propName] === undefined) {
11082
+ if (!customEmojiProps.includes(propName)) {
11083
+ return;
11084
+ } // new property to add
11085
+
11086
+
11087
+ emojiData[propName] = propValue;
11088
+ } else {
11089
+ if (Array.isArray(emojiData[propName])) {
11090
+ emojiData[propName] = emojiData[propName].concat(propValue);
11091
+ } else {
11092
+ emojiData[propName] = propValue;
11093
+ }
11094
+ }
11095
+ };
11096
+
11097
+ Object.entries(json).forEach(item => {
11098
+ const [customEmojiKey, customEmojiValue] = item;
11099
+
11100
+ if (customEmojiKey in emojiJson) {
11101
+ // custom emoji exists in emoji json which means to update some data in the native emoji
11102
+ const emojiData = emojiJson[customEmojiKey];
11103
+
11104
+ for (const customEmojiPropertyName in customEmojiValue) {
11105
+ const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];
11106
+
11107
+ _updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);
11108
+ }
11109
+ } else {
11110
+ // new custom emoji
11111
+ const _validateRequiredProps = () => customEmojiRequiredProps.every(val => {
11112
+ return customEmojiValue[val] !== undefined;
11113
+ });
11114
+
11115
+ if (_validateRequiredProps()) {
11116
+ emojiJson[customEmojiKey] = customEmojiValue;
11117
+ } else {
11118
+ console.error('The following custom emoji doesn\'t contain the required properties:', customEmojiValue);
11119
+ }
11120
+ }
11121
+ });
11040
11122
  } // recursively searches the emoji data object containing data for all emojis
11041
11123
  // and returns the object with the specified shortcode.
11042
11124
 
@@ -11061,7 +11143,7 @@ function shortcodeToEmojiData(shortcode) {
11061
11143
  }
11062
11144
 
11063
11145
  let reference;
11064
- f(emojiJson, null);
11146
+ f(getEmojiData(), null);
11065
11147
  return reference;
11066
11148
  } // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
11067
11149
  // as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
@@ -11111,8 +11193,11 @@ async function codeToEmojiData(code) {
11111
11193
  // @returns {string[]}
11112
11194
 
11113
11195
  function findShortCodes(textContent) {
11114
- const shortCodes = textContent.match(/:\w+:/g);
11115
- const filtered = shortCodes ? shortCodes.filter(code => shortcodeToEmojiData(code)) : [];
11196
+ const shortcodes = textContent.match(/:\w+:/g);
11197
+ return filterValidShortCodes(shortcodes);
11198
+ }
11199
+ function filterValidShortCodes(shortcodes) {
11200
+ const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];
11116
11201
  return new Set(filtered);
11117
11202
  } // Finds every emoji in slot text
11118
11203
  // removes duplicates
@@ -11158,7 +11243,8 @@ function findEmojis(textContent) {
11158
11243
  props: {
11159
11244
  /**
11160
11245
  * Supports shortcode ex: :smile: or unicode ex: 😄. Will display the resulting emoji.
11161
- * See https://emojipedia.org/joypixels/ for all supported shortcode/unicode.
11246
+ * See https://emojipedia.org/joypixels/ for all supported shortcode/unicode or the docs
11247
+ * for setting up custom emojis.
11162
11248
  */
11163
11249
  code: {
11164
11250
  type: String,
@@ -11211,8 +11297,15 @@ function findEmojis(textContent) {
11211
11297
  },
11212
11298
 
11213
11299
  emojiSrc() {
11300
+ var _this$emojiData;
11301
+
11214
11302
  if (!this.emojiDataValid) {
11215
11303
  return 'invalid';
11304
+ } // custom emoji
11305
+
11306
+
11307
+ if ((_this$emojiData = this.emojiData) !== null && _this$emojiData !== void 0 && _this$emojiData.custom) {
11308
+ return customEmojiAssetUrl + this.emojiData.key + this.emojiData.extension;
11216
11309
  }
11217
11310
 
11218
11311
  if (['d-svg--size14', 'd-svg--size16'].includes(this.size)) {
@@ -11227,7 +11320,7 @@ function findEmojis(textContent) {
11227
11320
  return undefined;
11228
11321
  }
11229
11322
 
11230
- return stringToUnicode(this.emojiData.unicode_output);
11323
+ return this.emojiData.unicode_output ? stringToUnicode(this.emojiData.unicode_output) : this.emojiData.name;
11231
11324
  },
11232
11325
 
11233
11326
  emojiLabel() {
@@ -11285,8 +11378,8 @@ function findEmojis(textContent) {
11285
11378
  ;
11286
11379
  var emoji_component = normalizeComponent(
11287
11380
  emoji_emojivue_type_script_lang_js_,
11288
- emojivue_type_template_id_010f8b36_render,
11289
- emojivue_type_template_id_010f8b36_staticRenderFns,
11381
+ emojivue_type_template_id_85307cb0_render,
11382
+ emojivue_type_template_id_85307cb0_staticRenderFns,
11290
11383
  false,
11291
11384
  null,
11292
11385
  null,
@@ -11298,6 +11391,125 @@ var emoji_component = normalizeComponent(
11298
11391
  ;// CONCATENATED MODULE: ./components/emoji/index.js
11299
11392
 
11300
11393
 
11394
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/emoji_text_wrapper/emoji_text_wrapper.vue?vue&type=script&lang=js&
11395
+
11396
+
11397
+ /* harmony default export */ const emoji_text_wrappervue_type_script_lang_js_ = ({
11398
+ name: 'DtEmojiTextWrapper',
11399
+ components: {
11400
+ DtEmoji: emoji
11401
+ },
11402
+ inheritAttrs: false,
11403
+ props: {
11404
+ /**
11405
+ * The type of element to use for the wrapper.
11406
+ */
11407
+ elementType: {
11408
+ type: String,
11409
+ default: 'div'
11410
+ }
11411
+ },
11412
+
11413
+ data() {
11414
+ return {
11415
+ loadingEmojiJson: true
11416
+ };
11417
+ },
11418
+
11419
+ async created() {
11420
+ await getEmojiJson();
11421
+ this.loadingEmojiJson = false;
11422
+ },
11423
+
11424
+ methods: {
11425
+ /**
11426
+ * Replaces the valid codes from the text content with a DtEmoji component.
11427
+ * @returns {Array<VNode|string>}
11428
+ */
11429
+ replaceDtEmojis(replaceList, textContent) {
11430
+ const regexp = new RegExp("(".concat(replaceList.join('|'), ")"), 'g');
11431
+ const split = textContent.split(regexp);
11432
+ return split.map(item => {
11433
+ if (replaceList.includes(item)) {
11434
+ return this.$createElement(emoji, {
11435
+ attrs: {
11436
+ class: 'd-mx4 d-d-inline-block'
11437
+ },
11438
+ props: {
11439
+ code: item,
11440
+ ...this.$attrs
11441
+ }
11442
+ });
11443
+ }
11444
+
11445
+ return item;
11446
+ });
11447
+ },
11448
+
11449
+ /**
11450
+ * Recursively search the Vue virtual DOM to find text
11451
+ * @param VNode
11452
+ * @returns {VNode|*}
11453
+ */
11454
+ searchVNodes(VNode) {
11455
+ // If VNode has no tag, it is a text node
11456
+ if (!VNode.tag && VNode.text) {
11457
+ return this.searchCodes(VNode.text);
11458
+ }
11459
+
11460
+ const children = VNode.children ? VNode.children.map(VNodeChild => this.searchVNodes(VNodeChild)) : [];
11461
+ return this.$createElement(VNode.tag, VNode.data, children);
11462
+ },
11463
+
11464
+ // TODO: Find a way to crawl vue components
11465
+ replaceVueComponentVNodeContent(VNode) {//
11466
+ },
11467
+
11468
+ /**
11469
+ * Find codes in text.
11470
+ * @param textContent string
11471
+ * @returns {Array<VNode|string>|string}
11472
+ */
11473
+ searchCodes(textContent) {
11474
+ const shortcodes = findShortCodes(textContent);
11475
+ const emojis = findEmojis(textContent);
11476
+ const replaceList = [...shortcodes, ...emojis];
11477
+ if (replaceList.length === 0) return textContent;
11478
+ return this.replaceDtEmojis(replaceList, textContent);
11479
+ }
11480
+
11481
+ },
11482
+
11483
+ render(h) {
11484
+ const defaultSlotContent = this.$slots.default || [];
11485
+ return h(this.elementType, this.loadingEmojiJson ? defaultSlotContent : defaultSlotContent.map(VNode => this.searchVNodes(VNode)));
11486
+ }
11487
+
11488
+ });
11489
+ ;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue?vue&type=script&lang=js&
11490
+ /* harmony default export */ const emoji_text_wrapper_emoji_text_wrappervue_type_script_lang_js_ = (emoji_text_wrappervue_type_script_lang_js_);
11491
+ ;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue
11492
+ var emoji_text_wrapper_render, emoji_text_wrapper_staticRenderFns
11493
+ ;
11494
+
11495
+
11496
+
11497
+ /* normalize component */
11498
+ ;
11499
+ var emoji_text_wrapper_component = normalizeComponent(
11500
+ emoji_text_wrapper_emoji_text_wrappervue_type_script_lang_js_,
11501
+ emoji_text_wrapper_render,
11502
+ emoji_text_wrapper_staticRenderFns,
11503
+ false,
11504
+ null,
11505
+ null,
11506
+ null
11507
+
11508
+ )
11509
+
11510
+ /* harmony default export */ const emoji_text_wrapper = (emoji_text_wrapper_component.exports);
11511
+ ;// CONCATENATED MODULE: ./components/emoji_text_wrapper/index.js
11512
+
11301
11513
  ;// 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/input/input.vue?vue&type=template&id=39fb0468&
11302
11514
  var inputvue_type_template_id_39fb0468_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:"container",staticClass:"base-input",attrs:{"data-qa":"dt-input"}},[_c('label',{staticClass:"base-input__label",attrs:{"aria-details":_vm.$slots.description || _vm.description ? _vm.descriptionKey : undefined,"data-qa":"dt-input-label-wrapper"}},[_vm._t("labelSlot",function(){return [(_vm.label)?_c('div',{ref:"label",class:[
11303
11515
  'base-input__label-text',
@@ -16511,15 +16723,15 @@ var root_layout_component = normalizeComponent(
16511
16723
  ;// CONCATENATED MODULE: ./components/root_layout/index.js
16512
16724
 
16513
16725
 
16514
- ;// 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!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=template&id=6f7d8b3c&
16515
- var combobox_with_popovervue_type_template_id_6f7d8b3c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-combobox',_vm._g({ref:"combobox",attrs:{"show-list":_vm.isListShown,"on-beginning-of-list":_vm.onBeginningOfList,"on-end-of-list":_vm.onEndOfList,"list-aria-label":_vm.listAriaLabel,"list-rendered-outside":true,"list-id":_vm.listId,"data-qa":"dt-combobox"},scopedSlots:_vm._u([{key:"input",fn:function(ref){
16726
+ ;// 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!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=template&id=0ce1b850&
16727
+ var combobox_with_popovervue_type_template_id_0ce1b850_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-combobox',_vm._g({ref:"combobox",attrs:{"show-list":_vm.isListShown,"on-beginning-of-list":_vm.onBeginningOfList,"on-end-of-list":_vm.onEndOfList,"list-aria-label":_vm.listAriaLabel,"list-rendered-outside":true,"list-id":_vm.listId,"data-qa":"dt-combobox"},scopedSlots:_vm._u([{key:"input",fn:function(ref){
16516
16728
  var inputProps = ref.inputProps;
16517
16729
  return [_c('div',{ref:"input",attrs:{"id":_vm.externalAnchor},on:{"focusin":_vm.onFocusIn,"focusout":_vm.onFocusOut,"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }return _vm.openOnArrowKeyPress($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }return _vm.openOnArrowKeyPress($event)}]}},[_vm._t("input",null,{"inputProps":inputProps,"onInput":_vm.handleDisplayList})],2)]}},{key:"list",fn:function(ref){
16518
16730
  var opened = ref.opened;
16519
16731
  var listProps = ref.listProps;
16520
16732
  var clearHighlightIndex = ref.clearHighlightIndex;
16521
- return [_c('dt-popover',{ref:"popover",attrs:{"open":_vm.isListShown,"hide-on-click":true,"max-height":_vm.maxHeight,"max-width":_vm.maxWidth,"offset":_vm.popoverOffset,"placement":"bottom-start","padding":"none","role":"listbox","external-anchor":_vm.externalAnchor,"content-width":_vm.contentWidth,"content-tabindex":null,"modal":false,"auto-focus":false},on:{"update:open":function($event){_vm.isListShown=$event},"opened":function($event){return opened($event, arguments[1]);}},scopedSlots:_vm._u([{key:"headerContent",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header",on:{"focusout":_vm.onFocusOut}},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"content",fn:function(){return [(_vm.loading)?_c('combobox-loading-list',_vm._b({class:[_vm.DROPDOWN_PADDING_CLASSES[_vm.padding], _vm.listClass]},'combobox-loading-list',listProps,false)):_c('div',{ref:"listWrapper",class:[_vm.DROPDOWN_PADDING_CLASSES[_vm.padding], _vm.listClass],on:{"mouseleave":clearHighlightIndex,"focusout":function($event){clearHighlightIndex; _vm.onFocusOut;}}},[_vm._t("list",null,{"listProps":listProps})],2)]},proxy:true},{key:"footerContent",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer",on:{"focusout":_vm.onFocusOut}},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})]}}],null,true)},_vm.comboboxListeners))}
16522
- var combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns = []
16733
+ return [_c('dt-popover',{ref:"popover",attrs:{"open":_vm.isListShown,"hide-on-click":true,"max-height":_vm.maxHeight,"max-width":_vm.maxWidth,"offset":_vm.popoverOffset,"placement":"bottom-start","padding":"none","role":"listbox","external-anchor":_vm.externalAnchor,"content-width":_vm.contentWidth,"content-tabindex":null,"modal":false,"auto-focus":false},on:{"update:open":function($event){_vm.isListShown=$event},"opened":function($event){return opened($event, arguments[1]);}},scopedSlots:_vm._u([{key:"headerContent",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header",on:{"focusout":_vm.onFocusOut}},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"content",fn:function(){return [_c('div',{ref:"listWrapper",class:[_vm.DROPDOWN_PADDING_CLASSES[_vm.padding], _vm.listClass],on:{"mouseleave":clearHighlightIndex,"focusout":function($event){clearHighlightIndex; _vm.onFocusOut;}}},[(_vm.loading)?_c('combobox-loading-list',_vm._b({class:[_vm.DROPDOWN_PADDING_CLASSES[_vm.padding], _vm.listClass]},'combobox-loading-list',listProps,false)):_vm._t("list",null,{"listProps":listProps})],2)]},proxy:true},{key:"footerContent",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer",on:{"focusout":_vm.onFocusOut}},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})]}}],null,true)},_vm.comboboxListeners))}
16734
+ var combobox_with_popovervue_type_template_id_0ce1b850_staticRenderFns = []
16523
16735
 
16524
16736
 
16525
16737
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue?vue&type=script&lang=js&
@@ -16895,8 +17107,8 @@ var combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns = []
16895
17107
  ;
16896
17108
  var combobox_with_popover_component = normalizeComponent(
16897
17109
  combobox_with_popover_combobox_with_popovervue_type_script_lang_js_,
16898
- combobox_with_popovervue_type_template_id_6f7d8b3c_render,
16899
- combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns,
17110
+ combobox_with_popovervue_type_template_id_0ce1b850_render,
17111
+ combobox_with_popovervue_type_template_id_0ce1b850_staticRenderFns,
16900
17112
  false,
16901
17113
  null,
16902
17114
  null,
@@ -16907,13 +17119,110 @@ var combobox_with_popover_component = normalizeComponent(
16907
17119
  /* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
16908
17120
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
16909
17121
 
16910
- ;// 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!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=f64f2bb6&
16911
- var combobox_multi_selectvue_type_template_id_f64f2bb6_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"list-aria-label":"listAriaLabel","show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
17122
+ ;// 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!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=template&id=907d2f60&
17123
+ var combobox_multi_selectvue_type_template_id_907d2f60_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-combobox-with-popover',{ref:"comboboxWithPopover",attrs:{"list-aria-label":"listAriaLabel","show-list":_vm.showList,"max-height":_vm.listMaxHeight,"popover-offset":_vm.popoverOffset,"has-suggestion-list":_vm.hasSuggestionList,"content-width":"anchor"},on:{"select":_vm.onComboboxSelect},scopedSlots:_vm._u([{key:"input",fn:function(ref){
16912
17124
  var onInput = ref.onInput;
16913
- return [_c('span',{ref:"inputSlotWrapper",staticClass:"d-ps-relative"},[_c('span',{ref:"chipsWrapper",staticClass:"d-ps-absolute d-mx2"},_vm._l((_vm.selectedItems),function(item){return _c('dt-chip',_vm._g({key:item.id,ref:"chips",refInFor:true,staticClass:"d-mt4 d-mx2 d-zi-base1",attrs:{"close-button-props":{ ariaLabel: 'close' }},on:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"backspace",undefined,$event.key,undefined)){ return null; }return _vm.onChipRemove(item)},"close":function($event){return _vm.onChipRemove(item)}}},_vm.chipListeners),[_vm._v(" "+_vm._s(item)+" ")])}),1),_c('dt-input',_vm._g({ref:"input",staticClass:"d-fl-grow1 d-mb4",attrs:{"label":_vm.label,"description":_vm.description,"placeholder":_vm.inputPlaceHolder,"show-messages":_vm.showInputMessages,"messages":_vm.inputMessages},on:{"input":onInput},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},_vm.inputListeners)),_c('dt-validation-messages',{attrs:{"validation-messages":_vm.maxSelectedMessage,"show-messages":_vm.showValidationMessages}})],1)]}},{key:"header",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header"},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"list",fn:function(){return [_c('div',{ref:"list"},[(!_vm.loading)?_vm._t("list"):_c('div',{staticClass:"d-ta-center d-py16"},[_vm._v(" "+_vm._s(_vm.loadingMessage)+" ")])],2)]},proxy:true},{key:"footer",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer"},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})}
16914
- var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17125
+ return [_c('span',{ref:"inputSlotWrapper",staticClass:"d-ps-relative"},[_c('span',{ref:"chipsWrapper",staticClass:"d-ps-absolute d-mx2"},_vm._l((_vm.selectedItems),function(item){return _c('dt-chip',_vm._g({key:item.id,ref:"chips",refInFor:true,staticClass:"d-mt4 d-mx2 d-zi-base1",attrs:{"close-button-props":{ ariaLabel: 'close' },"size":_vm.size},on:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"backspace",undefined,$event.key,undefined)){ return null; }return _vm.onChipRemove(item)},"close":function($event){return _vm.onChipRemove(item)}}},_vm.chipListeners),[_vm._v(" "+_vm._s(item)+" ")])}),1),_c('dt-input',_vm._g({ref:"input",staticClass:"d-fl-grow1 d-mb4",attrs:{"label":_vm.label,"description":_vm.description,"placeholder":_vm.inputPlaceHolder,"show-messages":_vm.showInputMessages,"messages":_vm.inputMessages,"size":_vm.size},on:{"input":onInput},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:"value"}},_vm.inputListeners)),_c('dt-validation-messages',{attrs:{"validation-messages":_vm.maxSelectedMessage,"show-messages":_vm.showValidationMessages}})],1)]}},{key:"header",fn:function(){return [(_vm.$slots.header)?_c('div',{ref:"header"},[_vm._t("header")],2):_vm._e()]},proxy:true},{key:"list",fn:function(){return [_c('div',{ref:"list"},[(!_vm.loading)?_vm._t("list"):_c('div',{staticClass:"d-ta-center d-py16"},[_vm._v(" "+_vm._s(_vm.loadingMessage)+" ")])],2)]},proxy:true},{key:"footer",fn:function(){return [(_vm.$slots.footer)?_c('div',{ref:"footer"},[_vm._t("footer")],2):_vm._e()]},proxy:true}],null,true)})}
17126
+ var combobox_multi_selectvue_type_template_id_907d2f60_staticRenderFns = []
16915
17127
 
16916
17128
 
17129
+ ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
17130
+ // The item list for default story
17131
+ const ITEMS_LIST_DATA = [{
17132
+ id: 'item1',
17133
+ value: 'item1',
17134
+ type: 'MAINLINE'
17135
+ }, {
17136
+ id: 'item2',
17137
+ value: 'item2',
17138
+ type: 'MAINLINE'
17139
+ }, {
17140
+ id: 'item3',
17141
+ value: 'item3',
17142
+ type: 'MAINLINE'
17143
+ }, {
17144
+ id: 'item4',
17145
+ value: 'item4',
17146
+ type: 'MAINLINE'
17147
+ }, {
17148
+ id: 'item5',
17149
+ value: 'item5',
17150
+ type: 'MAINLINE'
17151
+ }, {
17152
+ id: 'item6',
17153
+ value: 'item6',
17154
+ type: 'MAINLINE'
17155
+ }, {
17156
+ id: 'item7',
17157
+ value: 'item7',
17158
+ type: 'MAINLINE'
17159
+ }, {
17160
+ id: 'item8',
17161
+ value: 'item8',
17162
+ type: 'Other'
17163
+ }, {
17164
+ id: 'item9',
17165
+ value: 'item9',
17166
+ type: 'MAINLINE'
17167
+ }, {
17168
+ id: 'item10',
17169
+ value: 'item10',
17170
+ type: 'MAINLINE'
17171
+ }, {
17172
+ id: 'item11',
17173
+ value: 'item11',
17174
+ type: 'MAINLINE'
17175
+ }, {
17176
+ id: 'item12',
17177
+ value: 'item12',
17178
+ type: 'Other'
17179
+ }, {
17180
+ id: 'item13',
17181
+ value: 'item13',
17182
+ type: 'MAINLINE'
17183
+ }, {
17184
+ id: 'item14',
17185
+ value: 'item14',
17186
+ type: 'MAINLINE'
17187
+ }, {
17188
+ id: 'item15',
17189
+ value: 'item15',
17190
+ type: 'MAINLINE'
17191
+ }, {
17192
+ id: 'item16',
17193
+ value: 'item16',
17194
+ type: 'MAINLINE'
17195
+ }, {
17196
+ id: 'item17',
17197
+ value: 'item17',
17198
+ type: 'MAINLINE'
17199
+ }, {
17200
+ id: 'item18',
17201
+ value: 'item18',
17202
+ type: 'Other'
17203
+ }, {
17204
+ id: 'item19',
17205
+ value: 'item19',
17206
+ type: 'MAINLINE'
17207
+ }, {
17208
+ id: 'item20',
17209
+ value: 'item20',
17210
+ type: 'MAINLINE'
17211
+ }, {
17212
+ id: 'item21',
17213
+ value: 'item21',
17214
+ type: 'MAINLINE'
17215
+ }, {
17216
+ id: 'item22',
17217
+ value: 'item22',
17218
+ type: 'Other'
17219
+ }];
17220
+ const MULTI_SELECT_SIZES = {
17221
+ // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.
17222
+ EXTRA_SMALL: 'xs',
17223
+ SMALL: 'sm',
17224
+ DEFAULT: 'md'
17225
+ };
16917
17226
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue?vue&type=script&lang=js&
16918
17227
  //
16919
17228
  //
@@ -17013,6 +17322,9 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17013
17322
  //
17014
17323
  //
17015
17324
  //
17325
+ //
17326
+ //
17327
+
17016
17328
 
17017
17329
 
17018
17330
  /* harmony default export */ const combobox_multi_selectvue_type_script_lang_js_ = ({
@@ -17128,7 +17440,7 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17128
17440
  },
17129
17441
 
17130
17442
  /**
17131
- * Max select message when the max selections has been reached with the structure:
17443
+ * Max select message when the max selections is exceeded with the structure:
17132
17444
  * `[{"message": string, "type": VALIDATION_MESSAGE_TYPES }]`
17133
17445
  */
17134
17446
  maxSelectedMessage: {
@@ -17145,6 +17457,15 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17145
17457
  hasSuggestionList: {
17146
17458
  type: Boolean,
17147
17459
  default: true
17460
+ },
17461
+
17462
+ /**
17463
+ * Size of the input and chip, one of `xs`, `sm`, `md`
17464
+ */
17465
+ size: {
17466
+ type: String,
17467
+ default: null,
17468
+ validator: t => Object.values(MULTI_SELECT_SIZES).includes(t)
17148
17469
  }
17149
17470
  },
17150
17471
  emits: ['input', 'select', 'remove', 'max-selected'],
@@ -17179,10 +17500,19 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17179
17500
  return { ...this.$listeners,
17180
17501
  input: event => {
17181
17502
  this.$emit('input', event);
17503
+
17504
+ if (this.hasSuggestionList) {
17505
+ this.showComboboxList();
17506
+ }
17182
17507
  },
17183
17508
  keyup: event => {
17184
17509
  this.onInputKeyup(event);
17185
17510
  this.$emit('keyup', event);
17511
+ },
17512
+ click: event => {
17513
+ if (this.hasSuggestionList) {
17514
+ this.showComboboxList();
17515
+ }
17186
17516
  }
17187
17517
  };
17188
17518
  }
@@ -17242,6 +17572,22 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17242
17572
  this.$emit('select', i);
17243
17573
  },
17244
17574
 
17575
+ showComboboxList() {
17576
+ if (this.showList != null) {
17577
+ return;
17578
+ }
17579
+
17580
+ this.$refs.comboboxWithPopover.showComboboxList();
17581
+ },
17582
+
17583
+ closeComboboxList() {
17584
+ if (this.showList != null) {
17585
+ return;
17586
+ }
17587
+
17588
+ this.$refs.comboboxWithPopover.closeComboboxList();
17589
+ },
17590
+
17245
17591
  getChipButtons() {
17246
17592
  return this.$refs.chips && this.$refs.chips.map(chip => chip.$el.querySelector('button'));
17247
17593
  },
@@ -17303,13 +17649,13 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17303
17649
  moveFromInputToChip() {
17304
17650
  this.getLastChipButton().focus();
17305
17651
  this.$refs.input.blur();
17306
- this.$refs.comboboxWithPopover.closeComboboxList();
17652
+ this.closeComboboxList();
17307
17653
  },
17308
17654
 
17309
17655
  moveFromChipToInput() {
17310
17656
  this.getLastChipButton().blur();
17311
17657
  this.$refs.input.focus();
17312
- this.$refs.comboboxWithPopover.showComboboxList();
17658
+ this.showComboboxList();
17313
17659
  },
17314
17660
 
17315
17661
  navigateBetweenChips(target, toLeft) {
@@ -17322,7 +17668,7 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17322
17668
 
17323
17669
  this.getChipButtons()[from].blur();
17324
17670
  this.getChipButtons()[to].focus();
17325
- this.$refs.comboboxWithPopover.closeComboboxList();
17671
+ this.closeComboboxList();
17326
17672
  },
17327
17673
 
17328
17674
  setChipsTopPosition() {
@@ -17392,7 +17738,7 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17392
17738
  checkMaxSelected() {
17393
17739
  if (this.maxSelected === 0) return;
17394
17740
 
17395
- if (this.selectedItems.length >= this.maxSelected) {
17741
+ if (this.selectedItems.length > this.maxSelected) {
17396
17742
  this.showValidationMessages = true;
17397
17743
  this.$emit('max-selected');
17398
17744
  } else {
@@ -17414,8 +17760,8 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17414
17760
  ;
17415
17761
  var combobox_multi_select_component = normalizeComponent(
17416
17762
  combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
17417
- combobox_multi_selectvue_type_template_id_f64f2bb6_render,
17418
- combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns,
17763
+ combobox_multi_selectvue_type_template_id_907d2f60_render,
17764
+ combobox_multi_selectvue_type_template_id_907d2f60_staticRenderFns,
17419
17765
  false,
17420
17766
  null,
17421
17767
  null,
@@ -17426,6 +17772,7 @@ var combobox_multi_select_component = normalizeComponent(
17426
17772
  /* harmony default export */ const combobox_multi_select = (combobox_multi_select_component.exports);
17427
17773
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/index.js
17428
17774
 
17775
+
17429
17776
  ;// 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!./recipes/list_items/contact_info/contact_info.vue?vue&type=template&id=7091b031&
17430
17777
  var contact_infovue_type_template_id_7091b031_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-list-item',{attrs:{"id":_vm.id,"role":_vm.role,"element-type":"div","data-qa":"contact-info"},scopedSlots:_vm._u([{key:"left",fn:function(){return [_c('div',{staticClass:"d-ps-relative",attrs:{"data-qa":"contact-info-left"}},[(_vm.avatarSrc)?_c('dt-avatar',{attrs:{"kind":"default","size":"lg","avatar-class":"d-bar2"}},[_c('img',{attrs:{"data-qa":"dt-contact-avatar","src":_vm.avatarSrc,"alt":_vm.avatarInitials}})]):(_vm.avatarInitials)?_c('dt-avatar',{attrs:{"kind":"initials","size":"lg","color":_vm.avatarColor}},[_vm._v(" "+_vm._s(_vm.avatarInitials)+" ")]):_vm._e(),(_vm.showUserStatus)?_c('div',{class:[
17431
17778
  'd-ba',
@@ -17771,6 +18118,7 @@ var top_banner_info_component = normalizeComponent(
17771
18118
 
17772
18119
 
17773
18120
 
18121
+
17774
18122
 
17775
18123
 
17776
18124
  /// Recipes