@dialpad/dialtone-vue 2.14.0 → 2.15.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),
|
|
@@ -1170,6 +1171,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1170
1171
|
"USER_STATUS_COLOR_MODIFIERS": () => (/* reexport */ USER_STATUS_COLOR_MODIFIERS),
|
|
1171
1172
|
"VALIDATION_MESSAGE_TYPES": () => (/* reexport */ VALIDATION_MESSAGE_TYPES),
|
|
1172
1173
|
"codeToEmojiData": () => (/* reexport */ codeToEmojiData),
|
|
1174
|
+
"customEmojiAssetUrl": () => (/* reexport */ customEmojiAssetUrl),
|
|
1173
1175
|
"defaultEmojiAssetUrl": () => (/* reexport */ defaultEmojiAssetUrl),
|
|
1174
1176
|
"emojiFileExtensionLarge": () => (/* reexport */ emojiFileExtensionLarge),
|
|
1175
1177
|
"emojiFileExtensionSmall": () => (/* reexport */ emojiFileExtensionSmall),
|
|
@@ -1178,17 +1180,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1178
1180
|
"emojiJson": () => (/* reexport */ emojiJson),
|
|
1179
1181
|
"emojiVersion": () => (/* reexport */ emojiVersion),
|
|
1180
1182
|
"filterFormattedMessages": () => (/* reexport */ filterFormattedMessages),
|
|
1183
|
+
"filterValidShortCodes": () => (/* reexport */ filterValidShortCodes),
|
|
1181
1184
|
"findEmojis": () => (/* reexport */ findEmojis),
|
|
1182
1185
|
"findShortCodes": () => (/* reexport */ findShortCodes),
|
|
1183
1186
|
"formatMessages": () => (/* reexport */ formatMessages),
|
|
1187
|
+
"getEmojiData": () => (/* reexport */ getEmojiData),
|
|
1184
1188
|
"getEmojiJson": () => (/* reexport */ getEmojiJson),
|
|
1185
1189
|
"getUniqueString": () => (/* reexport */ getUniqueString),
|
|
1186
1190
|
"getValidationState": () => (/* reexport */ getValidationState),
|
|
1191
|
+
"setCustomEmojiJson": () => (/* reexport */ setCustomEmojiJson),
|
|
1192
|
+
"setCustomEmojiUrl": () => (/* reexport */ setCustomEmojiUrl),
|
|
1187
1193
|
"setEmojiAssetUrlLarge": () => (/* reexport */ setEmojiAssetUrlLarge),
|
|
1188
1194
|
"setEmojiAssetUrlSmall": () => (/* reexport */ setEmojiAssetUrlSmall),
|
|
1189
1195
|
"shortcodeToEmojiData": () => (/* reexport */ shortcodeToEmojiData),
|
|
1190
1196
|
"stringToUnicode": () => (/* reexport */ stringToUnicode),
|
|
1191
1197
|
"unicodeToString": () => (/* reexport */ unicodeToString),
|
|
1198
|
+
"validateCustomEmojiJson": () => (/* reexport */ validateCustomEmojiJson),
|
|
1192
1199
|
"validationMessageValidator": () => (/* reexport */ validationMessageValidator)
|
|
1193
1200
|
});
|
|
1194
1201
|
|
|
@@ -3227,9 +3234,9 @@ var button_group_component = normalizeComponent(
|
|
|
3227
3234
|
;// CONCATENATED MODULE: ./components/button_group/index.js
|
|
3228
3235
|
|
|
3229
3236
|
|
|
3230
|
-
;// 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=
|
|
3231
|
-
var
|
|
3232
|
-
var
|
|
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 = []
|
|
3233
3240
|
|
|
3234
3241
|
|
|
3235
3242
|
;// CONCATENATED MODULE: ./common/mixins/dom.js
|
|
@@ -3603,9 +3610,9 @@ const ERROR_INVALID_LIST_ELEMENT = 'listElementKey is required or the referenced
|
|
|
3603
3610
|
}
|
|
3604
3611
|
};
|
|
3605
3612
|
});
|
|
3606
|
-
;// 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=
|
|
3607
|
-
var
|
|
3608
|
-
var
|
|
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 = []
|
|
3609
3616
|
|
|
3610
3617
|
|
|
3611
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&
|
|
@@ -4652,6 +4659,9 @@ var skeleton_component = normalizeComponent(
|
|
|
4652
4659
|
//
|
|
4653
4660
|
//
|
|
4654
4661
|
//
|
|
4662
|
+
//
|
|
4663
|
+
//
|
|
4664
|
+
//
|
|
4655
4665
|
|
|
4656
4666
|
|
|
4657
4667
|
/* harmony default export */ const combobox_loading_listvue_type_script_lang_js_ = ({
|
|
@@ -4673,8 +4683,8 @@ var skeleton_component = normalizeComponent(
|
|
|
4673
4683
|
;
|
|
4674
4684
|
var combobox_loading_list_component = normalizeComponent(
|
|
4675
4685
|
combobox_combobox_loading_listvue_type_script_lang_js_,
|
|
4676
|
-
|
|
4677
|
-
|
|
4686
|
+
combobox_loading_listvue_type_template_id_07d9971d_render,
|
|
4687
|
+
combobox_loading_listvue_type_template_id_07d9971d_staticRenderFns,
|
|
4678
4688
|
false,
|
|
4679
4689
|
null,
|
|
4680
4690
|
null,
|
|
@@ -4877,6 +4887,7 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4877
4887
|
},
|
|
4878
4888
|
methods: {
|
|
4879
4889
|
onMouseHighlight(e) {
|
|
4890
|
+
if (this.loading) return;
|
|
4880
4891
|
const liElement = e.target.closest('li');
|
|
4881
4892
|
|
|
4882
4893
|
if (liElement && this.highlightId !== liElement.id) {
|
|
@@ -4897,10 +4908,13 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4897
4908
|
},
|
|
4898
4909
|
|
|
4899
4910
|
afterHighlight() {
|
|
4911
|
+
if (this.loading) return;
|
|
4900
4912
|
this.$emit('highlight', this.highlightIndex);
|
|
4901
4913
|
},
|
|
4902
4914
|
|
|
4903
4915
|
onEnterKey() {
|
|
4916
|
+
if (this.loading) return;
|
|
4917
|
+
|
|
4904
4918
|
if (this.highlightIndex >= 0) {
|
|
4905
4919
|
this.$emit('select', this.highlightIndex);
|
|
4906
4920
|
}
|
|
@@ -4923,7 +4937,7 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4923
4937
|
},
|
|
4924
4938
|
|
|
4925
4939
|
onKeyValidation(e, eventHandler) {
|
|
4926
|
-
if (!this.showList || !this.getListElement()
|
|
4940
|
+
if (!this.showList || !this.getListElement()) {
|
|
4927
4941
|
return;
|
|
4928
4942
|
}
|
|
4929
4943
|
|
|
@@ -4933,7 +4947,7 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4933
4947
|
setInitialHighlightIndex() {
|
|
4934
4948
|
if (this.showList) {
|
|
4935
4949
|
// When the list's is shown, reset the highlight index.
|
|
4936
|
-
// If the list is
|
|
4950
|
+
// If the list is loading, set to -1
|
|
4937
4951
|
this.setHighlightIndex(this.loading ? -1 : 0);
|
|
4938
4952
|
}
|
|
4939
4953
|
}
|
|
@@ -4952,8 +4966,8 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4952
4966
|
;
|
|
4953
4967
|
var combobox_component = normalizeComponent(
|
|
4954
4968
|
combobox_comboboxvue_type_script_lang_js_,
|
|
4955
|
-
|
|
4956
|
-
|
|
4969
|
+
comboboxvue_type_template_id_0f032a37_render,
|
|
4970
|
+
comboboxvue_type_template_id_0f032a37_staticRenderFns,
|
|
4957
4971
|
false,
|
|
4958
4972
|
null,
|
|
4959
4973
|
null,
|
|
@@ -10963,9 +10977,9 @@ var dropdown_component = normalizeComponent(
|
|
|
10963
10977
|
/* harmony default export */ const dropdown = (dropdown_component.exports);
|
|
10964
10978
|
;// CONCATENATED MODULE: ./components/dropdown/index.js
|
|
10965
10979
|
|
|
10966
|
-
;// 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=
|
|
10967
|
-
var
|
|
10968
|
-
var
|
|
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 = []
|
|
10969
10983
|
|
|
10970
10984
|
|
|
10971
10985
|
;// CONCATENATED MODULE: ./components/emoji/emoji_constants.js
|
|
@@ -10989,7 +11003,8 @@ var emoji_regex_default = /*#__PURE__*/__webpack_require__.n(emoji_regex);
|
|
|
10989
11003
|
;// CONCATENATED MODULE: ./common/emoji.js
|
|
10990
11004
|
|
|
10991
11005
|
const emojiVersion = '6.6';
|
|
10992
|
-
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
11006
|
+
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
11007
|
+
let customEmojiAssetUrl = null; // Used for emoji 16px and smaller
|
|
10993
11008
|
|
|
10994
11009
|
let emojiImageUrlSmall = defaultEmojiAssetUrl;
|
|
10995
11010
|
let emojiFileExtensionSmall = '.png'; // Used for emoji larger than 16px
|
|
@@ -11001,6 +11016,9 @@ async function getEmojiJson() {
|
|
|
11001
11016
|
if (emojiJson) return;
|
|
11002
11017
|
emojiJson = await __webpack_require__.e(/* import() */ 370).then(__webpack_require__.t.bind(__webpack_require__, 370, 19));
|
|
11003
11018
|
}
|
|
11019
|
+
function getEmojiData() {
|
|
11020
|
+
return emojiJson;
|
|
11021
|
+
}
|
|
11004
11022
|
function setEmojiAssetUrlSmall(url) {
|
|
11005
11023
|
let fileExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.png';
|
|
11006
11024
|
|
|
@@ -11020,6 +11038,69 @@ function setEmojiAssetUrlLarge(url) {
|
|
|
11020
11038
|
|
|
11021
11039
|
emojiImageUrlLarge = url;
|
|
11022
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
|
+
});
|
|
11023
11104
|
} // recursively searches the emoji data object containing data for all emojis
|
|
11024
11105
|
// and returns the object with the specified shortcode.
|
|
11025
11106
|
|
|
@@ -11044,7 +11125,7 @@ function shortcodeToEmojiData(shortcode) {
|
|
|
11044
11125
|
}
|
|
11045
11126
|
|
|
11046
11127
|
let reference;
|
|
11047
|
-
f(
|
|
11128
|
+
f(getEmojiData(), null);
|
|
11048
11129
|
return reference;
|
|
11049
11130
|
} // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
|
|
11050
11131
|
// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
|
|
@@ -11094,8 +11175,11 @@ async function codeToEmojiData(code) {
|
|
|
11094
11175
|
// @returns {string[]}
|
|
11095
11176
|
|
|
11096
11177
|
function findShortCodes(textContent) {
|
|
11097
|
-
const
|
|
11098
|
-
|
|
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)) : [];
|
|
11099
11183
|
return new Set(filtered);
|
|
11100
11184
|
} // Finds every emoji in slot text
|
|
11101
11185
|
// removes duplicates
|
|
@@ -11141,7 +11225,8 @@ function findEmojis(textContent) {
|
|
|
11141
11225
|
props: {
|
|
11142
11226
|
/**
|
|
11143
11227
|
* Supports shortcode ex: :smile: or unicode ex: 😄. Will display the resulting emoji.
|
|
11144
|
-
* 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.
|
|
11145
11230
|
*/
|
|
11146
11231
|
code: {
|
|
11147
11232
|
type: String,
|
|
@@ -11194,8 +11279,15 @@ function findEmojis(textContent) {
|
|
|
11194
11279
|
},
|
|
11195
11280
|
|
|
11196
11281
|
emojiSrc() {
|
|
11282
|
+
var _this$emojiData;
|
|
11283
|
+
|
|
11197
11284
|
if (!this.emojiDataValid) {
|
|
11198
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;
|
|
11199
11291
|
}
|
|
11200
11292
|
|
|
11201
11293
|
if (['d-svg--size14', 'd-svg--size16'].includes(this.size)) {
|
|
@@ -11210,7 +11302,7 @@ function findEmojis(textContent) {
|
|
|
11210
11302
|
return undefined;
|
|
11211
11303
|
}
|
|
11212
11304
|
|
|
11213
|
-
return stringToUnicode(this.emojiData.unicode_output);
|
|
11305
|
+
return this.emojiData.unicode_output ? stringToUnicode(this.emojiData.unicode_output) : this.emojiData.name;
|
|
11214
11306
|
},
|
|
11215
11307
|
|
|
11216
11308
|
emojiLabel() {
|
|
@@ -11268,8 +11360,8 @@ function findEmojis(textContent) {
|
|
|
11268
11360
|
;
|
|
11269
11361
|
var emoji_component = normalizeComponent(
|
|
11270
11362
|
emoji_emojivue_type_script_lang_js_,
|
|
11271
|
-
|
|
11272
|
-
|
|
11363
|
+
emojivue_type_template_id_85307cb0_render,
|
|
11364
|
+
emojivue_type_template_id_85307cb0_staticRenderFns,
|
|
11273
11365
|
false,
|
|
11274
11366
|
null,
|
|
11275
11367
|
null,
|
|
@@ -11281,6 +11373,125 @@ var emoji_component = normalizeComponent(
|
|
|
11281
11373
|
;// CONCATENATED MODULE: ./components/emoji/index.js
|
|
11282
11374
|
|
|
11283
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
|
+
|
|
11284
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&
|
|
11285
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:[
|
|
11286
11497
|
'base-input__label-text',
|
|
@@ -16494,15 +16705,15 @@ var root_layout_component = normalizeComponent(
|
|
|
16494
16705
|
;// CONCATENATED MODULE: ./components/root_layout/index.js
|
|
16495
16706
|
|
|
16496
16707
|
|
|
16497
|
-
;// 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=
|
|
16498
|
-
var
|
|
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){
|
|
16499
16710
|
var inputProps = ref.inputProps;
|
|
16500
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){
|
|
16501
16712
|
var opened = ref.opened;
|
|
16502
16713
|
var listProps = ref.listProps;
|
|
16503
16714
|
var clearHighlightIndex = ref.clearHighlightIndex;
|
|
16504
|
-
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 [
|
|
16505
|
-
var
|
|
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 = []
|
|
16506
16717
|
|
|
16507
16718
|
|
|
16508
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&
|
|
@@ -16878,8 +17089,8 @@ var combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns = []
|
|
|
16878
17089
|
;
|
|
16879
17090
|
var combobox_with_popover_component = normalizeComponent(
|
|
16880
17091
|
combobox_with_popover_combobox_with_popovervue_type_script_lang_js_,
|
|
16881
|
-
|
|
16882
|
-
|
|
17092
|
+
combobox_with_popovervue_type_template_id_0ce1b850_render,
|
|
17093
|
+
combobox_with_popovervue_type_template_id_0ce1b850_staticRenderFns,
|
|
16883
17094
|
false,
|
|
16884
17095
|
null,
|
|
16885
17096
|
null,
|
|
@@ -16890,11 +17101,11 @@ var combobox_with_popover_component = normalizeComponent(
|
|
|
16890
17101
|
/* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
|
|
16891
17102
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
|
|
16892
17103
|
|
|
16893
|
-
;// 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=
|
|
16894
|
-
var
|
|
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=b69c13e6&
|
|
17105
|
+
var combobox_multi_selectvue_type_template_id_b69c13e6_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){
|
|
16895
17106
|
var onInput = ref.onInput;
|
|
16896
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)})}
|
|
16897
|
-
var
|
|
17108
|
+
var combobox_multi_selectvue_type_template_id_b69c13e6_staticRenderFns = []
|
|
16898
17109
|
|
|
16899
17110
|
|
|
16900
17111
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
|
|
@@ -17211,7 +17422,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
17211
17422
|
},
|
|
17212
17423
|
|
|
17213
17424
|
/**
|
|
17214
|
-
* Max select message when the max selections
|
|
17425
|
+
* Max select message when the max selections is exceeded with the structure:
|
|
17215
17426
|
* `[{"message": string, "type": VALIDATION_MESSAGE_TYPES }]`
|
|
17216
17427
|
*/
|
|
17217
17428
|
maxSelectedMessage: {
|
|
@@ -17484,7 +17695,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
17484
17695
|
checkMaxSelected() {
|
|
17485
17696
|
if (this.maxSelected === 0) return;
|
|
17486
17697
|
|
|
17487
|
-
if (this.selectedItems.length
|
|
17698
|
+
if (this.selectedItems.length > this.maxSelected) {
|
|
17488
17699
|
this.showValidationMessages = true;
|
|
17489
17700
|
this.$emit('max-selected');
|
|
17490
17701
|
} else {
|
|
@@ -17506,8 +17717,8 @@ const MULTI_SELECT_SIZES = {
|
|
|
17506
17717
|
;
|
|
17507
17718
|
var combobox_multi_select_component = normalizeComponent(
|
|
17508
17719
|
combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
|
|
17509
|
-
|
|
17510
|
-
|
|
17720
|
+
combobox_multi_selectvue_type_template_id_b69c13e6_render,
|
|
17721
|
+
combobox_multi_selectvue_type_template_id_b69c13e6_staticRenderFns,
|
|
17511
17722
|
false,
|
|
17512
17723
|
null,
|
|
17513
17724
|
null,
|
|
@@ -17864,6 +18075,7 @@ var top_banner_info_component = normalizeComponent(
|
|
|
17864
18075
|
|
|
17865
18076
|
|
|
17866
18077
|
|
|
18078
|
+
|
|
17867
18079
|
|
|
17868
18080
|
|
|
17869
18081
|
/// Recipes
|