@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.
package/dist/dialtone-vue.umd.js
CHANGED
|
@@ -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),
|
|
@@ -1188,6 +1189,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1188
1189
|
"USER_STATUS_COLOR_MODIFIERS": () => (/* reexport */ USER_STATUS_COLOR_MODIFIERS),
|
|
1189
1190
|
"VALIDATION_MESSAGE_TYPES": () => (/* reexport */ VALIDATION_MESSAGE_TYPES),
|
|
1190
1191
|
"codeToEmojiData": () => (/* reexport */ codeToEmojiData),
|
|
1192
|
+
"customEmojiAssetUrl": () => (/* reexport */ customEmojiAssetUrl),
|
|
1191
1193
|
"defaultEmojiAssetUrl": () => (/* reexport */ defaultEmojiAssetUrl),
|
|
1192
1194
|
"emojiFileExtensionLarge": () => (/* reexport */ emojiFileExtensionLarge),
|
|
1193
1195
|
"emojiFileExtensionSmall": () => (/* reexport */ emojiFileExtensionSmall),
|
|
@@ -1196,17 +1198,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1196
1198
|
"emojiJson": () => (/* reexport */ emojiJson),
|
|
1197
1199
|
"emojiVersion": () => (/* reexport */ emojiVersion),
|
|
1198
1200
|
"filterFormattedMessages": () => (/* reexport */ filterFormattedMessages),
|
|
1201
|
+
"filterValidShortCodes": () => (/* reexport */ filterValidShortCodes),
|
|
1199
1202
|
"findEmojis": () => (/* reexport */ findEmojis),
|
|
1200
1203
|
"findShortCodes": () => (/* reexport */ findShortCodes),
|
|
1201
1204
|
"formatMessages": () => (/* reexport */ formatMessages),
|
|
1205
|
+
"getEmojiData": () => (/* reexport */ getEmojiData),
|
|
1202
1206
|
"getEmojiJson": () => (/* reexport */ getEmojiJson),
|
|
1203
1207
|
"getUniqueString": () => (/* reexport */ getUniqueString),
|
|
1204
1208
|
"getValidationState": () => (/* reexport */ getValidationState),
|
|
1209
|
+
"setCustomEmojiJson": () => (/* reexport */ setCustomEmojiJson),
|
|
1210
|
+
"setCustomEmojiUrl": () => (/* reexport */ setCustomEmojiUrl),
|
|
1205
1211
|
"setEmojiAssetUrlLarge": () => (/* reexport */ setEmojiAssetUrlLarge),
|
|
1206
1212
|
"setEmojiAssetUrlSmall": () => (/* reexport */ setEmojiAssetUrlSmall),
|
|
1207
1213
|
"shortcodeToEmojiData": () => (/* reexport */ shortcodeToEmojiData),
|
|
1208
1214
|
"stringToUnicode": () => (/* reexport */ stringToUnicode),
|
|
1209
1215
|
"unicodeToString": () => (/* reexport */ unicodeToString),
|
|
1216
|
+
"validateCustomEmojiJson": () => (/* reexport */ validateCustomEmojiJson),
|
|
1210
1217
|
"validationMessageValidator": () => (/* reexport */ validationMessageValidator)
|
|
1211
1218
|
});
|
|
1212
1219
|
|
|
@@ -3245,9 +3252,9 @@ var button_group_component = normalizeComponent(
|
|
|
3245
3252
|
;// CONCATENATED MODULE: ./components/button_group/index.js
|
|
3246
3253
|
|
|
3247
3254
|
|
|
3248
|
-
;// 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=
|
|
3249
|
-
var
|
|
3250
|
-
var
|
|
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 = []
|
|
3251
3258
|
|
|
3252
3259
|
|
|
3253
3260
|
;// CONCATENATED MODULE: ./common/mixins/dom.js
|
|
@@ -3621,9 +3628,9 @@ const ERROR_INVALID_LIST_ELEMENT = 'listElementKey is required or the referenced
|
|
|
3621
3628
|
}
|
|
3622
3629
|
};
|
|
3623
3630
|
});
|
|
3624
|
-
;// 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=
|
|
3625
|
-
var
|
|
3626
|
-
var
|
|
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 = []
|
|
3627
3634
|
|
|
3628
3635
|
|
|
3629
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&
|
|
@@ -4670,6 +4677,9 @@ var skeleton_component = normalizeComponent(
|
|
|
4670
4677
|
//
|
|
4671
4678
|
//
|
|
4672
4679
|
//
|
|
4680
|
+
//
|
|
4681
|
+
//
|
|
4682
|
+
//
|
|
4673
4683
|
|
|
4674
4684
|
|
|
4675
4685
|
/* harmony default export */ const combobox_loading_listvue_type_script_lang_js_ = ({
|
|
@@ -4691,8 +4701,8 @@ var skeleton_component = normalizeComponent(
|
|
|
4691
4701
|
;
|
|
4692
4702
|
var combobox_loading_list_component = normalizeComponent(
|
|
4693
4703
|
combobox_combobox_loading_listvue_type_script_lang_js_,
|
|
4694
|
-
|
|
4695
|
-
|
|
4704
|
+
combobox_loading_listvue_type_template_id_07d9971d_render,
|
|
4705
|
+
combobox_loading_listvue_type_template_id_07d9971d_staticRenderFns,
|
|
4696
4706
|
false,
|
|
4697
4707
|
null,
|
|
4698
4708
|
null,
|
|
@@ -4895,6 +4905,7 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4895
4905
|
},
|
|
4896
4906
|
methods: {
|
|
4897
4907
|
onMouseHighlight(e) {
|
|
4908
|
+
if (this.loading) return;
|
|
4898
4909
|
const liElement = e.target.closest('li');
|
|
4899
4910
|
|
|
4900
4911
|
if (liElement && this.highlightId !== liElement.id) {
|
|
@@ -4915,10 +4926,13 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4915
4926
|
},
|
|
4916
4927
|
|
|
4917
4928
|
afterHighlight() {
|
|
4929
|
+
if (this.loading) return;
|
|
4918
4930
|
this.$emit('highlight', this.highlightIndex);
|
|
4919
4931
|
},
|
|
4920
4932
|
|
|
4921
4933
|
onEnterKey() {
|
|
4934
|
+
if (this.loading) return;
|
|
4935
|
+
|
|
4922
4936
|
if (this.highlightIndex >= 0) {
|
|
4923
4937
|
this.$emit('select', this.highlightIndex);
|
|
4924
4938
|
}
|
|
@@ -4941,7 +4955,7 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4941
4955
|
},
|
|
4942
4956
|
|
|
4943
4957
|
onKeyValidation(e, eventHandler) {
|
|
4944
|
-
if (!this.showList || !this.getListElement()
|
|
4958
|
+
if (!this.showList || !this.getListElement()) {
|
|
4945
4959
|
return;
|
|
4946
4960
|
}
|
|
4947
4961
|
|
|
@@ -4951,7 +4965,7 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4951
4965
|
setInitialHighlightIndex() {
|
|
4952
4966
|
if (this.showList) {
|
|
4953
4967
|
// When the list's is shown, reset the highlight index.
|
|
4954
|
-
// If the list is
|
|
4968
|
+
// If the list is loading, set to -1
|
|
4955
4969
|
this.setHighlightIndex(this.loading ? -1 : 0);
|
|
4956
4970
|
}
|
|
4957
4971
|
}
|
|
@@ -4970,8 +4984,8 @@ var combobox_loading_list_component = normalizeComponent(
|
|
|
4970
4984
|
;
|
|
4971
4985
|
var combobox_component = normalizeComponent(
|
|
4972
4986
|
combobox_comboboxvue_type_script_lang_js_,
|
|
4973
|
-
|
|
4974
|
-
|
|
4987
|
+
comboboxvue_type_template_id_0f032a37_render,
|
|
4988
|
+
comboboxvue_type_template_id_0f032a37_staticRenderFns,
|
|
4975
4989
|
false,
|
|
4976
4990
|
null,
|
|
4977
4991
|
null,
|
|
@@ -10981,9 +10995,9 @@ var dropdown_component = normalizeComponent(
|
|
|
10981
10995
|
/* harmony default export */ const dropdown = (dropdown_component.exports);
|
|
10982
10996
|
;// CONCATENATED MODULE: ./components/dropdown/index.js
|
|
10983
10997
|
|
|
10984
|
-
;// 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=
|
|
10985
|
-
var
|
|
10986
|
-
var
|
|
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 = []
|
|
10987
11001
|
|
|
10988
11002
|
|
|
10989
11003
|
;// CONCATENATED MODULE: ./components/emoji/emoji_constants.js
|
|
@@ -11007,7 +11021,8 @@ var emoji_regex_default = /*#__PURE__*/__webpack_require__.n(emoji_regex);
|
|
|
11007
11021
|
;// CONCATENATED MODULE: ./common/emoji.js
|
|
11008
11022
|
|
|
11009
11023
|
const emojiVersion = '6.6';
|
|
11010
|
-
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
11024
|
+
const defaultEmojiAssetUrl = 'https://cdn.jsdelivr.net/joypixels/assets/' + emojiVersion + '/png/unicode/32/';
|
|
11025
|
+
let customEmojiAssetUrl = null; // Used for emoji 16px and smaller
|
|
11011
11026
|
|
|
11012
11027
|
let emojiImageUrlSmall = defaultEmojiAssetUrl;
|
|
11013
11028
|
let emojiFileExtensionSmall = '.png'; // Used for emoji larger than 16px
|
|
@@ -11019,6 +11034,9 @@ async function getEmojiJson() {
|
|
|
11019
11034
|
if (emojiJson) return;
|
|
11020
11035
|
emojiJson = await __webpack_require__.e(/* import() */ 370).then(__webpack_require__.t.bind(__webpack_require__, 370, 19));
|
|
11021
11036
|
}
|
|
11037
|
+
function getEmojiData() {
|
|
11038
|
+
return emojiJson;
|
|
11039
|
+
}
|
|
11022
11040
|
function setEmojiAssetUrlSmall(url) {
|
|
11023
11041
|
let fileExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.png';
|
|
11024
11042
|
|
|
@@ -11038,6 +11056,69 @@ function setEmojiAssetUrlLarge(url) {
|
|
|
11038
11056
|
|
|
11039
11057
|
emojiImageUrlLarge = url;
|
|
11040
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
|
+
});
|
|
11041
11122
|
} // recursively searches the emoji data object containing data for all emojis
|
|
11042
11123
|
// and returns the object with the specified shortcode.
|
|
11043
11124
|
|
|
@@ -11062,7 +11143,7 @@ function shortcodeToEmojiData(shortcode) {
|
|
|
11062
11143
|
}
|
|
11063
11144
|
|
|
11064
11145
|
let reference;
|
|
11065
|
-
f(
|
|
11146
|
+
f(getEmojiData(), null);
|
|
11066
11147
|
return reference;
|
|
11067
11148
|
} // Takes in an emoji unicode character(s) and converts it to an emoji string in the format the emoji data object expects
|
|
11068
11149
|
// as a key. There can be multiple unicode characters in an emoji to denote the emoji itself, skin tone, gender
|
|
@@ -11112,8 +11193,11 @@ async function codeToEmojiData(code) {
|
|
|
11112
11193
|
// @returns {string[]}
|
|
11113
11194
|
|
|
11114
11195
|
function findShortCodes(textContent) {
|
|
11115
|
-
const
|
|
11116
|
-
|
|
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)) : [];
|
|
11117
11201
|
return new Set(filtered);
|
|
11118
11202
|
} // Finds every emoji in slot text
|
|
11119
11203
|
// removes duplicates
|
|
@@ -11159,7 +11243,8 @@ function findEmojis(textContent) {
|
|
|
11159
11243
|
props: {
|
|
11160
11244
|
/**
|
|
11161
11245
|
* Supports shortcode ex: :smile: or unicode ex: 😄. Will display the resulting emoji.
|
|
11162
|
-
* 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.
|
|
11163
11248
|
*/
|
|
11164
11249
|
code: {
|
|
11165
11250
|
type: String,
|
|
@@ -11212,8 +11297,15 @@ function findEmojis(textContent) {
|
|
|
11212
11297
|
},
|
|
11213
11298
|
|
|
11214
11299
|
emojiSrc() {
|
|
11300
|
+
var _this$emojiData;
|
|
11301
|
+
|
|
11215
11302
|
if (!this.emojiDataValid) {
|
|
11216
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;
|
|
11217
11309
|
}
|
|
11218
11310
|
|
|
11219
11311
|
if (['d-svg--size14', 'd-svg--size16'].includes(this.size)) {
|
|
@@ -11228,7 +11320,7 @@ function findEmojis(textContent) {
|
|
|
11228
11320
|
return undefined;
|
|
11229
11321
|
}
|
|
11230
11322
|
|
|
11231
|
-
return stringToUnicode(this.emojiData.unicode_output);
|
|
11323
|
+
return this.emojiData.unicode_output ? stringToUnicode(this.emojiData.unicode_output) : this.emojiData.name;
|
|
11232
11324
|
},
|
|
11233
11325
|
|
|
11234
11326
|
emojiLabel() {
|
|
@@ -11286,8 +11378,8 @@ function findEmojis(textContent) {
|
|
|
11286
11378
|
;
|
|
11287
11379
|
var emoji_component = normalizeComponent(
|
|
11288
11380
|
emoji_emojivue_type_script_lang_js_,
|
|
11289
|
-
|
|
11290
|
-
|
|
11381
|
+
emojivue_type_template_id_85307cb0_render,
|
|
11382
|
+
emojivue_type_template_id_85307cb0_staticRenderFns,
|
|
11291
11383
|
false,
|
|
11292
11384
|
null,
|
|
11293
11385
|
null,
|
|
@@ -11299,6 +11391,125 @@ var emoji_component = normalizeComponent(
|
|
|
11299
11391
|
;// CONCATENATED MODULE: ./components/emoji/index.js
|
|
11300
11392
|
|
|
11301
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
|
+
|
|
11302
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&
|
|
11303
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:[
|
|
11304
11515
|
'base-input__label-text',
|
|
@@ -16512,15 +16723,15 @@ var root_layout_component = normalizeComponent(
|
|
|
16512
16723
|
;// CONCATENATED MODULE: ./components/root_layout/index.js
|
|
16513
16724
|
|
|
16514
16725
|
|
|
16515
|
-
;// 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=
|
|
16516
|
-
var
|
|
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){
|
|
16517
16728
|
var inputProps = ref.inputProps;
|
|
16518
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){
|
|
16519
16730
|
var opened = ref.opened;
|
|
16520
16731
|
var listProps = ref.listProps;
|
|
16521
16732
|
var clearHighlightIndex = ref.clearHighlightIndex;
|
|
16522
|
-
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 [
|
|
16523
|
-
var
|
|
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 = []
|
|
16524
16735
|
|
|
16525
16736
|
|
|
16526
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&
|
|
@@ -16896,8 +17107,8 @@ var combobox_with_popovervue_type_template_id_6f7d8b3c_staticRenderFns = []
|
|
|
16896
17107
|
;
|
|
16897
17108
|
var combobox_with_popover_component = normalizeComponent(
|
|
16898
17109
|
combobox_with_popover_combobox_with_popovervue_type_script_lang_js_,
|
|
16899
|
-
|
|
16900
|
-
|
|
17110
|
+
combobox_with_popovervue_type_template_id_0ce1b850_render,
|
|
17111
|
+
combobox_with_popovervue_type_template_id_0ce1b850_staticRenderFns,
|
|
16901
17112
|
false,
|
|
16902
17113
|
null,
|
|
16903
17114
|
null,
|
|
@@ -16908,11 +17119,11 @@ var combobox_with_popover_component = normalizeComponent(
|
|
|
16908
17119
|
/* harmony default export */ const combobox_with_popover = (combobox_with_popover_component.exports);
|
|
16909
17120
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_with_popover/index.js
|
|
16910
17121
|
|
|
16911
|
-
;// 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=
|
|
16912
|
-
var
|
|
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=b69c13e6&
|
|
17123
|
+
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){
|
|
16913
17124
|
var onInput = ref.onInput;
|
|
16914
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)})}
|
|
16915
|
-
var
|
|
17126
|
+
var combobox_multi_selectvue_type_template_id_b69c13e6_staticRenderFns = []
|
|
16916
17127
|
|
|
16917
17128
|
|
|
16918
17129
|
;// CONCATENATED MODULE: ./recipes/comboboxes/combobox_multi_select/combobox_multi_select_story_constants.js
|
|
@@ -17229,7 +17440,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
17229
17440
|
},
|
|
17230
17441
|
|
|
17231
17442
|
/**
|
|
17232
|
-
* Max select message when the max selections
|
|
17443
|
+
* Max select message when the max selections is exceeded with the structure:
|
|
17233
17444
|
* `[{"message": string, "type": VALIDATION_MESSAGE_TYPES }]`
|
|
17234
17445
|
*/
|
|
17235
17446
|
maxSelectedMessage: {
|
|
@@ -17502,7 +17713,7 @@ const MULTI_SELECT_SIZES = {
|
|
|
17502
17713
|
checkMaxSelected() {
|
|
17503
17714
|
if (this.maxSelected === 0) return;
|
|
17504
17715
|
|
|
17505
|
-
if (this.selectedItems.length
|
|
17716
|
+
if (this.selectedItems.length > this.maxSelected) {
|
|
17506
17717
|
this.showValidationMessages = true;
|
|
17507
17718
|
this.$emit('max-selected');
|
|
17508
17719
|
} else {
|
|
@@ -17524,8 +17735,8 @@ const MULTI_SELECT_SIZES = {
|
|
|
17524
17735
|
;
|
|
17525
17736
|
var combobox_multi_select_component = normalizeComponent(
|
|
17526
17737
|
combobox_multi_select_combobox_multi_selectvue_type_script_lang_js_,
|
|
17527
|
-
|
|
17528
|
-
|
|
17738
|
+
combobox_multi_selectvue_type_template_id_b69c13e6_render,
|
|
17739
|
+
combobox_multi_selectvue_type_template_id_b69c13e6_staticRenderFns,
|
|
17529
17740
|
false,
|
|
17530
17741
|
null,
|
|
17531
17742
|
null,
|
|
@@ -17882,6 +18093,7 @@ var top_banner_info_component = normalizeComponent(
|
|
|
17882
18093
|
|
|
17883
18094
|
|
|
17884
18095
|
|
|
18096
|
+
|
|
17885
18097
|
|
|
17886
18098
|
|
|
17887
18099
|
/// Recipes
|