@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.
@@ -1099,6 +1099,7 @@ __webpack_require__.d(__webpack_exports__, {
1099
1099
  "DtCombobox": () => (/* reexport */ combobox),
1100
1100
  "DtDropdown": () => (/* reexport */ dropdown),
1101
1101
  "DtEmoji": () => (/* reexport */ emoji),
1102
+ "DtEmojiTextWrapper": () => (/* reexport */ emoji_text_wrapper),
1102
1103
  "DtGroupableInputMixin": () => (/* reexport */ GroupableMixin),
1103
1104
  "DtInput": () => (/* reexport */ input_input),
1104
1105
  "DtInputGroup": () => (/* reexport */ input_group_input_group),
@@ -1140,6 +1141,7 @@ __webpack_require__.d(__webpack_exports__, {
1140
1141
  "LINK_VARIANTS": () => (/* reexport */ LINK_VARIANTS),
1141
1142
  "MODAL_KIND_MODIFIERS": () => (/* reexport */ MODAL_KIND_MODIFIERS),
1142
1143
  "MODAL_SIZE_MODIFIERS": () => (/* reexport */ MODAL_SIZE_MODIFIERS),
1144
+ "MULTI_SELECT_SIZES": () => (/* reexport */ MULTI_SELECT_SIZES),
1143
1145
  "NOTICE_KINDS": () => (/* reexport */ NOTICE_KINDS),
1144
1146
  "POPOVER_CONTENT_WIDTHS": () => (/* reexport */ POPOVER_CONTENT_WIDTHS),
1145
1147
  "POPOVER_HEADER_FOOTER_PADDING_CLASSES": () => (/* reexport */ POPOVER_HEADER_FOOTER_PADDING_CLASSES),
@@ -1169,6 +1171,7 @@ __webpack_require__.d(__webpack_exports__, {
1169
1171
  "USER_STATUS_COLOR_MODIFIERS": () => (/* reexport */ USER_STATUS_COLOR_MODIFIERS),
1170
1172
  "VALIDATION_MESSAGE_TYPES": () => (/* reexport */ VALIDATION_MESSAGE_TYPES),
1171
1173
  "codeToEmojiData": () => (/* reexport */ codeToEmojiData),
1174
+ "customEmojiAssetUrl": () => (/* reexport */ customEmojiAssetUrl),
1172
1175
  "defaultEmojiAssetUrl": () => (/* reexport */ defaultEmojiAssetUrl),
1173
1176
  "emojiFileExtensionLarge": () => (/* reexport */ emojiFileExtensionLarge),
1174
1177
  "emojiFileExtensionSmall": () => (/* reexport */ emojiFileExtensionSmall),
@@ -1177,17 +1180,22 @@ __webpack_require__.d(__webpack_exports__, {
1177
1180
  "emojiJson": () => (/* reexport */ emojiJson),
1178
1181
  "emojiVersion": () => (/* reexport */ emojiVersion),
1179
1182
  "filterFormattedMessages": () => (/* reexport */ filterFormattedMessages),
1183
+ "filterValidShortCodes": () => (/* reexport */ filterValidShortCodes),
1180
1184
  "findEmojis": () => (/* reexport */ findEmojis),
1181
1185
  "findShortCodes": () => (/* reexport */ findShortCodes),
1182
1186
  "formatMessages": () => (/* reexport */ formatMessages),
1187
+ "getEmojiData": () => (/* reexport */ getEmojiData),
1183
1188
  "getEmojiJson": () => (/* reexport */ getEmojiJson),
1184
1189
  "getUniqueString": () => (/* reexport */ getUniqueString),
1185
1190
  "getValidationState": () => (/* reexport */ getValidationState),
1191
+ "setCustomEmojiJson": () => (/* reexport */ setCustomEmojiJson),
1192
+ "setCustomEmojiUrl": () => (/* reexport */ setCustomEmojiUrl),
1186
1193
  "setEmojiAssetUrlLarge": () => (/* reexport */ setEmojiAssetUrlLarge),
1187
1194
  "setEmojiAssetUrlSmall": () => (/* reexport */ setEmojiAssetUrlSmall),
1188
1195
  "shortcodeToEmojiData": () => (/* reexport */ shortcodeToEmojiData),
1189
1196
  "stringToUnicode": () => (/* reexport */ stringToUnicode),
1190
1197
  "unicodeToString": () => (/* reexport */ unicodeToString),
1198
+ "validateCustomEmojiJson": () => (/* reexport */ validateCustomEmojiJson),
1191
1199
  "validationMessageValidator": () => (/* reexport */ validationMessageValidator)
1192
1200
  });
1193
1201
 
@@ -3226,9 +3234,9 @@ var button_group_component = normalizeComponent(
3226
3234
  ;// CONCATENATED MODULE: ./components/button_group/index.js
3227
3235
 
3228
3236
 
3229
- ;// 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&
3230
- 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()])}
3231
- var comboboxvue_type_template_id_071e5acc_staticRenderFns = []
3237
+ ;// 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&
3238
+ 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()])}
3239
+ var comboboxvue_type_template_id_0f032a37_staticRenderFns = []
3232
3240
 
3233
3241
 
3234
3242
  ;// CONCATENATED MODULE: ./common/mixins/dom.js
@@ -3602,9 +3610,9 @@ const ERROR_INVALID_LIST_ELEMENT = 'listElementKey is required or the referenced
3602
3610
  }
3603
3611
  };
3604
3612
  });
3605
- ;// 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&
3606
- 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)}
3607
- var combobox_loading_listvue_type_template_id_49c938eb_staticRenderFns = []
3613
+ ;// 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&
3614
+ 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)}
3615
+ var combobox_loading_listvue_type_template_id_07d9971d_staticRenderFns = []
3608
3616
 
3609
3617
 
3610
3618
  ;// 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&
@@ -4651,6 +4659,9 @@ var skeleton_component = normalizeComponent(
4651
4659
  //
4652
4660
  //
4653
4661
  //
4662
+ //
4663
+ //
4664
+ //
4654
4665
 
4655
4666
 
4656
4667
  /* harmony default export */ const combobox_loading_listvue_type_script_lang_js_ = ({
@@ -4672,8 +4683,8 @@ var skeleton_component = normalizeComponent(
4672
4683
  ;
4673
4684
  var combobox_loading_list_component = normalizeComponent(
4674
4685
  combobox_combobox_loading_listvue_type_script_lang_js_,
4675
- combobox_loading_listvue_type_template_id_49c938eb_render,
4676
- combobox_loading_listvue_type_template_id_49c938eb_staticRenderFns,
4686
+ combobox_loading_listvue_type_template_id_07d9971d_render,
4687
+ combobox_loading_listvue_type_template_id_07d9971d_staticRenderFns,
4677
4688
  false,
4678
4689
  null,
4679
4690
  null,
@@ -4876,6 +4887,7 @@ var combobox_loading_list_component = normalizeComponent(
4876
4887
  },
4877
4888
  methods: {
4878
4889
  onMouseHighlight(e) {
4890
+ if (this.loading) return;
4879
4891
  const liElement = e.target.closest('li');
4880
4892
 
4881
4893
  if (liElement && this.highlightId !== liElement.id) {
@@ -4896,10 +4908,13 @@ var combobox_loading_list_component = normalizeComponent(
4896
4908
  },
4897
4909
 
4898
4910
  afterHighlight() {
4911
+ if (this.loading) return;
4899
4912
  this.$emit('highlight', this.highlightIndex);
4900
4913
  },
4901
4914
 
4902
4915
  onEnterKey() {
4916
+ if (this.loading) return;
4917
+
4903
4918
  if (this.highlightIndex >= 0) {
4904
4919
  this.$emit('select', this.highlightIndex);
4905
4920
  }
@@ -4922,7 +4937,7 @@ var combobox_loading_list_component = normalizeComponent(
4922
4937
  },
4923
4938
 
4924
4939
  onKeyValidation(e, eventHandler) {
4925
- if (!this.showList || !this.getListElement() || this.loading) {
4940
+ if (!this.showList || !this.getListElement()) {
4926
4941
  return;
4927
4942
  }
4928
4943
 
@@ -4932,7 +4947,7 @@ var combobox_loading_list_component = normalizeComponent(
4932
4947
  setInitialHighlightIndex() {
4933
4948
  if (this.showList) {
4934
4949
  // When the list's is shown, reset the highlight index.
4935
- // If the list is in loading state, set to -1
4950
+ // If the list is loading, set to -1
4936
4951
  this.setHighlightIndex(this.loading ? -1 : 0);
4937
4952
  }
4938
4953
  }
@@ -4951,8 +4966,8 @@ var combobox_loading_list_component = normalizeComponent(
4951
4966
  ;
4952
4967
  var combobox_component = normalizeComponent(
4953
4968
  combobox_comboboxvue_type_script_lang_js_,
4954
- comboboxvue_type_template_id_071e5acc_render,
4955
- comboboxvue_type_template_id_071e5acc_staticRenderFns,
4969
+ comboboxvue_type_template_id_0f032a37_render,
4970
+ comboboxvue_type_template_id_0f032a37_staticRenderFns,
4956
4971
  false,
4957
4972
  null,
4958
4973
  null,
@@ -10962,9 +10977,9 @@ var dropdown_component = normalizeComponent(
10962
10977
  /* harmony default export */ const dropdown = (dropdown_component.exports);
10963
10978
  ;// CONCATENATED MODULE: ./components/dropdown/index.js
10964
10979
 
10965
- ;// 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&
10966
- 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)}
10967
- var emojivue_type_template_id_010f8b36_staticRenderFns = []
10980
+ ;// 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&
10981
+ 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)}
10982
+ var emojivue_type_template_id_85307cb0_staticRenderFns = []
10968
10983
 
10969
10984
 
10970
10985
  ;// CONCATENATED MODULE: ./components/emoji/emoji_constants.js
@@ -10988,7 +11003,8 @@ var emoji_regex_default = /*#__PURE__*/__webpack_require__.n(emoji_regex);
10988
11003
  ;// CONCATENATED MODULE: ./common/emoji.js
10989
11004
 
10990
11005
  const emojiVersion = '6.6';
10991
- const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/'; // Used for emoji 16px and smaller
11006
+ const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
11007
+ let customEmojiAssetUrl = null; // Used for emoji 16px and smaller
10992
11008
 
10993
11009
  let emojiImageUrlSmall = defaultEmojiAssetUrl;
10994
11010
  let emojiFileExtensionSmall = '.png'; // Used for emoji larger than 16px
@@ -11000,6 +11016,9 @@ async function getEmojiJson() {
11000
11016
  if (emojiJson) return;
11001
11017
  emojiJson = await __webpack_require__.e(/* import() */ 370).then(__webpack_require__.t.bind(__webpack_require__, 370, 19));
11002
11018
  }
11019
+ function getEmojiData() {
11020
+ return emojiJson;
11021
+ }
11003
11022
  function setEmojiAssetUrlSmall(url) {
11004
11023
  let fileExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.png';
11005
11024
 
@@ -11019,6 +11038,69 @@ function setEmojiAssetUrlLarge(url) {
11019
11038
 
11020
11039
  emojiImageUrlLarge = url;
11021
11040
  emojiFileExtensionLarge = fileExtension;
11041
+ }
11042
+ function setCustomEmojiUrl(url) {
11043
+ customEmojiAssetUrl = url;
11044
+ }
11045
+ function setCustomEmojiJson(json) {
11046
+ validateCustomEmojiJson(json);
11047
+ }
11048
+ /**
11049
+ * Validate custom emoji json
11050
+ */
11051
+
11052
+ async function validateCustomEmojiJson(json) {
11053
+ await getEmojiJson();
11054
+ const customEmojiProps = ['extension', 'custom'];
11055
+ const customEmojiRequiredProps = ['name', 'category', 'shortname', 'extension', 'custom'];
11056
+ /**
11057
+ * Update single emoji properties.
11058
+ * If the property exists in emojiData, it'll add the values if the property is an array, otherwise will overwrite.
11059
+ * If not exists, will add the property to the emojiData object.
11060
+ */
11061
+
11062
+ const _updateNativeEmojiData = (emojiData, propName, propValue) => {
11063
+ if (emojiData[propName] === undefined) {
11064
+ if (!customEmojiProps.includes(propName)) {
11065
+ return;
11066
+ } // new property to add
11067
+
11068
+
11069
+ emojiData[propName] = propValue;
11070
+ } else {
11071
+ if (Array.isArray(emojiData[propName])) {
11072
+ emojiData[propName] = emojiData[propName].concat(propValue);
11073
+ } else {
11074
+ emojiData[propName] = propValue;
11075
+ }
11076
+ }
11077
+ };
11078
+
11079
+ Object.entries(json).forEach(item => {
11080
+ const [customEmojiKey, customEmojiValue] = item;
11081
+
11082
+ if (customEmojiKey in emojiJson) {
11083
+ // custom emoji exists in emoji json which means to update some data in the native emoji
11084
+ const emojiData = emojiJson[customEmojiKey];
11085
+
11086
+ for (const customEmojiPropertyName in customEmojiValue) {
11087
+ const customEmojiPropertyValue = customEmojiValue[customEmojiPropertyName];
11088
+
11089
+ _updateNativeEmojiData(emojiData, customEmojiPropertyName, customEmojiPropertyValue);
11090
+ }
11091
+ } else {
11092
+ // new custom emoji
11093
+ const _validateRequiredProps = () => customEmojiRequiredProps.every(val => {
11094
+ return customEmojiValue[val] !== undefined;
11095
+ });
11096
+
11097
+ if (_validateRequiredProps()) {
11098
+ emojiJson[customEmojiKey] = customEmojiValue;
11099
+ } else {
11100
+ console.error('The following custom emoji doesn\'t contain the required properties:', customEmojiValue);
11101
+ }
11102
+ }
11103
+ });
11022
11104
  } // recursively searches the emoji data object containing data for all emojis
11023
11105
  // and returns the object with the specified shortcode.
11024
11106
 
@@ -11043,7 +11125,7 @@ function shortcodeToEmojiData(shortcode) {
11043
11125
  }
11044
11126
 
11045
11127
  let reference;
11046
- f(emojiJson, null);
11128
+ f(getEmojiData(), null);
11047
11129
  return reference;
11048
11130
  } // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
11049
11131
  // as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
@@ -11093,8 +11175,11 @@ async function codeToEmojiData(code) {
11093
11175
  // @returns {string[]}
11094
11176
 
11095
11177
  function findShortCodes(textContent) {
11096
- const shortCodes = textContent.match(/:\w+:/g);
11097
- const filtered = shortCodes ? shortCodes.filter(code => shortcodeToEmojiData(code)) : [];
11178
+ const shortcodes = textContent.match(/:\w+:/g);
11179
+ return filterValidShortCodes(shortcodes);
11180
+ }
11181
+ function filterValidShortCodes(shortcodes) {
11182
+ const filtered = shortcodes ? shortcodes.filter(code => shortcodeToEmojiData(code)) : [];
11098
11183
  return new Set(filtered);
11099
11184
  } // Finds every emoji in slot text
11100
11185
  // removes duplicates
@@ -11140,7 +11225,8 @@ function findEmojis(textContent) {
11140
11225
  props: {
11141
11226
  /**
11142
11227
  * Supports shortcode ex: :smile: or unicode ex: 😄. Will display the resulting emoji.
11143
- * See https://emojipedia.org/joypixels/ for all supported shortcode/unicode.
11228
+ * See https://emojipedia.org/joypixels/ for all supported shortcode/unicode or the docs
11229
+ * for setting up custom emojis.
11144
11230
  */
11145
11231
  code: {
11146
11232
  type: String,
@@ -11193,8 +11279,15 @@ function findEmojis(textContent) {
11193
11279
  },
11194
11280
 
11195
11281
  emojiSrc() {
11282
+ var _this$emojiData;
11283
+
11196
11284
  if (!this.emojiDataValid) {
11197
11285
  return 'invalid';
11286
+ } // custom emoji
11287
+
11288
+
11289
+ if ((_this$emojiData = this.emojiData) !== null && _this$emojiData !== void 0 && _this$emojiData.custom) {
11290
+ return customEmojiAssetUrl + this.emojiData.key + this.emojiData.extension;
11198
11291
  }
11199
11292
 
11200
11293
  if (['d-svg--size14', 'd-svg--size16'].includes(this.size)) {
@@ -11209,7 +11302,7 @@ function findEmojis(textContent) {
11209
11302
  return undefined;
11210
11303
  }
11211
11304
 
11212
- return stringToUnicode(this.emojiData.unicode_output);
11305
+ return this.emojiData.unicode_output ? stringToUnicode(this.emojiData.unicode_output) : this.emojiData.name;
11213
11306
  },
11214
11307
 
11215
11308
  emojiLabel() {
@@ -11267,8 +11360,8 @@ function findEmojis(textContent) {
11267
11360
  ;
11268
11361
  var emoji_component = normalizeComponent(
11269
11362
  emoji_emojivue_type_script_lang_js_,
11270
- emojivue_type_template_id_010f8b36_render,
11271
- emojivue_type_template_id_010f8b36_staticRenderFns,
11363
+ emojivue_type_template_id_85307cb0_render,
11364
+ emojivue_type_template_id_85307cb0_staticRenderFns,
11272
11365
  false,
11273
11366
  null,
11274
11367
  null,
@@ -11280,6 +11373,125 @@ var emoji_component = normalizeComponent(
11280
11373
  ;// CONCATENATED MODULE: ./components/emoji/index.js
11281
11374
 
11282
11375
 
11376
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[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&
11377
+
11378
+
11379
+ /* harmony default export */ const emoji_text_wrappervue_type_script_lang_js_ = ({
11380
+ name: 'DtEmojiTextWrapper',
11381
+ components: {
11382
+ DtEmoji: emoji
11383
+ },
11384
+ inheritAttrs: false,
11385
+ props: {
11386
+ /**
11387
+ * The type of element to use for the wrapper.
11388
+ */
11389
+ elementType: {
11390
+ type: String,
11391
+ default: 'div'
11392
+ }
11393
+ },
11394
+
11395
+ data() {
11396
+ return {
11397
+ loadingEmojiJson: true
11398
+ };
11399
+ },
11400
+
11401
+ async created() {
11402
+ await getEmojiJson();
11403
+ this.loadingEmojiJson = false;
11404
+ },
11405
+
11406
+ methods: {
11407
+ /**
11408
+ * Replaces the valid codes from the text content with a DtEmoji component.
11409
+ * @returns {Array<VNode|string>}
11410
+ */
11411
+ replaceDtEmojis(replaceList, textContent) {
11412
+ const regexp = new RegExp("(".concat(replaceList.join('|'), ")"), 'g');
11413
+ const split = textContent.split(regexp);
11414
+ return split.map(item => {
11415
+ if (replaceList.includes(item)) {
11416
+ return this.$createElement(emoji, {
11417
+ attrs: {
11418
+ class: 'd-mx4 d-d-inline-block'
11419
+ },
11420
+ props: {
11421
+ code: item,
11422
+ ...this.$attrs
11423
+ }
11424
+ });
11425
+ }
11426
+
11427
+ return item;
11428
+ });
11429
+ },
11430
+
11431
+ /**
11432
+ * Recursively search the Vue virtual DOM to find text
11433
+ * @param VNode
11434
+ * @returns {VNode|*}
11435
+ */
11436
+ searchVNodes(VNode) {
11437
+ // If VNode has no tag, it is a text node
11438
+ if (!VNode.tag && VNode.text) {
11439
+ return this.searchCodes(VNode.text);
11440
+ }
11441
+
11442
+ const children = VNode.children ? VNode.children.map(VNodeChild => this.searchVNodes(VNodeChild)) : [];
11443
+ return this.$createElement(VNode.tag, VNode.data, children);
11444
+ },
11445
+
11446
+ // TODO: Find a way to crawl vue components
11447
+ replaceVueComponentVNodeContent(VNode) {//
11448
+ },
11449
+
11450
+ /**
11451
+ * Find codes in text.
11452
+ * @param textContent string
11453
+ * @returns {Array<VNode|string>|string}
11454
+ */
11455
+ searchCodes(textContent) {
11456
+ const shortcodes = findShortCodes(textContent);
11457
+ const emojis = findEmojis(textContent);
11458
+ const replaceList = [...shortcodes, ...emojis];
11459
+ if (replaceList.length === 0) return textContent;
11460
+ return this.replaceDtEmojis(replaceList, textContent);
11461
+ }
11462
+
11463
+ },
11464
+
11465
+ render(h) {
11466
+ const defaultSlotContent = this.$slots.default || [];
11467
+ return h(this.elementType, this.loadingEmojiJson ? defaultSlotContent : defaultSlotContent.map(VNode => this.searchVNodes(VNode)));
11468
+ }
11469
+
11470
+ });
11471
+ ;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue?vue&type=script&lang=js&
11472
+ /* harmony default export */ const emoji_text_wrapper_emoji_text_wrappervue_type_script_lang_js_ = (emoji_text_wrappervue_type_script_lang_js_);
11473
+ ;// CONCATENATED MODULE: ./components/emoji_text_wrapper/emoji_text_wrapper.vue
11474
+ var emoji_text_wrapper_render, emoji_text_wrapper_staticRenderFns
11475
+ ;
11476
+
11477
+
11478
+
11479
+ /* normalize component */
11480
+ ;
11481
+ var emoji_text_wrapper_component = normalizeComponent(
11482
+ emoji_text_wrapper_emoji_text_wrappervue_type_script_lang_js_,
11483
+ emoji_text_wrapper_render,
11484
+ emoji_text_wrapper_staticRenderFns,
11485
+ false,
11486
+ null,
11487
+ null,
11488
+ null
11489
+
11490
+ )
11491
+
11492
+ /* harmony default export */ const emoji_text_wrapper = (emoji_text_wrapper_component.exports);
11493
+ ;// CONCATENATED MODULE: ./components/emoji_text_wrapper/index.js
11494
+
11283
11495
  ;// 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&
11284
11496
  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:[
11285
11497
  'base-input__label-text',
@@ -16493,15 +16705,15 @@ var root_layout_component = normalizeComponent(
16493
16705
  ;// CONCATENATED MODULE: ./components/root_layout/index.js
16494
16706
 
16495
16707
 
16496
- ;// 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&
16497
- 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){
16708
+ ;// 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&
16709
+ 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){
16498
16710
  var inputProps = ref.inputProps;
16499
16711
  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){
16500
16712
  var opened = ref.opened;
16501
16713
  var listProps = ref.listProps;
16502
16714
  var clearHighlightIndex = ref.clearHighlightIndex;
16503
- 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))}
16504
- var combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns = []
16715
+ 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))}
16716
+ var combobox_with_popovervue_type_template_id_0ce1b850_staticRenderFns = []
16505
16717
 
16506
16718
 
16507
16719
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[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&
@@ -16877,8 +17089,8 @@ var combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns = []
16877
17089
  ;
16878
17090
  var combobox_with_popover_component = normalizeComponent(
16879
17091
  combobox_with_popover_combobox_with_popovervue_type_script_lang_js_,
16880
- combobox_with_popovervue_type_template_id_6f7d8b3c_render,
16881
- combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns,
17092
+ combobox_with_popovervue_type_template_id_0ce1b850_render,
17093
+ combobox_with_popovervue_type_template_id_0ce1b850_staticRenderFns,
16882
17094
  false,
16883
17095
  null,
16884
17096
  null,
@@ -16889,13 +17101,110 @@ var combobox_with_popover_component = normalizeComponent(
16889
17101
  /* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
16890
17102
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
16891
17103
 
16892
- ;// 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&
16893
- 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){
17104
+ ;// 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&
17105
+ 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){
16894
17106
  var onInput = ref.onInput;
16895
- 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)})}
16896
- var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17107
+ 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)})}
17108
+ var combobox_multi_selectvue_type_template_id_907d2f60_staticRenderFns = []
16897
17109
 
16898
17110
 
17111
+ ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
17112
+ // The item list for default story
17113
+ const ITEMS_LIST_DATA = [{
17114
+ id: 'item1',
17115
+ value: 'item1',
17116
+ type: 'MAINLINE'
17117
+ }, {
17118
+ id: 'item2',
17119
+ value: 'item2',
17120
+ type: 'MAINLINE'
17121
+ }, {
17122
+ id: 'item3',
17123
+ value: 'item3',
17124
+ type: 'MAINLINE'
17125
+ }, {
17126
+ id: 'item4',
17127
+ value: 'item4',
17128
+ type: 'MAINLINE'
17129
+ }, {
17130
+ id: 'item5',
17131
+ value: 'item5',
17132
+ type: 'MAINLINE'
17133
+ }, {
17134
+ id: 'item6',
17135
+ value: 'item6',
17136
+ type: 'MAINLINE'
17137
+ }, {
17138
+ id: 'item7',
17139
+ value: 'item7',
17140
+ type: 'MAINLINE'
17141
+ }, {
17142
+ id: 'item8',
17143
+ value: 'item8',
17144
+ type: 'Other'
17145
+ }, {
17146
+ id: 'item9',
17147
+ value: 'item9',
17148
+ type: 'MAINLINE'
17149
+ }, {
17150
+ id: 'item10',
17151
+ value: 'item10',
17152
+ type: 'MAINLINE'
17153
+ }, {
17154
+ id: 'item11',
17155
+ value: 'item11',
17156
+ type: 'MAINLINE'
17157
+ }, {
17158
+ id: 'item12',
17159
+ value: 'item12',
17160
+ type: 'Other'
17161
+ }, {
17162
+ id: 'item13',
17163
+ value: 'item13',
17164
+ type: 'MAINLINE'
17165
+ }, {
17166
+ id: 'item14',
17167
+ value: 'item14',
17168
+ type: 'MAINLINE'
17169
+ }, {
17170
+ id: 'item15',
17171
+ value: 'item15',
17172
+ type: 'MAINLINE'
17173
+ }, {
17174
+ id: 'item16',
17175
+ value: 'item16',
17176
+ type: 'MAINLINE'
17177
+ }, {
17178
+ id: 'item17',
17179
+ value: 'item17',
17180
+ type: 'MAINLINE'
17181
+ }, {
17182
+ id: 'item18',
17183
+ value: 'item18',
17184
+ type: 'Other'
17185
+ }, {
17186
+ id: 'item19',
17187
+ value: 'item19',
17188
+ type: 'MAINLINE'
17189
+ }, {
17190
+ id: 'item20',
17191
+ value: 'item20',
17192
+ type: 'MAINLINE'
17193
+ }, {
17194
+ id: 'item21',
17195
+ value: 'item21',
17196
+ type: 'MAINLINE'
17197
+ }, {
17198
+ id: 'item22',
17199
+ value: 'item22',
17200
+ type: 'Other'
17201
+ }];
17202
+ const MULTI_SELECT_SIZES = {
17203
+ // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.
17204
+ EXTRA_SMALL: 'xs',
17205
+ SMALL: 'sm',
17206
+ DEFAULT: 'md'
17207
+ };
16899
17208
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[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&
16900
17209
  //
16901
17210
  //
@@ -16995,6 +17304,9 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
16995
17304
  //
16996
17305
  //
16997
17306
  //
17307
+ //
17308
+ //
17309
+
16998
17310
 
16999
17311
 
17000
17312
  /* harmony default export */ const combobox_multi_selectvue_type_script_lang_js_ = ({
@@ -17110,7 +17422,7 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17110
17422
  },
17111
17423
 
17112
17424
  /**
17113
- * Max select message when the max selections has been reached with the structure:
17425
+ * Max select message when the max selections is exceeded with the structure:
17114
17426
  * `[{"message": string, "type": VALIDATION_MESSAGE_TYPES }]`
17115
17427
  */
17116
17428
  maxSelectedMessage: {
@@ -17127,6 +17439,15 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17127
17439
  hasSuggestionList: {
17128
17440
  type: Boolean,
17129
17441
  default: true
17442
+ },
17443
+
17444
+ /**
17445
+ * Size of the input and chip, one of `xs`, `sm`, `md`
17446
+ */
17447
+ size: {
17448
+ type: String,
17449
+ default: null,
17450
+ validator: t => Object.values(MULTI_SELECT_SIZES).includes(t)
17130
17451
  }
17131
17452
  },
17132
17453
  emits: ['input', 'select', 'remove', 'max-selected'],
@@ -17161,10 +17482,19 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17161
17482
  return { ...this.$listeners,
17162
17483
  input: event => {
17163
17484
  this.$emit('input', event);
17485
+
17486
+ if (this.hasSuggestionList) {
17487
+ this.showComboboxList();
17488
+ }
17164
17489
  },
17165
17490
  keyup: event => {
17166
17491
  this.onInputKeyup(event);
17167
17492
  this.$emit('keyup', event);
17493
+ },
17494
+ click: event => {
17495
+ if (this.hasSuggestionList) {
17496
+ this.showComboboxList();
17497
+ }
17168
17498
  }
17169
17499
  };
17170
17500
  }
@@ -17224,6 +17554,22 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17224
17554
  this.$emit('select', i);
17225
17555
  },
17226
17556
 
17557
+ showComboboxList() {
17558
+ if (this.showList != null) {
17559
+ return;
17560
+ }
17561
+
17562
+ this.$refs.comboboxWithPopover.showComboboxList();
17563
+ },
17564
+
17565
+ closeComboboxList() {
17566
+ if (this.showList != null) {
17567
+ return;
17568
+ }
17569
+
17570
+ this.$refs.comboboxWithPopover.closeComboboxList();
17571
+ },
17572
+
17227
17573
  getChipButtons() {
17228
17574
  return this.$refs.chips && this.$refs.chips.map(chip => chip.$el.querySelector('button'));
17229
17575
  },
@@ -17285,13 +17631,13 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17285
17631
  moveFromInputToChip() {
17286
17632
  this.getLastChipButton().focus();
17287
17633
  this.$refs.input.blur();
17288
- this.$refs.comboboxWithPopover.closeComboboxList();
17634
+ this.closeComboboxList();
17289
17635
  },
17290
17636
 
17291
17637
  moveFromChipToInput() {
17292
17638
  this.getLastChipButton().blur();
17293
17639
  this.$refs.input.focus();
17294
- this.$refs.comboboxWithPopover.showComboboxList();
17640
+ this.showComboboxList();
17295
17641
  },
17296
17642
 
17297
17643
  navigateBetweenChips(target, toLeft) {
@@ -17304,7 +17650,7 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17304
17650
 
17305
17651
  this.getChipButtons()[from].blur();
17306
17652
  this.getChipButtons()[to].focus();
17307
- this.$refs.comboboxWithPopover.closeComboboxList();
17653
+ this.closeComboboxList();
17308
17654
  },
17309
17655
 
17310
17656
  setChipsTopPosition() {
@@ -17374,7 +17720,7 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17374
17720
  checkMaxSelected() {
17375
17721
  if (this.maxSelected === 0) return;
17376
17722
 
17377
- if (this.selectedItems.length >= this.maxSelected) {
17723
+ if (this.selectedItems.length > this.maxSelected) {
17378
17724
  this.showValidationMessages = true;
17379
17725
  this.$emit('max-selected');
17380
17726
  } else {
@@ -17396,8 +17742,8 @@ var combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns = []
17396
17742
  ;
17397
17743
  var combobox_multi_select_component = normalizeComponent(
17398
17744
  combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
17399
- combobox_multi_selectvue_type_template_id_f64f2bb6_render,
17400
- combobox_multi_selectvue_type_template_id_f64f2bb6_staticRenderFns,
17745
+ combobox_multi_selectvue_type_template_id_907d2f60_render,
17746
+ combobox_multi_selectvue_type_template_id_907d2f60_staticRenderFns,
17401
17747
  false,
17402
17748
  null,
17403
17749
  null,
@@ -17408,6 +17754,7 @@ var combobox_multi_select_component = normalizeComponent(
17408
17754
  /* harmony default export */ const combobox_multi_select = (combobox_multi_select_component.exports);
17409
17755
  ;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/index.js
17410
17756
 
17757
+
17411
17758
  ;// 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&
17412
17759
  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:[
17413
17760
  'd-ba',
@@ -17753,6 +18100,7 @@ var top_banner_info_component = normalizeComponent(
17753
18100
 
17754
18101
 
17755
18102
 
18103
+
17756
18104
 
17757
18105
 
17758
18106
  /// Recipes